[Insight-users] Re sampleImageFilter and multithreading.
Pete79
pkoniusz at hotmail.com
Sat Oct 17 21:08:31 EDT 2009
Luis Ibanez wrote:
>
> 1) Did you enable ITK_USE_REVIEW in CMake ?
> 2) Did you enable ITK_USE_OPTIMIZED_REGISTRATION_METHODS in CMake ?
>
Hiyah, thanks for such a prompt reply. From CMakeCache.txt I can gather the
following:
ITK_USE_REVIEW:BOOL=OFF
ITK_USE_OPTIMIZED_REGISTRATION_METHODS-ADVANCED:INTERNAL=1
Are these flags set up to enable the desired functionality? Should I change
anything?
Luis Ibanez wrote:
>
> 3) Are you reusing the instances of the filter in any way ?
>
Each instance is always instantiated by New within each thread separately.
There is no object reusing amongst different threads involved. I'm aware
majority of filters are not multithread-safe in such sense. The only thing
is ROI filters use the same image as input, but I assume reading is in
general safe in multithreading scenarios. Besides, I already experimented
with sequential execution of all code by synchronising it by the Critical
Sections. Outcome is still the same though :/
Luis Ibanez wrote:
>
> 4) Try calling SetNumberOfThreads(1) on all the instances
> of the Resample filter, before you call Update on them.
>
It is already done. Prior to this, threads used to crash by random chance.
Now, at least they don't crash.
Many thanks,
Peter
--
View this message in context: http://www.nabble.com/ResampleImageFilter-and-multithreading.-tp25942385p25943188.html
Sent from the ITK - Users mailing list archive at Nabble.com.
More information about the Insight-users
mailing list