[ITK-users] streaming TileImageFilter for arbitrary number of inputs
Grothausmann, Roman Dr.
grothausmann.roman at mh-hannover.de
Thu Jul 21 06:41:56 EDT 2016
Dear mailing list members,
Based on the examples for TileImageFilter I've created a working CLI to append
an arbitrary number of inputs
(https://github.com/romangrothausmann/ITK-CLIs/blob/4fdf5778022598dcf83fb38e6002df72bd67bef3/tile.cxx).
As there is an example that does not apply Update and DisconnectPipeline on the
readers
(https://itk.org/Doxygen/html/SphinxExamples_2src_2Filtering_2ImageGrid_2AppendTwo3DVolumes_2Code_8cxx-example.html#_a2)
I changed my code such that a reader instance is created for each input in a
for-loop:
https://github.com/romangrothausmann/ITK-CLIs/commit/ebfc0aea37d28cbbf2bb22c3f56be52453cebde9
However, the update from the writer seems not to propagate to the readers
whether streaming or not. Can the TileImageFilter not stream in such a case or
are further modifications necessary?
Thanks for any help or hints
Roman
On 18/08/14 17:01, Michka Popoff wrote:
> Hi
>
> Going the way described in the CreateVolume example is the way to go.
>
> Why did you uncomment the DisconnectPipeline() call and Update() call in the for
> loop ? They need to stay there, else you will always use the last image.
> That’s why you see the same image, the single update call will be triggered at
> the end of the script and read only one image.
>
> You don’t need to call tileFilter->Update(), you can remove this line. The
> writer->Update() will take care of the pipeline update.
> As a bonus, you may wrap your writer->Update() call, to fetch errors at the end
> of the pipeline:
>
> try
> {
> writer->Update();
> }
> catch( itk::ExceptionObject & error )
> {
> std::cerr << "Error: " << error << std::endl;
> return EXIT_FAILURE;
> }
>
> I made a little Python prototype, the syntax is a little bit different than in
> C++ but it gives you the main idea.
>
> Michka
>
--
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-2900
More information about the Insight-users
mailing list