预处理是肝脏分割重要的一步,良好的预处理过程可以有效的提高分割的准确度。此博文主要记录肝脏分割过程中常见的预处理方法及相关代码。
一、标准的预处理过程
1、Kaggle LUNA16 competition preprocessing-tutorial
二、截取像素
# 截取像素
image[image< -200] = -200 # 参考 H-DenseUNet 网络
image[image> 250] = 250
三、Dicom格式将ct值转化为标准的hu值
def get_pixel_hu(scan):
img = scan.pixel_array
img = img.astype(np.int16)
# Convert to Hounsfield units (HU)
intercept = scan.RescaleIntercept
slope = scan.RescaleSlope
if slope !=