[ITK] [ITK-dev] Patch for SpatialObject -- fixed regressions, testing with BRAINSTools

Williams, Norman K norman-k-williams at uiowa.edu
Fri Oct 31 11:18:54 EDT 2014


This doesn’t fix the general problem with thread safety that your patch to Transform::GetInverse exposed, but I believe it will fix the problem with BRAINSTools test regressions.  I’m testing that now.

It addresses (partially) the thread safety issue in the specific case of using a SpatialObject as a mask in the registration framework.  Instead of computing the inverse at every invocation of SpatialObject::IsInside,  it only computes it when the transform it depends on (the IndexToWorldTransform) .

Since a mask object (or any SpatialObject) is will not change its WorldToIndex transform during registration, the patch remove the crash due to more than one thread modifying the transform at the same time. It also removes potentially hundreds of thousands of calls to Transform::GetInverse() which can only improve performance.

I wonder why this simple-minded optimization never showed up on anyone’s radar before.

The topic in Gerrit is here:  http://review.source.kitware.com/#/c/17779/

It is also in the BRAINSia git fork of ITK: https://github.com/BRAINSia/ITK/tree/SpatialObjectInternalInverse



________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20141031/9ff02155/attachment-0001.html>
-------------- next part --------------
_______________________________________________
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://kitware.com/products/protraining.php

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://public.kitware.com/mailman/listinfo/insight-developers


More information about the Community mailing list