[Insight-users] Reading 4d image using SimpleITK

Bradley Lowekamp blowekamp at mail.nih.gov
Wed Dec 14 17:06:29 EST 2011


Hello,

On Dec 14, 2011, at 4:48 PM, Andriy Fedorov wrote:

> Bradley,
> 
> This is a DCE MRI time-resolved 3D volume. Dimensions IJK+time = 256x256x14+65.
> 
> I can read this file using ITK proper.
> 
> SimpleITK handles this correctly as expected, looking at the code -- I
> get the error message, no complaints here.
> 
> My question is whether there is something quick I can do in my
> checkout of SimpleITK code to enable reading 4d images. Is something
> like this possible?

Restricting the sitk::Image to 2D and 3D is one of the simplifications that we have made. We anticipated that for those doing time-series work an array of sitk::Images would suffice for a very large percentage of the users needing 4D data.

There is nothing really in the architecture that is specific to 2D and 3D. However, there are numerous compile assertions and other methods to ensure that we are only instantiating filters and objects as we expect to. So there is no quick way of enabling 4D images in simpleITK.

You just indicate that you want to read the image. What do you plan on doing with it after that?

Brad

> 
> AF
> 
> 
> 
> On Wed, Dec 14, 2011 at 4:39 PM, Bradley Lowekamp
> <blowekamp at mail.nih.gov> wrote:
>> Hello Andriy,
>> 
>> SimpleITK only supports 2D and 3D sitk::Images.
>> 
>> Could you please share a little more about the image you are trying to read?
>> What type is it and what is the meta data that ITK's ImageIO sees when it
>> reads the header (ie Number of Dimensions, Size of the dimensions, etc...)?
>> I would like to be able to reproduce your problem.
>> 
>> When ITK's ImageFileReader is instantiated over a dimension that is less
>> than that the file is reporting it will generally, just read that first
>> hyper-slice. We could do similar behavior is SimpleITK. Always try to read,
>> and print a warning if the dimensions is higher.
>> 
>> Another feature that is planned, is the support for reading ROI's. I had not
>> previously thought about the possibility of this feature enabling support
>> for reading higher dimension images into 3D images, but is may be possible.
>> 
>> Brad
>> 
>> ========================================================
>> 
>> Bradley Lowekamp
>> 
>> Medical Science and Computing for
>> 
>> Office of High Performance Computing and Communications
>> 
>> National Library of Medicine
>> 
>> blowekamp at mail.nih.gov
>> 
>> 
>> On Dec 14, 2011, at 4:29 PM, Andriy Fedorov wrote:
>> 
>> Hi,
>> 
>> I would like to be able to read a 4d image using SimpleITK.
>> 
>> Currently, this is not allowed
>> (https://github.com/SimpleITK/SimpleITK/blob/master/Code/IO/src/sitkImageFileReader.cxx#L44).
>> 
>> Can someone give me an idea what it takes to enable this feature?
>> 
>> Thanks
>> 
>> AF
>> _____________________________________
>> 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.html
>> 
>> 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://www.itk.org/mailman/listinfo/insight-users
>> 
>> 



More information about the Insight-users mailing list