[Insight-users] Multithreading Custom Filters

Jayme Kosior jckosior@ucalgary.ca
Thu May 13 23:42:56 EDT 2004


--Apple-Mail-1-954277390
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed

Hello.

I am starting to experiment with creating my own custom filters and I 
have a question regarding multithreaded filters in ITK.

1. As I understand it, if it is possible to thread the filter's task, 
then the developer only needs to override the ThreadedGenerateData() 
method and provide the filter's implementation.  Then, the ImageSource 
base class takes care of breaking the image up into multiple regions 
that can be processed in separate threads.  Is my understanding 
correct?

If this is how it works, what scheme does the MultiThreader class use 
to decide how to partition the image into regions?  For example, does 
it look at how many processors are on the system? The complexity of the 
operation? etc.

2. There is a method in the base class ProcessObject called 
SetNumberOfThreads().  Should developers use this method?  Or does the 
ITK multithreading framework use this method to implement the above 
scheme.

Thank you for time.

Jayme
--Apple-Mail-1-954277390
Content-Transfer-Encoding: 7bit
Content-Type: text/enriched;
	charset=US-ASCII

Hello.


I am starting to experiment with creating my own custom filters and I
have a question regarding multithreaded filters in ITK.


1. As I understand it, if it is possible to thread the filter's task,
then the developer only needs to override the
<bold>ThreadedGenerateData()</bold> method and provide the filter's
implementation.  Then, the <bold>ImageSource</bold> base class takes
care of breaking the image up into multiple regions that can be
processed in separate threads.  Is my understanding correct?


If this is how it works, what scheme does the
<bold>MultiThreader</bold> class use to decide how to partition the
image into regions?  For example, does it look at how many processors
are on the system? The complexity of the operation? etc.


2. There is a method in the base class <bold>ProcessObject</bold>
called <bold>SetNumberOfThreads()</bold>.  Should developers use this
method?  Or does the ITK multithreading framework use this method to
implement the above scheme.


Thank you for time.


Jayme
--Apple-Mail-1-954277390--




More information about the Insight-users mailing list