Hi DCMTK team,
I have a question for you. Is there any possibility to get the Pixel spacing, the slice thickness or the space between slices from the DicomImage class? The typical way to get this information, as I read in other posts, is using the DcmFileFormat class, through this current function (for getting pixel spacing):
dcmFilename->getDataset()->findAndGetOFString(DCM_PixelSpacing, patientName);
I am wondering about that, because now I am working with a DICOM file that it don`t have these DICOM tags in their metadata, as I looked in the Osirix viewer. However, using that software program, I was able to see the X and Y position of any point of the image in terms of the pixel position and also in terms of a distance from an origin (in mm). So How is possible that Osirix is able to get, in this case the Pixel Spacing if it is not in the metadata of the file, but it is showing it in the image when I am using the viewer?. The only answer that I have for this is this parameter have to be hidden in some place of the DICOM file, but I don´t know How I can it get it, in my case using DCMTK.
Thank you very much,
Samuel
Pixel spacing, slice thickness and space between slices
Moderator: Moderator Team
Re: Pixel spacing, slice thickness and space between slices
ok, I realize what was my problem. I was loading an enhanced DICOM file, which have the slice thickness and the pixel spacing hidden under the attribute Per-frameFunctionalGroupsSequence for each slice. So my Question now is if there is an easy way to get this information, because with the code I posted before, I am unable to get that information for different slices.
Thanks
Samuel
Thanks
Samuel
-
- DCMTK Developer
- Posts: 2517
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: Pixel spacing, slice thickness and space between slices
Here's an example on how to get information from a sequence item: http://support.dcmtk.org/wiki/dcmtk/how ... quenceitem
There's also an API for accessing data elements by their "path", e.g. PerFrameFunctionalGroupsSequence[3].PixelMeasuresSequence[0].PixelSpacing.
There's also an API for accessing data elements by their "path", e.g. PerFrameFunctionalGroupsSequence[3].PixelMeasuresSequence[0].PixelSpacing.
Who is online
Users browsing this forum: Google [Bot] and 1 guest