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.