[ITK-users] [ITK] Reading 4d image using SimpleITK
Timothee Evain
tevain at telecom-paristech.fr
Wed Feb 3 07:04:41 EST 2016
Hello,
I'm not an user of SimpleITK, but it seems that you can now build the library with an cmake option to support 4D images (since release ~0.9?).
If you are able to do so, you can then use the ExtractImageFilter to get your 3D/2D data : http://www.itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1ExtractImageFilter.html
HTH,
Tim
----- Mail original -----
De: "Cyril Mory" <cyril.mory at uclouvain.be>
À: insight-users at itk.org
Envoyé: Mercredi 3 Février 2016 10:22:42
Objet: [ITK] [ITK-users] Reading 4d image using SimpleITK
Hi ITK users,
I have more or less the same goal as Andriy had five years ago: I need to read a 4D image, and extract 2D slices from it to serve as figures in a paper. I was wondering if there was a quick way to break my 4D image down into 3D images using SimpleITK.
Cyril
On Wed, Dec 14, 2011 at 5:06 PM, Bradley Lowekamp
< blowekamp at mail.nih.gov > wrote:
> 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. > Ok, makes sense.
> You just indicate that you want to read the image. What do you plan on doing with it after that? > At this point, I just want to do some plotting of time course curves.
I will break it down into individual time frames, and load
frame-by-frame, no big deal.
Thank you.
> 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 >>> >>>
_____________________________________
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.php
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://public.kitware.com/mailman/listinfo/insight-users
_______________________________________________
Community mailing list
Community at itk.org
http://public.kitware.com/mailman/listinfo/community
More information about the Insight-users
mailing list