Spots, templates and fitted objects
A response image says how well each voxel matches a feature. Peak extraction, subpixel fitting and crowded-object suppression make additional decisions. Keep these stages separate so thresholds and rejection diagnostics remain inspectable.
Available operations
interest
Entry points: BlobResponseOp, BlobDetector, append_response_peak_table_phases.
DoG, LoG and Hessian-determinant blob responses over explicit scales, plus regional response maxima. Multi-scale response selection does not by itself establish a calibrated spot likelihood.
Execution: Bounded response images, followed by planned plateau/peak tables or resident extraction.
Response support and detection support are different. A DoG response needs the wider Gaussian’s finite support; LoG and Hessian responses additionally need their derivative stencil. Comparing several scales requires consistent response normalization. After that local stage, regional-maximum extraction may have the nonlocal plateau dependency described in regional extrema.
Select scales near the image size of the structures to detect, accounting for anisotropic voxel pitches. A bright response threshold is an image feature criterion, not a calibrated false-positive probability. Inspect the response and final plateau/candidate decisions before adding fitted position or size estimates.
template_match
Entry points: RadialTemplate, radial_profile, multi_radius_ncc_chain.
Radial templates and normalized cross-correlation at several radii. Compose correlations of intensity, squared intensity and support through a shared transform bank.
Execution: Finite-support chain composition; template size determines image footprint.
Why normalized correlation needs several fields. A template score removes local mean and scales by local variance. That requires correlations of intensity, squared intensity and support, not just one template dot product. The shared bank reuses transformed inputs for those related terms and combines them after the neighborhood statistics are available.
The template/radius and support determine the finite source footprint. A shell-shaped template encodes a radial appearance assumption; elongated or occluded structures can have poor scores despite being real objects. Preserve the support normalization near true boundaries and low-variance regions rather than treating an undefined normalization as a high-confidence match.
suppress
Entry points: SuppressRowsOp, SuppressionRadius, suppress_points.
Greedy strongest-first suppression with fixed or per-row radii and explicit pair rules. Positions may come from voxel keys or coordinate columns.
Execution: Barrier reduction over candidates, then owner-block emission. Candidate population is not a fixed-size accumulator.
Why a radius alone does not make suppression local. Greedy suppression orders candidates by strength, then decides which nearby candidates survive. A stronger neighbor may itself be rejected by another candidate outside the current window; chains of decisions can propagate farther than one pair radius. The implemented barrier route evaluates the complete candidate set before emitting owned survivors.
Choose whether radius comes from a fixed physical/voxel bound or each row’s estimated extent, and state the pair rule for unequal radii. Suppression removes redundant detections; it does not estimate missing crowded emitters. Its retained state follows the number of candidates, so permissive response thresholds can dominate memory even with bounded image filtering.
star_convex
Entry points: ShellFitOp, ShellFitParams, StarConvexLabelsOp.
Fit radial star-convex shells around candidate centers, emit shapes/quality and paint labels. Choose ray/window bounds and shell judgment; competing shapes resolve overlap by relative depth.
Execution: Bounded per-object image windows, owner-core fitting and neighboring shape reads for painting.
A fitted object is bounded by its search model. The image window includes allowed center motion, the outer evidence search, refined ray search and interpolation neighbors. ShellFitParams::reach derives that bound; using only the nominal radius would miss samples visited while fitting a shifted center. The owner core fits an object once even if its rays cross neighboring cores.
Painting uses shape fragments from all objects capable of covering the output core and resolves overlaps by relative depth. A star-convex model assumes each ray has a meaningful radial boundary from the selected center. Deep concavities, touching objects and absent walls require explicit rejection/quality handling rather than increasingly large windows alone.
interior
Entry points: InteriorOp, NearbyShapesOp, RunLabelsOp.
Segment bright subobjects inside fitted shells using per-object normalization and watershed. Emit summary rows, subobject rows and sparse runs that can later be painted as labels.
Execution: Each parent fit is handled by its owner block; windows and neighboring shape/run fragments are explicit.
Per-parent normalization changes the problem. A bright subobject is interpreted relative to its fitted parent shell and radial intensity profile, then segmented inside that parent’s bounded crop. Different parents can therefore assign different local normalization even when their raw intensities match. Keep the parent ID on every emitted subobject for traceability.
The fit/segmentation task belongs to the block owning the parent row. Later run painters need neighboring sparse runs whose pixels overlap their core, not necessarily the original intensity window. The source-image halo and fragment gathering reach serve different stages. Reject or cap an oversized parent before allocating its crop and watershed work arrays.
interior_partition
Entry points: PartitionOp, PartitionEvidenceOp, segment_partition.
Partition parent interiors using dark-sheet evidence, seeded watershed and signed multicut. Emit parent-linked territories, contact evidence and runs.
Execution: Bounded per-parent extraction with graph work inside that object; parent window/graph still needs a size limit.
What the extra graph stage contributes. Dark-sheet evidence proposes internal separation, local seeded watershed gives initial territories, and a signed graph partition uses contacts to merge or separate them. The fitted parent boundary restricts where these decisions are meaningful. This is more structured than applying a global threshold to the raw image.
The per-parent crop limits image I/O, but the territory/contact graph can still be large inside one parent. Bound both sampled image voxels and graph nodes. Parent-linked IDs and deterministic overlap ownership are necessary when neighboring fitted parents cover the same pixels; otherwise a later painter can duplicate or silently replace territories.