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

Luis Ibanez luis.ibanez at kitware.com
Sat Apr 29 14:53:18 EDT 2006


Hi Yixun,

Please don't use DICOMImageIO2, nor DICOMImageIO,

You should use GDCMImageIO which is the class that
provides better support for DICOM reading in ITK.


If the DICOM slices are not consecutive, you will
have problems reading the slices.


Why do you have slices that are non-consecutive ?
Is your dataset incomplete ?



    Regards,


      Luis



==================
Yixun Liu wrote:
> Hi Luis,
> Thank your help!
> Yes I compare it with the dicom header.
>  
> One question. If the dicom files are not consecutive. Could ITK read 
> them correctly?
>  
> Another question. I use DICOMImageIO2 and DicomImageIO to read a same 
> series. The DICOMImageIO2 can read  the spacing[2] correctly, but 
> DICOMImageIO is error. Why?
>  
> Regards,
>  
> Yixun Liu
>  
>  
>  
> 
> ----- Original Message -----
> From: "Luis Ibanez" <luis.ibanez at kitware.com>
> To: "Yixun Liu" <yxliu at fudan.edu.cn>
> Cc: "ITK" <insight-users at itk.org>
> Sent: Friday, April 28, 2006 9:17 PM
> Subject: Re: [Insight-users] why not ITK can read the spacing correctly?
> 
> 
>  >
>  > 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
>  >
>  >
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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