[Dcmlib] GDCM gets wrong spacing between two slices in z-direction?

Mathieu Malaterre mathieu.malaterre at kitware.com
Wed Nov 10 18:16:44 CET 2004


derong wrote:
> Hello,
>  
> I just tried vtkgdcmviewer to read series dicom files, and find it 
> doesn't know the spacing between two slices.
> I guess It is always 1.0.
>  
> If i use pattern to read series files, can vtkgdcmReader get correct 
> spacing between two slices? maybe there is some tolerance issue that 
> make the spacing between two slices not always same.
>  
> Does DICOMDIR give us some helpful assistance to read series slices 
> image to make vtkImageData?
>  
> Any hints will be helpful!

Hi,

	You should use gdcmHeaderHelper. This is a class with an heuristic to 
find out the ordering of the files, and the spacing between the slices. 
It is meant to be very robust.

	Also if you are using ITK, there is an implementation in

	Code/IO/itkGDCMSeriesFileNames.cxx

http://public.kitware.com/cgi-bin/cvsweb.cgi/Code/IO/itkGDCMSeriesFileNames.cxx?annotate=1.9&root=Insight

	Anyway Dennis, I think we should add a test in the baseline, or at 
least an example that shows people how to do that.

Thanks for report,
Mathieu





More information about the Dcmlib mailing list