[Insight-users] why not ITK can read the spacing
Markus Weigert
m.weigert at fz-juelich.de
Fri Apr 28 12:20:51 EDT 2006
Hi Luis,
he may be right.
I also encountered problems when reading certain
DICOM - MR - files and rendering the volume using the SliceView class.
Sometimes, the spacing is set to a value of 1.0 in z - direction,
although this is apparently wrong.
Using non itk - programms to display the image,
it is shown in the right way.
Regards,
Markus
Luis Ibanez wrote:
<
<
<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
>
>
> ------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20060428/e89a5098/attachment.html
More information about the Insight-users
mailing list