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

Mathieu Malaterre mathieu.malaterre at kitware.com
Wed Apr 5 20:21:01 CEST 2006


Please read my post on dcmlib. This is also usefull to post to 
appropriate mailing list.
In this case, this is ITK, apparently people on dcmlib do not know very 
well ITK internals.

so to repeat myself: ITK IS DOING THE RIGHT THING. Please disregrads JP 
comment: ITK will compute the proper zspacing for you.


 > 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?

I think so

Regards,
Mathieu

Laurent PAUL wrote:
> 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?
> 
> 
> 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