[Insight-users] 4d support itkGDCMImageIO multifile MRI non-enhanced
Jose Ignacio Prieto
joseignacio.prieto at gmail.com
Tue Jul 9 15:58:07 EDT 2013
Hi all,
I don't know if this is an itk or gdcm issue. When I try to load a file of
20 frames and 100 slices per frame, using the pipe exposed here, the itk
object has dimension [288,288,2000,1] instead of [288,288,100,20]
The problem to me seems to be that in the file itkImageSeriesReader.hxx
line 185 says :
dimSize[this->m_NumberOfDimensionsInImage] = m_FileNames.size();
and because every image is 2D, then dimSize[2]=2000.
I think there may be a connection between itkGDCMImageIO and
itkImageSeriesReader, that always thinks that it is a 3D volume and never
checks the 0018,1060 tag.
Here is the gdcmdump of the series:
https://www.dropbox.com/s/bxytgpt0gprhuly/gdcmdump.txt
What can I do?
Thanks.
Pipeline:
typedef unsigned short PixelType;
const unsigned int Dimension3 = 3;
const unsigned int Dimension4 = 4;
const PixelType lowerThreshold = atoi( argv[7] );
typedef itk::Image< PixelType, Dimension3> ImageType3D;
typedef itk::Image< PixelType, Dimension4 > ImageType;
typedef itk::ImageSeriesReader< ImageType > ReaderType;
ReaderType::Pointer reader = ReaderType::New();
typedef itk::GDCMImageIO ImageIOType;
ImageIOType::Pointer dicomIO = ImageIOType::New();
reader->SetImageIO( dicomIO );
typedef itk::GDCMSeriesFileNames NamesGeneratorType;
NamesGeneratorType::Pointer nameGenerator = NamesGeneratorType::New();
nameGenerator->SetDirectory( argv[9]);
typedef std::vector< std::string > SeriesIdContainer;
const SeriesIdContainer & seriesUID = nameGenerator->GetSeriesUIDs()
;
SeriesIdContainer::const_iterator seriesItr = seriesUID.begin();
SeriesIdContainer::const_iterator seriesEnd = seriesUID.end();
std::string seriesIdentifier;
seriesIdentifier = seriesUID.begin()->c_str();
typedef std::vector< std::string > FileNamesContainer;
FileNamesContainer fileNames;
fileNames = nameGenerator->GetFileNames( seriesIdentifier );
reader->SetFileNames( fileNames );
reader->Update();
--
José Ignacio Prieto
celular(nuevo): 94348182
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130709/8257ca68/attachment.htm>
More information about the Insight-users
mailing list