[ITK Community] Subimages
Bradley Lowekamp
blowekamp at mail.nih.gov
Fri Mar 7 09:08:02 EST 2014
Yes, you can use the ITK pipeline and run the Extract filter on demand. If you want a memory efficient way to deal with sub-images, you use the ITK pipeline with an Extract filter and don't store them. You could choose to store you 4D image in memory, or stream read it from disk if you really want to minimize you memory foot print.
If you want an efficient way to process 3d sub volumes of the 4d volume you may want to look into the SliceBySliceImageFilter:
http://www.itk.org/Doxygen/html/classitk_1_1SliceBySliceImageFilter.html
Hope that help,
Brad
On Mar 7, 2014, at 2:50 AM, Polfliet Mathias <mpolflie at etro.vub.ac.be> wrote:
> It does help, thank you Brad. Just making sure I understood it clearly. What you mean is that I should use the Extract image filter every time I need the 3D slice? Instead of the way I do it now: Use it once, store all the separate 3D images into a std::vector and when I need them, I call the pointer from memory.
>
> With kind regards,
>
> Mathias
>
> On 06 Mar 2014, at 13:35, Bradley Lowekamp <blowekamp at mail.nih.gov> wrote:
>
>> Hello,
>>
>> Using the Extract image filter in a streaming fashion is very efficient. Additionally the filter can be run "in-place" so no copy of the data is required. What is your file type and how is is stored?
>>
>> Just create an ExtractImageFilter connected to connected to a reader/series reader, then only update the Extract filter not the Reader. This will cause just a region of interest to be read and stream the pipeline. As long as the ImageIO supports streaming or you have a series, the IO/memory should be quite minimal.
>>
>> Hope that help,
>> Brad
>>
>> On Mar 6, 2014, at 3:31 AM, Cyril Jaudet <drcjaudet at gmail.com> wrote:
>>
>>> Hi,
>>> i have a similar problem to use a registration process on 4dPET images there is a multivolume explorer module architecture that seems to access in an efficient way to the multivolume data in 3Dslicer but it use vtk :
>>> https://github.com/fedorov/MultiVolumeExplorer
>>> Best Regards,
>>> Jaudet Cyril, PSRPM, PhD
>>>
>>> Département d'Ingénierie et de Physique Médicale
>>>
>>> Institut Claudius Regaud
>>>
>>> 20-24, rue du Pont Saint-Pierre - 31052 Toulouse Cedex
>>>
>>> Tél. interne:4801 /Tél. externe : 05 67 69 63 46
>>>
>>>
>>> E-mail : jaudet.cyril at claudiusregaud.fr
>>>
>>>
>>> 2014-03-06 9:07 GMT+01:00 Polfliet Mathias <mpolflie at etro.vub.ac.be>:
>>> Dear ITK community,
>>>
>>> Is there an elegant, CPU and/or memory efficient way provided in the source code to store or get “subimages" ( such as a single 2D slice in a 3D volume or a single time point in a 4D series)? Some functions I use take Images as input so I cannot use Regions. For example if I were to take a 4DCT image and I want to work on a single time point ( i.e. a 3D image), I would have to use ITK::ExtractImageFilter. This method, however, becomes very memory intensive because the 4DCT is loaded into the memory and (in my case) every separate 3D slice as well. Is there an elegant or CPU/Memory friendly way to work around this?
>>>
>>> With kind regards,
>>>
>>> Mathias Polfliet
>>> PhD Student Vrije Universiteit Brussel
>>> _______________________________________________
>>> Community mailing list
>>> Community at itk.org
>>> http://public.kitware.com/cgi-bin/mailman/listinfo/community
>>>
>>> _______________________________________________
>>> Community mailing list
>>> Community at itk.org
>>> http://public.kitware.com/cgi-bin/mailman/listinfo/community
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140307/1ada5c41/attachment-0002.html>
More information about the Community
mailing list