voxel_to_hessian — REPRCONV derivative op

• 資料種類:voxel → hessian

• 呼叫: import fullseye as fs; fs.ledger.voxel_to_hessian(vol, sigma=1.0, scale_normalize=False)(要直接呼叫實作,import reprconv; reprconv.voxel_to_hessian(vol, sigma=1.0, scale_normalize=False);從台帳取用則 opsreprconv.get("voxel_to_hessian"))

• GPU:無(僅 CPU 參考實作)

用法

體 voxel → 3-D Hessian hessian 的 6 個分量 (zz, yy, xx, zy, zx, yx)。僅用 numpy 與 scipy 建構的 hessian 型別的入口。

回傳與 hessian3d(torch 的 conv3d)相同的形式: 長度為 6 的 list,各為 (D,H,W) float32, 順序為 (zz, yy, xx, zy, zx, yx)(軸 0=z, 1=y, 2=x),單位為 1/voxel²,邊緣 replicate (scipy.ndimage 的 mode="nearest")。因此 hessian_determinant / hessian_vesselness 可直接讀取,即使在沒有 torch 的純 pip install fullseye 中, voxel → hessian → voxel 的鏈也能接通。

sigma 是高斯平滑的尺度(voxel)。對角分量為「該軸的 2 階 × 其他 2 軸的平滑」,交叉分量為「2 個軸的 1 階 × 其餘軸的平滑」的可分離卷積。核為高斯導數的形狀,其和與 1 階、2 階矩嚴格對齊(取樣的高斯導數核之和不為 0,亮度會洩漏到 2 階導數中),因此對 2 次多項式 ½xᵀAx + bᵀx,內部在捨入範圍內得到 H = A。sigma=0 不是「無平滑」,而是與 hessian3d 相同的 3 抽頭核([1,−2,1] / [−0.5,0,0.5] / [1,2,1]/4)—— 與 torch 版在 float32 捨入範圍內一致。scale_normalize=True 時乘以 σ²(Lindeberg 的 γ=1 正規化。用於跨尺度比較數值。與 vol_frangi 內部 Hessian 的約定相同)。

不接受 2-D 影像: hessian 型別是 3-D 的 6 個分量,接收方也需要 (D,H,W)。2-D 的 Hessian 響應請用 sk_hessian / sk_hessian_det / xsk_hessian_eig(image → image)。

Args:

vol: 3-D 體 (D,H,W),實數,有限。

sigma: 高斯平滑的尺度(voxel)。有限且 >= 0。0 時與 hessian3d 相同的核。預設 1.0。

scale_normalize: True 時各分量乘以 σ²(不能與 sigma=0 同時使用)。

Returns:

6 個 np.ndarray 組成的 list,各為 (D,H,W) float32,順序為 (zz, yy, xx, zy, zx, yx)。

Raises:

ValueError: 空 / 不是 3-D / 非有限 / sigma 不是有限的非負數 /

scale_normalize 與 sigma=0 同時使用。

空輸入(vol 為 0 個元素)會引發 ValueError。

參考(範例資料、文獻)

• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。

• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。

• 演算法的正典(作者、年份)與用途見上面的族使用指南。

可執行的範例(實際呼叫該運算子並已驗證的樣例)

• hessian_numpy_chain — py -3.11 examples/hessian_numpy_chain.py

型別可銜接的下一個運算子(可接受 hessian 作為輸入)

hessian_determinant · hessian_vesselness

同類別(derivative)

gradient_magnitude · gradient_coherence · hessian_determinant · hessian_vesselness


*Provenance: reprconv.py — REPRCONV 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*

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