vol_equalize — 3D gray op

데이터 종류: voxelvoxel

호출: import fullseye as fs; fs.ledger.vol_equalize(vol, nbins=256, mask=None)(구현을 직접 호출하려면 import volgray; volgray.vol_equalize(vol, nbins=256, mask=None), 원장에서 가져오려면 ops3d.get("vol_equalize"))

사용법

볼륨의 히스토그램 평활화(HALCON `equ_histo_image`).

> 아래 상세 설명은 원문입니다 —— 요약과 제목은 번역되어 있습니다.

Builds an *nbins*-bin histogram over the volume's `[min, max]` range,

takes its cumulative distribution as a monotone LUT, and maps every voxel

through it — the output lives in `(0, 1]` and its histogram is

(approximately) flat. With *mask* (thresholded at `> 0.5`, the volops

convention) the **histogram is computed from the masked voxels only while

the LUT is applied to the whole volume** — exactly the HALCON

`reduce_domain + equ_histo_image` domain behaviour, and the right

tool when a dominant background (e.g. air around a CT subject) would

otherwise swallow the whole dynamic range.

A constant volume is returned unchanged — normalising a flat volume

would amplify floating-point dust into full-scale garbage (fail-honest,

not fail-loud; see the module docstring).

Parameters

----------

vol : array_like, shape (D, H, W)

Input volume (coerced to float64; NaN/Inf rejected).

nbins : int

Histogram bins, `>= 2`. More bins = finer LUT (the mapping is

piecewise-constant per bin — an approximation, documented above).

mask : array_like, shape (D, H, W), optional

Histogram domain. Must match *vol*'s shape and select at least one

voxel (an empty domain has no histogram — fail-closed).

Returns

-------

ndarray, shape (D, H, W), float64

The equalised volume in `[0, 1]` (constant input: the input itself).

Raises

------

ValueError

Non-3-D / non-finite input, `nbins < 2`, a mask shape mismatch, or

an empty mask.

참고(샘플 데이터·문헌)

• 샘플 데이터 카탈로그(DL URL / 라이선스) —— 2-D 는 skimage.data(BSD/public)+ 합성, 3-D 는 실데이터 소스(Stanford/PDS 등)의 DL URL.

• 연산자의 내력·참고문헌 —— 이 연산자 족의 바탕이 된 연구/기법의 출처.

실행 가능한 예제(이 연산자를 실제로 호출하는 검증된 샘플)

gray_window_levelpy -3.11 examples_3d/gray_window_level.py

타입이 이어지는 다음 연산자(voxel 를 입력으로 받는 것)

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

같은 카테고리(gray)

vol_window_level · vol_gamma · vol_stretch


*Provenance: volgray.py — 3D 연산자 레지스트리. 이 op 노트는 tools/opdocs.py md 가 자동 생성합니다(직접 편집하지 마세요).*

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