[Insight-users] re:re:why not ITK can read the spacing correctly?
Karthik Krishnan
Karthik.Krishnan at kitware.com
Sat Apr 29 12:09:52 EDT 2006
You should use GDCMImageIO for all your DICOM needs. The Dicom classes
you are using are obsolete and may even be removed from the toolkit.
There should be several examples using GDCMImageIO in Examples/IO
bye
-karthik
On Sat, 2006-04-29 at 08:45 +0800, 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