metal_trace_interpolate — TOMOGRAPHY artifact op

데이터 종류: sinogramsinogram

호출: import tomography; tomography.metal_trace_interpolate(sinogram, angles_deg=None, image_threshold=None, mask=None, size=None)(또는 opstomography.get("metal_trace_interpolate"))

사용법

선형 보간에 의한 금속 아티팩트 저감(LI-MAR).

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

A metal implant attenuates so strongly that its detector bins carry almost no

photons; the measured line integrals there are dominated by scatter and by the

noise floor of the logarithm, and back-projecting them lays down the dark

bands and bright streaks between dense objects that make a slice unreadable.

The oldest working answer, and still the baseline every newer method is

compared against: declare the affected bins *missing* and fill them by linear

interpolation along the detector axis, per angle. The result is not the truth

— it is a smooth guess with the streaks removed — and it blurs whatever was

genuinely behind the metal.

**How the affected bins are found matters more than the interpolation, and

the obvious way is measurably worse than doing nothing.** The metal trace is

located the way LI-MAR actually does it: reconstruct once with

:func:filtered_backprojection, threshold the *image* at

`mean + 3*std`, forward-project that binary mask, and treat the bins it

touches as missing. Thresholding the sinogram directly is the shortcut

that suggests itself, and on the Shepp-Logan phantom with a 6-px implant it

goes wrong in the direction that is hardest to notice — it flags the densest

*legitimate* structure (the skull, seen edge-on) and interpolates it away:

implant density uncorrected sinogram threshold image threshold

x8 0.0487 0.0626 0.0255

x30 0.1583 0.2249 0.0255

x100 0.5214 0.7127 0.0257

(normalised RMS error against the metal-free truth, outside the implant

footprint; the metal-free reconstruction itself scores 0.0250.) The image

route recovers essentially all of the damage at every density. The sinogram

route makes it 1.3-1.4x *worse* than not correcting at all, at every density,

while still producing a picture with fewer visible streaks — which is why the

shortcut is not offered as an option here rather than merely discouraged.

Inside the implant footprint the reconstruction is now wrong on purpose: the

metal is gone. Clinical practice puts it back from the thresholded

reconstruction afterwards; that step is not implemented.

:param sinogram: `(n_angles, n_detectors)`.

:param angles_deg: view angles; `None -> uniform [0, 180)`. Used for the

internal reconstruction and re-projection, so a wrong angle set here

misplaces the trace.

:param image_threshold: image-domain metal threshold; `None` ->

`mean + 3*std` of the internal reconstruction.

:param mask: explicit boolean `(n_angles, n_detectors)` metal trace. When

given, no reconstruction is done and *image_threshold* is ignored — this

is the route to use when the trace comes from a segmentation you trust.

:param size: side of the internal reconstruction; `None` -> the inscribed

square.

:returns: `(n_angles, n_detectors)` float64 sinogram.

:raises ValueError: if the mask shape disagrees with the sinogram, if the mask

is not boolean, if nothing is left to interpolate from, or if any *row* is

entirely masked.

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

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

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

• 알고리즘의 정전(저자·연도)과 용도는 위의 패밀리 사용 가이드에 적혀 있습니다.

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

ct_reconstructionpy -3.11 examples/ct_reconstruction.py

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

backproject_sinogram · filtered_backprojection · sart_reconstruct · beam_hardening_apply · beam_hardening_correct · ring_artifact_apply · ring_artifact_remove · sinogram_center_of_rotation

같은 카테고리(artifact)

beam_hardening_apply · beam_hardening_correct · ring_artifact_apply · ring_artifact_remove


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

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