[ITK-users] Splitting and repasting a volume with overlap

Bradley Lowekamp blowekamp at mail.nih.gov
Mon Mar 16 09:00:00 EDT 2015


Hello,

The RegionOfInterestImageFilter[1] is very similar to the ExtractImageFilter, but returns an image whose starting index is always zeros.

The process you described is remarkable close to what occur in each filter for the multi-threading process.  Also what occurs in the StreamingImageFilter is very similar, but just copies the region.

As you didn't mention you motivation for chunking the data this way be it for threading or memory requirements, I can't fully advise. 

Brad


[1 ]http://www.itk.org/Doxygen/html/classitk_1_1RegionOfInterestImageFilter.html
[2] https://github.com/InsightSoftwareConsortium/ITK/blob/b184194869ac6407fcbb4e309710894cfc84466f/Modules/Core/Common/include/itkStreamingImageFilter.hxx#L194-L213


On Mar 16, 2015, at 7:37 AM, Pol Monsó Purtí <lluna.nova at gmail.com> wrote:

> Hello everyone,
> 
> We need to split a volume into pieces, overlaped by a certain amount, do some computation and then repaste them.
> 
> The computation requires the pieces' region indexes to be set to zero. The original volume might not have index at zero, but be a subregion itself.
> 
> What is the best way to achieve this?
> 
> I've thought of the following pipeline:
> 
> 1. imageRegionSplitterSlowDimension
> 2. Store the index and size of each region
> 3. manually increase the size of each region (and modify index)
> 4. crop with the largestPossibleRegion of the original volume (to prevent requesting more than available)
> iterate over regions:
>       5. extractImageFilter
>       6. disconnect pipeline for each region
>       7. reset indexes
>       8. perform computation
>       9. crop with the regions in step 1 to remove the added overlap
>       10. restore indexes
> 11. pasteImageFilter
> 
> I'll have to think of a smart way to deal with the index restore/cropping of steps 9 and 10.
> 
> I somehow feel somebody will have already dealt with this... And there's certainly a better way to do it.
> _____________________________________
> 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



More information about the Insight-users mailing list