[Dcmlib] Re: [vtkusers] voxel's volume

Mathieu Malaterre mathieu.malaterre at kitware.com
Wed Mar 29 18:56:06 CEST 2006


> Laurent,
> I do agree with Mathieu.
> You cannot get the voxel Z Size reading just an image.
> You need 2 images, get the Date Element 0x0020,0x0032 --> Image Position 
> (Patient), and compute the Z spacing.
> Mathieu :
> Don't you think we (I) should add GDCM a method to do that (you pass the 
> 2 "Image Position (Patient)", and it returns zspacing.
> My question : I add it on *which* class (noy on File, not on FileHelper, 
> not on Document ...?)

This is already in gdcm::SerieHelper::ImagePositionPatientOrdering

If you provide anything else people will be tempted to use DICOM files 
from different series, or do other crazy stuff.

This operation is really on the edge of gdcm responsability (for a IO 
toolkit), thus I would not worry about that. I would just make sure that 
vtkGdcmReader is actually using the value from this function rather than 
the -not so usefull- GetZSpacing

2 cents,
Mathieu
Ps: See for instance TIFF lib, there is no equivalent so people have 
themself to do the 3D reconstruction when dealing with TIFFDirectory...



More information about the Dcmlib mailing list