[Insight-users] Cannot run the Resampling filter

Karthik Krishnan karthik.krishnan at kitware.com
Sun Nov 29 23:50:53 EST 2009


On Sun, Nov 29, 2009 at 4:36 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> On any filter, you can filter->SetNumberOfThreads(1);
>
> See if that works.
>
> Even though we fixed the problem, we should look at the possibility of
> making itk::KdTree thread safe.

Ouch. It isn't thread safe..

The methods invoked by a user (and Motes here) are const methods on
the KdTree. But most of its ivars are mutable ! Perhaps the
implementation should be modified to ensure that the those mutable
ivars were done away with, (or if unavoidable mutexed).

I've added a documentation to the class' header file to that effect.
Actually I should add it to the relevant methods, but from a cursory
examination, it seems to apply to most const queries.

Thanks
--
karthik


More information about the Insight-users mailing list