inner_box3 — 3D regionprops op

• Data kinds: voxel → primitive

• Call: import fullseye as fs; fs.ledger.inner_box3(vol) -> 'dict' (to call the implementation directly, import regionprops3d; regionprops3d.inner_box3(vol) -> 'dict'; from the registry, ops3d.get("inner_box3"))

Usage

The largest axis-aligned box fully inscribed in a binary voxel region (the 3-D counterpart of the 2-D inner_rectangle1).

Exact solution: for any depth interval [z0, z1], the box must lie inside the logical AND of slices z0..z1 (voxels that are foreground in every slice). The largest inscribed 2-D rectangle inside that AND (histogram method = the same core as inner_rectangle1) × the interval length is a candidate box, and the maximum over all intervals is the exact largest inscribed box. O(D^2 * H * W).

Returns

dict

min / max corners in (depth,row,col) axis order, center (+ cd/cr/cc),

full width size, and volume as a voxel count.

Raises

ValueError

Non-3-D input, or a region with zero foreground (no inscribed box).

Notes:

• min / max are voxel indices inclusive at both ends (float arrays). size = max - min + 1, volume = prod(size). center is (min + max) / 2 and can have .5. The registered name on the 2-D side is r2_inner_rectangle1.

• For each depth interval a Python loop searches the largest rectangle, O(D²·H·W). Once the AND becomes empty, the search for that z0 is cut off. It is slow on large volumes.

• When several candidates have the same volume, the first one found (smaller z0, and within that smaller z1) is returned.

• The input is converted to bool with everything other than 0 as foreground (NaN is foreground too). The axis order is (depth, row, col).

• Typical: call it after narrowing to 1 object with largest_component (if several components are mixed, the box is not necessarily that of the largest component).

Background guides (the physics and conventions behind this op)

• measurement_uncertainty — Measurement uncertainty and calibration — what it takes to claim you are measuring

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

Runnable examples (verified samples that actually call this op)

• inner_box_inspection — py -3.11 examples_3d/inner_box_inspection.py

Ops the type connects to (they accept primitive as input)

fuse_to_voxel · angle_between_lines · angle_between_planes · angle_line_plane · distance_point_plane · distance_point_line · distance_line_line · distance_segment_segment

Same category (regionprops)

label_components · region_props · largest_component · filter_by_volume · vol_label · vol_region_props


*Provenance: regionprops3d.py — 3D operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.