[Insight-users] why not ITK can read the spacing correctly?

Luis Ibanez luis.ibanez at kitware.com
Fri Apr 28 09:17:55 EDT 2006


Hi Yixun,

What lead you to think that the value of spacing[2] is incorrect ?

Are you comparing the value of spacing[2] against the value in
the DICOM header ?


If so, then it is normal that they differ.

The spacing[2] is computed using the difference in
origin between consecutive slices. This value does not
have to match the spacing value in the DICOM header.



  Regards,


     Luis



------------------------
Yixun Liu wrote:
> Hi,
>  
> I use the below codes to read a series of MRI,
>  
>  this->dicomReader = ReaderType_Short::New();//itk
>  itk::DICOMSeriesFileNames::Pointer nameGenerator = 
> itk::DICOMSeriesFileNames::New();
>  nameGenerator->SetDirectory( (const char*)strPath );
>  typedef std::vector<std::string> fileNamesContainer;
>  fileNamesContainer fileNames;
>  fileNames = nameGenerator->GetFileNames();
>  this->dicomReader->SetImageIO( itk::DICOMImageIO2::New() );
>  this->dicomReader->SetFileNames( fileNames ); 
>  this->dicomReader->Update();
>  
> However, the spacing[2], namely spacing between slices, is uncorrect.
>  
> Hope your help!
>  
>  
> Regards,
>  
> Yixun Liu
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users




More information about the Insight-users mailing list