[Dcmlib] Re: [vtkusers] voxel's volume
Laurent PAUL
Laurent.Paul at orto.ucl.ac.be
Mon Apr 3 17:59:34 CEST 2006
Mathieu, Jean-Pierre, users,
I understood how to calculate the Zspacing with IOP and IPP.
But, I need the IPP for two consecutive images. But with the
'GetValueFromTag' method from GDCMImageIO class, I can only get IPP for
the first image.
How to?
Second question, I tried with several volumes with different IOP and IPP.
I found exactly the same value as in 'Spacing Between Slices' tag.
Is it just a coincidence?
Third, Is there any example in ITK or Insight Applications which get this
Zspacing? Is there any method in ITK to do that? I'm not the only one to
calculate this value?!
Thanks.
Laurnt.
>
>> 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