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

Dženan Zukić dzenanz at gmail.com
Wed Feb 24 12:46:57 EST 2016


Hi Lifan,

did you examine the DICOM headers? Do different timepoints have different
acquisition times?

Regards,
Dženan

On Wed, Feb 24, 2016 at 11:22 AM, Chen, Lifan <LCHEN41 at mgh.harvard.edu>
wrote:

> 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.
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20160224/b39ba63d/attachment.html>


More information about the Community mailing list