简体   繁体   English

DICOM多平面图像重建

[英]DICOM multiplanar image reconstruction

My problem is, that I have to develop a program, that can open DICOM CT images in C# (without any library) and I should process the axial, coronal and sagittal images as well.我的问题是,我必须开发一个程序,可以在 C#(没有任何库)中打开 DICOM CT 图像,并且我还应该处理轴向、冠状和矢状图像。 I have figured these out, but the coronal and sagittal image reslution is not right.我已经弄清楚了这些,但是冠状和矢状图像分辨率不正确。 I checked out a million forums and questions, but I just didn't get the right way to find the coronal, sagittal resolutions.我查看了一百万个论坛和问题,但我只是没有找到正确的方法来找到冠状、矢状分辨率。 If someone can give me a formula or something I would be very happy.如果有人能给我一个公式或什么我会很高兴。

As far as I saw these are the information needed to get the resoltion:据我所知,这些是获得解决方案所需的信息:

  • Width and Height: 512x512宽度和高度:512x512
  • Number of images: 518图片数量:518
  • (0018, 0050) Slice Thickness: 1.25 (0018, 0050) 切片厚度:1.25
  • (0018, 0080) Spacing Between Slices: 0.625 (0018, 0080) 切片间距:0.625
  • (0028, 0030) Pixel Spacing: 0.845703 / 0.845703 (0028, 0030) 像素间距:0.845703 / 0.845703

But I calculate the Spacing Between Slices from the (0020, 0032) Image Position (Patient), which is 0.625 And I don't really know what is the connection between these information, what is the formula to get the right resolution.但是我从 (0020, 0032) 图像 Position(患者)计算切片之间的间距,即 0.625 我真的不知道这些信息之间的联系是什么,获得正确分辨率的公式是什么。 And my exact question is: What is the resolution of the coronal, and sagittal images?我的确切问题是:日冕和矢状图像的分辨率是多少?

If you guys need any more information about the slices just let me know.如果你们需要更多关于切片的信息,请告诉我。 Thank you in advance:)先感谢您:)

EDIT: I checked with RadiAnt DICOM Viewer that the coronal/sagittal resolution should be 512x383.编辑:我用 RadiAnt DICOM Viewer 检查了冠状/矢状分辨率应该是 512x383。 If anyone knows the formula why the result is 383. Please let me know.如果有人知道为什么结果是 383 的公式。请告诉我。 Meanwhile I'll try to figure out myself.与此同时,我会试着弄清楚自己。

there is no clear answer for resolution.解决问题没有明确的答案。 You should not forget that in DICOM you have the PixelSpacing , which you do not have in "normal images".你不应该忘记在 DICOM 中你有PixelSpacing ,而你在“普通图像”中没有。

a typical image must always have a equidistant grid to be displayed correctly on screen.典型图像必须始终具有等距网格才能在屏幕上正确显示。 But in dicom you can have a image with 100x100 pixels and pixelspacing 1.0\1.0, and you can have a image with 100x200 pixels and pixelspacing 1.0\0.5.但在 dicom 中,您可以拥有 100x100 像素和 1.0\1.0 像素间距的图像,并且您可以拥有 100x200 像素和 1.0\0.5 像素间距的图像。 A valid DICOM-Viewer would display both images the same way.有效的 DICOM-Viewer 将以相同的方式显示两个图像。 the second image has more pixels, but they are smaller.第二张图像有更多的像素,但它们更小。 resulting in the same display as the first image.导致与第一张图像相同的显示。

So its obvious, that the height of the stack of images is 518*0,625 = 323,75 mm.很明显,图像堆栈的高度是 518*0,625 = 323,75 mm。 So you have many possibilities:所以你有很多可能性:

  • you could create a 512x324 image, set pixelspacing to 0.845703\1.0 and calculate (interpolate) the z-values.您可以创建一个512x324图像,将像素间距设置为0.845703\1.0并计算(插值)z 值。
  • The best solution would be, to take the pixel data as they are, without any interpolation, so without any loss of data.最好的解决方案是,按原样获取像素数据,不进行任何插值,因此不会丢失任何数据。 Then you have a grid of 512x518 pixels.然后你有一个512x518像素的网格。 the pixelspacing would be 0.845703\0.625 .像素间距将为0.845703\0.625 Thats because the spacing in x-direction comes from the spacing of pixels in the original data and the spacing in y-direction is the distance between the slices.这是因为 x 方向的间距来自原始数据中像素的间距,而 y 方向的间距是切片之间的距离。
  • But: there are some DICOM-Viewers out there who do not deal correctly with not-equidistant pixels.但是:有一些 DICOM-Viewer 不能正确处理非等距像素。 of if you export the image into jpegs and let window/browser display the image then you need equidistant pixels.如果您将图像导出为 jpeg 并让窗口/浏览器显示图像,那么您需要等距像素。 Therefore you have to choose a number of pixels, so that in sum the heigh is 323,75mm when you have a pixel spacing of 0.845703mm.因此,您必须选择多个像素,这样当像素间距为 0.845703mm 时,总高度为 323,75mm。 This are 323,75 / 0.845703 = 382,817 ~ 383 pixels.这是 323,75 / 0.845703 = 382,817 ~ 383 像素。 So if you generate a 512x383 pixel image, where you have to do interpolation of the slices, you can create a image with equidistant pixelspacing of 0.845703\0.845703 .因此,如果您生成一个512x383像素的图像,您必须在其中对切片进行插值,您可以创建一个像素间距为0.845703\0.845703的图像。

I assume:我假设:

  1. "Number of series": 518 should read "Number of images ": 518? “系列数”:518 应该改为“图像数”:518?
  2. Spacing between slices = length of the difference vector of Image Position Patient between two adjacent slices (value in DICOM header should be identical with calculated value. If not, I would recommend to use the calculated value).切片之间的间距 = Image Position 两个相邻切片之间的患者差异向量的长度(DICOM header 中的值应与计算值相同。如果不是,我建议使用计算值)。

In this case:在这种情况下:

Resolution of saggital silces = Resolution of coronal slices = 512 slices, each with 512x518 pixels (Sagittal: height * number of slices, Coronal: width * number of slices)矢状切片的分辨率 = 冠状切片的分辨率 = 512 个切片,每个切片有 512x518 像素(矢状:高度 * 切片数,冠状:宽度 * 切片数)

Pixel Spacing saggital = pixel spacing coronal = 0.845703 * 0.625.像素间距矢状 = 像素间距冠状 = 0.845703 * 0.625。

Slice distance sagittal = slice distance coronal = 0.845703 mm切片距离矢状面 = 切片冠状面距离 = 0.845703 mm

Side note: Using a DICOM toolkit for reading the slices would be highly recommended.旁注:强烈建议使用 DICOM 工具包来读取切片。 The fact that you can read this particular exam does not tell you that you are capable of reading any exam.您可以阅读此特定考试的事实并不能说明您有能力阅读任何考试。 There are many pitfalls in DICOM's low level encoding rules. DICOM 的低级编码规则有很多陷阱。

I think I've managed to get a close solution.我想我已经设法得到了一个接近的解决方案。 1-2 pixels off from the RadiAnt version, but this is the best I could get:与 RadiAnt 版本相差 1-2 像素,但这是我能得到的最好的:

Coronal image height/Sagittal image width: number of images * spacing between slices / pixel spacing冠状图像高度/矢状图像宽度:图像数量*切片间距/像素间距

For example: 518 * 0.625 / 0.845703 = 382例如:518 * 0.625 / 0.845703 = 382

RadiAnt image resolution: 512x383. RadiAnt 图像分辨率:512x383。 My image resolution: 512x382我的图像分辨率:512x382

This solution works for some studies I tested with, but not for one or two from the internet.该解决方案适用于我测试过的一些研究,但不适用于来自互联网的一两个研究。 As kritzel_sw said it may vary.正如kritzel_sw所说,它可能会有所不同。 Hope this one will help a little for somebody else as well.希望这个对其他人也有一点帮助。

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

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