[ITK-users] automated splitting and pasting of volumes for use in external programs

Dr. Roman Grothausmann grothausmann.roman at mh-hannover.de
Wed Apr 1 10:30:13 EDT 2015


It seems the the Minipipeline-example 
(http://www.itk.org/Wiki/ITK/Examples/Developer/Minipipeline) and the Itk User 
Guide 
(http://www.itk.org/Doxygen/html/classitk_1_1ImageSource.html#ab988dcc743020c2f4381996ba6503306) 
differ concerning grafting.
With the User Guide grafting of the input it works up to some percent of the 
StreamingImageFilter execution progress but then crashes with a Segmentation 
fault. (see 
https://github.com/romangrothausmann/ITK-CLIs/commit/51d6a3ffc3a74cfb2ccf711b1e3b18f0c65a9876)
With the infos given in the User Guide I'm confused what of a general Streaming 
Filter is needed for a simple Minipipeline Filter (Composit Filter). What I 
would need is a combination of the Streaming/Threaded example and the 
Minipipeline-example or the info what needs to be added/modified in the 
Minipipeline-example.
Is my understanding correct that grep-ing the itk sources for 
ThreadedGenerateData will list all filters that are capable of streaming unless 
they have special conditions on the InputRequestedRegion?
Will a multi-threaded filter pipeline be only single-threaded if connected to 
itkStreamingImageFilter?

Thanks for any help or hints.
Roman


On 31/03/15 21:10, Dr. Roman Grothausmann wrote:
> Dear Matt,
>
>
> Thanks for Your quick reply. If I got Your hint right, You suggest writing my
> own filter (that e.g. does the writing of the chunk to a file) and put an
> itkStreamingImageFilter after it supplying it with the # of chunks and the type
> of splitter. If I understand the ITK Software Guide correctly, such a filter
> needs to be threaded, i.e. have a ThreadedGenerateData.
> I tried that with a simple AddFilter that should just add a constant according
> to the chunk number to the region it is supposed to process (files attached).
> However it stops due to region miss-matches. I can't see why. With just
> GenerateData it seems like it is not streaming, according to the
> PipelineMonitorImageFilter.
> What would be the correct way to go?
>
> Many thanks for looking into this.
> Roman
>
> On 30/03/15 16:02, Matt McCormick wrote:
>> Hi Roman,
>>
>> You probably want to use the streaming capabilities of the ITK
>> pipeline.  This is covered in more detailed in the ITK Software Guide.
>> The pipeline internally uses ImageRegionSplitter classes. Overlaps are
>> handled by propagation of the RequestedRegion throughout the pipeline.
>> To monitor the changes in the regions, use the
>> PipelineMonitorImageFilter [1].
>>
>> HTH,
>> Matt
>>
>> [1] http://www.itk.org/Doxygen/html/classitk_1_1PipelineMonitorImageFilter.html
>>
>> On Mon, Mar 30, 2015 at 5:25 AM, Dr. Roman Grothausmann
>> <grothausmann.roman at mh-hannover.de> wrote:
>>> Dear mailing list members,
>>>
>>>
>>> A dataset I work on is too big to load completely into itksnap for manual
>>> adjustment of the automatic pre-segementation with watersheds. The full
>>> resolution is needed, so I cannot work with a re-sampled version. The only
>>> possible easy solution I see at the moment is to split up the 3D image into
>>> smaller blocks of sizes as equal as possible, do the itsnap interaction, and
>>> finally paste all blocks of the resulting segmentation back together.
>>> Would itkImageRegionSplitterMultidimensional be the right filter for the
>>> splitting of blocks as equal in size as possible?
>>> Is there a "logger" like e.g. itkXMLFileOutputWindow (as used in
>>> itkStreamingImageFilterTest2.cxx) that could be used to store the regions
>>> corresponding to each block-file to use that for itkPasteImageFilter to
>>> combine these blocks later again?
>>> Not needed now, but perhaps lager: Is there some nice way to handle overlaps
>>> in this case that is already implemented in itk, something like
>>> itkImageRegionSplitterMultidimensional::SetOverlap()?
>>>
>>> Many thanks for any help or hints.
>>> Roman
>>>
>>> On 17/03/15 18:13, Pol Monsó Purtí wrote:
>>>>
>>>> I guess the way to go would be to take the splitter (probably
>>>> ImageRegionSplitterMultidimensional now that I look at it) and extend it
>>>> to
>>>> support overlap. If I do it, I'll let you know in case it is of interest
>>>> to
>>>> anyone. For now I'll stick to my class.
>>>
>>>
>>>
>>> --
>>> Dr. Roman Grothausmann
>>>
>>> Tomographie und Digitale Bildverarbeitung
>>> Tomography and Digital Image Analysis
>>>
>>> Institut für Funktionelle und Angewandte Anatomie, OE 4120
>>> Medizinische Hochschule Hannover
>>> Carl-Neuberg-Str. 1
>>> D-30625 Hannover
>>>
>>> Tel. +49 511 532-9574
>>> _____________________________________
>>> 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
>
>
>
> _____________________________________
> 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
>

-- 
Dr. Roman Grothausmann

Tomographie und Digitale Bildverarbeitung
Tomography and Digital Image Analysis

Institut für Funktionelle und Angewandte Anatomie, OE 4120
Medizinische Hochschule Hannover
Carl-Neuberg-Str. 1
D-30625 Hannover

Tel. +49 511 532-9574


More information about the Insight-users mailing list