[Insight-users] Bug in DICOM reader for 4D data?

frankmiller at jhmi.edu frankmiller at jhmi.edu
Tue Feb 6 15:28:11 EST 2007


You concern is valid. I have not tested this but I am 99% sure that my
approach temporally allocates twice as much memory then is actually
needed in the final pixel container because all the inputs to a filter
are updated before it gets updated. So during GenerateData() in the
TileImageFilter, all the 3D input volumes (the outputs from the
ImageSeriesReader's) and the output 4D volumes exist.

To make it such that only one 3D volume exists at any point in time, you
would have to write a composite filter so you could control when the 3D
volumes are allocated. If you are going to do this, you might as well go
one step further such that only one 2D slice exists at any point in
time. I think this is the ideal solution.

To phrase it another way, the ideal solution is an
"ImageSeriesSeriesReader" that builds an n-dimensional image from
multiple n-2 dimensional image files. This would look very similar to
the ImageSeriesReader but have a method that takes a 

  std::vector< std::vector< std::string > > 

or something similar. I think that such a filter would be a nice
addition to ITK. 

Frank

On Tue, Feb 06, 2007 at 09:35:12AM -0700, Matthias Schabel wrote:
> Frank,
> 
> Thanks for the input; it seems like there are two options :  
> JoinSeriesImageFilter and TileImageFilter, with the latter
> being more generic. My main concern, and one which you may have  
> already tested, is that the filter not copy the
> underlying data - if it does, then you essentially double your memory  
> requirements, at least transiently. Of course,
> there are smarter ways to do it such as preallocation of the 4D  
> volume followed by population one 3D "slice" at a
> time, but I don't know if that's how these filters actually work... I  
> suppose I should just test it out, though it would be
> nice for the DICOM reader to gracefully handle the common case of 4D  
> r-t data...
> 
> Matthias
> 
> >Matthias,
> >
> >I to am working with 4D MRI data and prefer to have it as a single 4D
> >volume. The method suggested in the 2004-May post doest work  
> >because the
> >ImageSeriesReader has no information about the fourth dimension. It  
> >sees
> >one big stack of 2D images.
> >
> >My approach to this is to organize the images in my file system
> >as a series of directories grouped by time index. i.e. all slices from
> >time index 0 in directory 000/, all slices from time index 1 in
> >directory 001/, and so on. I then load the slices from each directory
> >into a 3D volume in the usual way with itk::ImageSeriesReader and use
> >the itk::TileImageFilter to group the 3D volume together into a 4D
> >volume.
> >
> >This solution seems less then ideal but it works.  Let me know if you
> >have any questions.
> >
> >Frank
> >
> >On Tue, Feb 06, 2007 at 12:18:27AM -0700, Matthias Schabel wrote:
> >> As per Luis' suggestion in a previous (fairly old) post (here :
> >> http://public.kitware.com/pipermail/insight-users/2004-May/ 
> >008568.html),
> >> I am attempting to get ITK to correctly read a 4D (time+volumetric)
> >> dynamic MRI data set. With filenames ordered following the suggested
> >> grouping (chunked first by acquisition time, then by slice), when I
> >> attempt to read, I end up with a 1 x 1620 x 192 x 176 volume. While
> >> the total number of voxels is correct, this should in fact be a 90 x
> >> 18 x 192 x 176 volume. I have already verified independently that
> >> the time stamps are identical for all slices for each  
> >acquisition, so
> >> this seems to me to be a bug in the DICOM reader. I really would  
> >prefer
> >> to have the data in the form of a single 4D volume rather than a
> >> vector of 3D slices - any suggestions/workarounds?
> >>
> >> Thanks,
> >>
> >> Matthias
> >
> ----------------------------------------------------------------
> Matthias Schabel, Ph.D.
> Assistant Professor, Department of Radiology
> Utah Center for Advanced Imaging Research
> 729 Arapeen Drive
> Salt Lake City, UT  84108
> 801-587-9413 (work)
> 801-585-3592 (fax)
> 801-706-5760 (cell)
> 801-484-0811 (home)
> mschabel at ucair dot med dot utah dot edu
> ----------------------------------------------------------------
> 
> 
> 
> 
> 
> 
> 
> 

> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list