[ITK] [ITK-users] GDCM Dicom reader
kamal.shahim at istb.unibe.ch
kamal.shahim at istb.unibe.ch
Thu Apr 23 09:07:06 EDT 2015
Hello,
I use following codes to read dicom series, but the output of spacing between slices is sometimes correct BUT not always:
// Read the input series
typedef itk::GDCMImageIO ImageIOType;
typedef itk::GDCMSeriesFileNames InputNamesGeneratorType;
ImageIOType::Pointer gdcmIO = ImageIOType::New();
InputNamesGeneratorType::Pointer inputNames = InputNamesGeneratorType::New();
inputNames->SetInputDirectory( dirPath );
inputNames->AddSeriesRestriction("0020|0013");
// Then I select a series identifier and pass it to the reader:
typedef itk::ImageSeriesReader< CTImageType > ReaderType;
ReaderType::Pointer reader = ReaderType::New(); ;
reader->SetImageIO( gdcmIO );
reader->SetFileNames( inputNames->GetFileNames( seriesIdentifier.c_str() ));
reader->UpdateOutputInformation();
--->>> reader->GetOutput()->GetSpacing()[2] is not correct always!!
I use the latest version of ITK and GDCM library.
Thanks a lot for your help,
Regards,
Kamal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20150423/74f1fc33/attachment.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users
More information about the Community
mailing list