Reputation: 59
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. 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:
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. 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. If anyone knows the formula why the result is 383. Please let me know. Meanwhile I'll try to figure out myself.
Upvotes: 0
Views: 1318
Reputation: 1238
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".
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. A valid DICOM-Viewer would display both images the same way. 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. So you have many possibilities:
Upvotes: 2
Reputation: 59
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:
Coronal image height/Sagittal image width: number of images * spacing between slices / pixel spacing
For example: 518 * 0.625 / 0.845703 = 382
RadiAnt image resolution: 512x383. My image resolution: 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. Hope this one will help a little for somebody else as well.
Upvotes: 0
Reputation: 4013
I assume:
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)
Pixel Spacing saggital = pixel spacing coronal = 0.845703 * 0.625.
Slice distance sagittal = slice distance coronal = 0.845703 mm
Side note: Using a DICOM toolkit for reading the slices would be highly recommended. 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.
Upvotes: 1