简体   繁体   English

如何将 DICOM 图像宽度和级别转换为 JPEG 亮度和对比度?

[英]How to translate DICOM image width and level to JPEG brightness and contrast?

If we convert a DICOM image to JPEG, what is the way to translate / calculate Image width = 500, Window Level = 2000 of the original DICOM to JPEG's brightness and contrast?如果我们将DICOM图像转换为JPEG,将原始DICOM的Image width = 500,Window Level = 2000转换/计算为JPEG的亮度和对比度的方法是什么?

There are other factors, such as the photometric interpretation, to consider when interpreting a DICOM's pixel intensity relative to window level and width.在解释相对于 window 级别和宽度的 DICOM 像素强度时,还需要考虑其他因素,例如光度解释。

But, assuming MONOCHROME2 for photometric intepretation, the following is a simple linear equation.但是,假设 MONOCHROME2 用于光度解释,以下是一个简单的线性方程。

minWindowValue = windowLevel - (windowWidth / 2)
jpegValue = 255 * (dicomValue - minWindowValue) / windowWidth

Cheers, Mike干杯,迈克

There's no direct answer to your question, since DICOM and JPEG have different ways to define brightness/contrast.您的问题没有直接答案,因为 DICOM 和 JPEG 有不同的方法来定义亮度/对比度。 JPEG stores true color values (RGB), while DICOM have raw pixel values, uncolored most of the time. JPEG 存储真实颜色值 (RGB),而 DICOM 具有原始像素值,大部分时间没有着色。 A DICOM viewer renders it by reading the Window Level and Width and convert this to color. DICOM 查看器通过读取 Window 级别和宽度来呈现它,并将其转换为颜色。

That is, you can say that you want your JPEG to have its pixel colors as if it was rendered by a viewer.也就是说,您可以说您希望 JPEG 的像素为 colors,就好像它是由查看器呈现的一样。 In your case pixels smaller than 1500 will be rendered as black, and those greater than 2500 as white.在您的情况下,小于 1500 的像素将呈现为黑色,大于 2500 的像素将呈现为白色。

According to DICOM Standard PS 3.3 section A.1.2.10, "The VOI LUT IE defines the Attributes that describe the transformation of the modality pixel values into pixel values that are meaningful for print, display, etc. This transformation is applied after any Modality LUT."根据 DICOM 标准 PS 3.3 第 A.1.2.10 节,“VOI LUT IE 定义了描述将模态像素值转换为对打印、显示等有意义的像素值的属性。此转换应用于任何模态之后卢特。”

VOI LUT may be included with the image, or in a presentation state object that references the image. VOI LUT 可能包含在图像中,或者在引用图像的演示 state object 中。 The linear VOI LUT transformation is described by the Window Center (0028, 1050) and Window Width (0028, 1051) and non-linear is described by VOI LUT Sequence (0028,3010).线性 VOI LUT 变换由 Window 中心 (0028, 1050) 和 Window 宽度 (0028, 1051) 描述,非线性由 VOI LUT 序列 (0028,3010) 描述。 In addition, a non-linear interpretation of Window Center and Window Width could be defined by VOI LUT Function (0028, 1056).此外,Window 中心和 Window 宽度的非线性解释可以由 VOI LUT Function (0028, 1056) 定义。

Please not that VOI LUT transformation is applied "after any Modality LUT" transformation.请不要在“任何模态 LUT”转换之后应用 VOI LUT 转换。 So to achieve the proper output value for VOI LUT transformation, you should apply the Modality LUT transformation when it is included with the image or presentation state that references the image.因此,要为 VOI LUT 转换获得正确的 output 值,当它包含在图像或引用图像的演示 state 中时,您应该应用模态 LUT 转换。 DICOM standard states "The Modality LUT IE defines the Attributes that describe the transformation of manufacturer dependent pixel values into pixel values which are manufacturer independent (eg Hounsfield units for CT, Optical Density for film digitizers, etc.)". DICOM 标准规定“模态 LUT IE 定义了描述将制造商相关像素值转换为与制造商无关的像素值的属性(例如 CT 的亨斯菲尔德单位、胶片数字化仪的光密度等)”。

Similar to VOI LUT transformation, Modality LUT can be linear and represented by Rescale Slope (0028,1053) and Rescale Intercept (0028,1052).与 VOI LUT 变换类似,Modality LUT 可以是线性的,由 Rescale Slope (0028,1053) 和 Rescale Intercept (0028,1052) 表示。 Whereas non non-linear, Modality LUT is described by Modality LUT Sequence (0028, 3000).模态 LUT 是非线性的,模态 LUT 由模态 LUT 序列 (0028, 3000) 描述。

The linear Modality LUT transformation is calculated using following:使用以下公式计算线性模态 LUT 变换:

Output = m*SV + b. Output = m*SV + b。

Where “m” is Rescale Slope (0028, 1053), “b” is Rescale Intercept (0028,1052) and SV is the stored image pixel value in the dataset.其中“m”是 Rescale Slope (0028, 1053),“b”是 Rescale Intercept (0028,1052),SV 是数据集中存储的图像像素值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM