[Insight-users] Streaming and multi-threading

Matt McCormick matt.mccormick at kitware.com
Tue Nov 27 13:53:52 EST 2012


Hi Jack,

>
> I have some general questions regarding streaming and multi-threading in itk
> that I couldn't easily figure out from the web searches:

Section 13.3 of the Insight Software Guide is helpful here:

  http://www.itk.org/ItkSoftwareGuide.pdf

>
> - If threadedGenerateData() implemented for a filter, does it mean it's both
> streamable & multithreaded? Or is there another independent mechanism for a
> filter to be streamable?

ThreadedGenerateData will back it multithreaded but not necessarily streamable.

The method GenerateInputRequestedRegion() and similar methods
determine if a filter is streamable.  If a filter requires the
LargestPossibleRegion of its input, it is not streamable.

>
> - Generally itk will try to use all available cores, but it appears that the
> number of streams has to be manually set. Does this mean that each stream
> will be multi-threaded?

Yes, each stream will be multi-threaded.

>
> - In a pipeline, if just one filter isn't streamable, would that mean the
> whole pipeline isn't streamable? Will such a pipeline simply cause an error,
> or does itk have some mechanism for detecting and warning these cases?



More information about the Insight-users mailing list