Pixel spacing, slice thickness and space between slices

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
sovaldes
Posts: 12
Joined: Fri, 2012-06-15, 09:12

Pixel spacing, slice thickness and space between slices

#1 Post by sovaldes »

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

sovaldes
Posts: 12
Joined: Fri, 2012-06-15, 09:12

Re: Pixel spacing, slice thickness and space between slices

#2 Post by sovaldes »

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

J. Riesmeier
DCMTK Developer
Posts: 2517
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Pixel spacing, slice thickness and space between slices

#3 Post by J. Riesmeier »

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.

sovaldes
Posts: 12
Joined: Fri, 2012-06-15, 09:12

Re: Pixel spacing, slice thickness and space between slices

#4 Post by sovaldes »

Thanks Jörg

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 0 guests