[Insight-users] itk::MultiThreader

Luis Ibanez luis.ibanez at kitware.com
Sun Dec 12 21:35:37 EST 2010


Hi Murmur,

Any reason for not using the standard ITK methods:

*  BeforeThreadedGenerateData()
*  ThreadedGenerateData()
*  AfterThreadedGenerateData()

??



You may find useful the following tutorials:

http://www.na-mic.org/Wiki/images/b/bc/Insight-Writing-a-New-Filter.ppt
http://www.na-mic.org/Wiki/images/2/24/Insight-MultiThreading.ppt


      Regards


            Luis


-------------------------------------

On Sun, Dec 12, 2010 at 10:02 AM, murmur <pneher at gmx.de> wrote:
>
> Hi,
> I'm using the MultiThreader to create a worker thread processing the
> GenerateData() method of my itk filter. The worker thread is created via
> m_MultiThreader->SpawnThread(run, this); and the run(void *pInfoStruct)
> method calls GenerateData(). This works fine, but now i want to know when
> the thread is finished to process the filter output. Can anyone tell me how
> this works?
> I tried to invoke an event at the very end of the GenerateData() method and
> created an observer for the filter in the main thread. The problem is, that
> the callback function for this observer is now processed in the worker
> thread but I want it to be processed in the main thread. Is that possible?
>
> Thanks in advance!
> --
> View this message in context: http://old.nabble.com/itk%3A%3AMultiThreader-tp30438781p30438781.html
> Sent from the ITK - Users mailing list archive at Nabble.com.
>
> _____________________________________
> 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.html
>
> 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://www.itk.org/mailman/listinfo/insight-users
>


More information about the Insight-users mailing list