[ITK] 转发: ITK try to read 4D dicom time series(3d, t), but get 3d*t

Chen, Lifan LCHEN41 at mgh.harvard.edu
Wed Feb 24 11:22:34 EST 2016


Hey all,

Any help would be appreciated. This problem really gets me in for couple of days.

Thanks,
Lifan
________________________________
发件人: Chen, Lifan
发送时间: 2016年2月23日 17:48
收件人: community at itk.org
主题: ITK try to read 4D dicom time series(3d, t), but get 3d*t

Hi all,

These days, I am trying to use ITK to handle 4D dicom series (3d+t). I use GDCMSeriesFileNames to generate seriesUIDs and ImageSeriesReader to read these images.

The following is part of my code:
typedef double    PixelType;
typedef itk::Image< PixelType, 4>         Image4DType;                  //4D image type
typedef itk::Image< PixelType, 3>         Image3DType;                  //3D image type
typedef itk::ImageSeriesReader< Image4DType >        ReaderType;
typedef itk::GDCMImageIO       ImageIOType;
reader = ReaderType::New();
dicomIO = ImageIOType::New();
typedef itk::GDCMSeriesFileNames NamesGeneratorType;
NamesGeneratorType::Pointer nameGenerator = NamesGeneratorType::New();
nameGenerator->AddSeriesRestriction("0008|0021");
nameGenerator->SetUseSeriesDetails(true);
nameGenerator->SetDirectory(_filename);
typedef std::vector< std::string >    SeriesIdContainer;
const SeriesIdContainer & seriesUID = nameGenerator->GetSeriesUIDs();
_isFileLoaded = !(seriesUID.empty());
if (true == _isFileLoaded){
SeriesIdContainer::const_iterator seriesItr = seriesUID.begin();
SeriesIdContainer::const_iterator seriesEnd = seriesUID.end();
std::string seriesIdentifier = seriesUID.begin()->c_str();
typedef std::vector< std::string >   FileNamesContainer;
FileNamesContainer fileNames;
fileNames = nameGenerator->GetFileNames(seriesIdentifier);
reader->SetFileNames(fileNames);
reader->SetImageIO(dicomIO);
reader->Update();
}

I have tried this code and the reader worked well. However I got a [x,y,z*t, 1] data, but not [x, y, z, t] data. I understand the problem may caused by nameGenerator, but I use SetUseSeriesDetails and AddSeriesRestriction("0008|0021")(aquisition time)which are implied by documents to handle 4d images.I have also tried several methods but all not work. I wonder whether ITK have an original method to handle 4d images.

Have anyone ever met this problem before? Any help or recommendations would be appreciated.

Thanks,
Lifan


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20160224/7c413235/attachment.html>


More information about the Community mailing list