[Insight-users] How to get the distance between slices

Miller, James V (Research) millerjv at crd . ge . com
Thu, 23 Oct 2003 09:58:41 -0400


If you are using the ImageSeriesReader, the spacing should be calculated 
automatically.  So can call 

m_LoadedVolume->GetOutput()->GetSpacing();

-----Original Message-----
From: Mathieu Malaterre [mailto:Mathieu . Malaterre at creatis . insa-lyon . fr]
Sent: Thursday, October 23, 2003 5:21 AM
To: jiang
Cc: ITK
Subject: Re: [Insight-users] How to get the distance between slices


jiang wrote:
> Hi All,
> I get a volume by reading a series of DICOM files. Part of my code is:
>    typedef signed short                    PixelType;
>    typedef itk::Image<PixelType, 3>		  ImageNDType;
>    ImageNDType::ConstPointer   m_LoadedVolume;
> 
> 	m_LoadedVolume=reader->GetOutput();  //reader can read the series of
DICOM
> files
> 
> 	numberOfZslices = m_LoadedVolume->GetBufferedRegion().GetSize()[2];
> 	numberOfYslices = m_LoadedVolume->GetBufferedRegion().GetSize()[1];
> 	numberOfXslices = m_LoadedVolume->GetBufferedRegion().GetSize()[0];
> 
> I can get the number of slices by this way. How can I know the distance
> between slices?

This has already been discussed on the ML:

http://www . itk . org/pipermail/insight-users/2003-September/004761 . html

HTH
mathieu

_______________________________________________
Insight-users mailing list
Insight-users at itk . org
http://www . itk . org/mailman/listinfo/insight-users