vol_crop_domain — 3D domain op

• 数据种类:voxel → voxel

• 调用: import fullseye as fs; fs.ledger.vol_crop_domain(vol, domain=None, margin=0)(要直接调用实现,import volops; volops.vol_crop_domain(vol, domain=None, margin=0);从台账取用则 ops3d.get("vol_crop_domain"))

• 经台账调用的返回值: fullseye.ledger.vol_crop_domain(...) 只返回声明的 out 类型 voxel 的值(底层函数还会返回辅助信息)。需要被丢弃的部分时,使用 fullseye.ledger.vol_crop_domain.raw(...),或直接调用 volops.vol_crop_domain。

• 底层返回: (part, offset)

用法

把体裁剪到 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 (vol_frangi / 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 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 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: vol_uncrop maps results back, and vol_boundary_points accepts it as *origin* so point coordinates stay in the uncropped frame. An empty domain raises ValueError (fail-closed).

参考(示例数据、文献)

• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。

• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。

可运行的示例(实际调用该算子并已验证的样例)

• roi_domain_boundary — py -3.11 examples_3d/roi_domain_boundary.py

类型可衔接的下一个算子(可接受 voxel 作为输入)

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

同类别(domain)

vol_reduce_domain · vol_bounding_box · vol_uncrop · vol_tiled_map


*Provenance: volops.py — 3D 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*

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