我需要做一些腹部CT扫描才能分割脾脏。在腹部CT扫描中,你通常对软组织使用什么对比功能?我在Python工作,我尝试了直方图均衡化,对比拉伸,但我不满意的结果。我很感谢你的帮助。
这是我的CT看起来的一个例子,尽管有些CT看起来有点不同,因为它们的质量比这个例子要低:

发布于 2022-06-09 14:43:55
你在找腹部软组织窗。典型的值可以找到这里。如果需要一个函数来窗口数组数据,请尝试如下:
import numpy as np
import skimage.exposure
def window(data: np.ndarray, lower: float = -125., upper: float = 225., dtype: str = 'float32') -> np.ndarray:
""" Scales the data between 0..1 based on a window with lower and upper limits as specified. dtype must be a float type.
Default is a soft tissue window ([-125, 225] ≙ W 350, L50).
See https://radiopaedia.org/articles/windowing-ct for common width (WW) and center/level (WL) parameters.
"""
assert 'float' in dtype, 'dtype must be a float type'
clipped = np.clip(data, lower, upper).astype(dtype)
# (do not use in_range='image', since this does not yield the desired result if the min/max values do not reach lower/upper)
return skimage.exposure.rescale_intensity(clipped, in_range=(lower, upper), out_range=(0., 1.))https://stackoverflow.com/questions/71942487
复制相似问题