vol_crop_domain — 3D domain op

Data kinds: voxelvoxel

Call: import fullseye as fs; fs.ledger.vol_crop_domain(vol, domain=None, margin=0) (to call the implementation directly, import volops; volops.vol_crop_domain(vol, domain=None, margin=0); from the registry, ops3d.get("vol_crop_domain"))

Return value through the ledger: fullseye.ledger.vol_crop_domain(...) returns **only the declared out type voxel** (the underlying function also returns auxiliary values). When you need what was dropped, use fullseye.ledger.vol_crop_domain.raw(...) or call volops.vol_crop_domain directly.

• Underlying return: (part, offset)

Usage

Crop a volume to the tight bounding box of a domain (HALCON `crop_domain`).

This is the memory lever of the domain family: a 512**3 CT scan whose

part of interest fits in 128**3 costs 64x less memory and compute once

cropped — and the Hessian operators (:func:vol_frangi / :func:vol_sato),

capped at `MAX_EIGEN_VOXELS`, often become *possible* only after this

step. Gray values inside the box are kept verbatim (the box, not the mask,

defines the crop — pair with :func:vol_reduce_domain first if voxels

outside the mask but inside the box must read 0).

*domain* defaults to the volume's own non-zero support (`vol != 0` —

a gray volume is cropped to wherever it has any signal; note this differs

from the `> 0.5` convention used when an explicit binary *domain* is

passed). *margin* is forwarded to :func:vol_bounding_box.

Returns `(cropped, offset) — the (d, h, w)` float64 sub-volume and the

`(z0, y0, x0)` voxel offset of its origin in the input frame. Keep the

offset: :func:vol_uncrop maps results back, and

:func:vol_boundary_points accepts it as *origin* so point coordinates stay

in the uncropped frame. An empty domain raises `ValueError` (fail-closed).

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)

roi_domain_boundarypy -3.11 examples_3d/roi_domain_boundary.py

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

voxel_to_mips · voxel_to_mesh · signed_distance_field · to_points · sobel3d · hessian3d · curvature_maps · edt_jfa

Same category (domain)

vol_reduce_domain · vol_bounding_box · vol_uncrop · vol_tiled_map


*Provenance: volops.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.