Hi all, I am writing you with a crash I encountered while experimenting with the GeodesicActiveContour image filter with shape guidance. Although I did not find the root cause of the problem, I did implement a small change which might be a useful contribution.
Currently, the GeodesicActiveContourShapePriorLevelSetImageFilter is based on a SparseField solver. For my application, this was not very suitable and I implemented a version of this image filter based on a dense solver. After doing this, however, I consistently experienced a crash in the algorithm when more than one thread was used. After some debugging, I tracked down the problem to itkPCAShapeSignedDistanceFunction, which contains a smart pointer member variable which caused the crash in the multithreaded run. In particular, it seemed to me that the reference counting somehow got confused, and things went wrong. I did not feel comfortable enough to dig deeper into the root cause of the problem, but I did do a simple fix to the itkPCAShapeSignedDistanceFunction code that avoids the problem, which I would like to share (see attach). Basically, I replaced the problematic reference counting member variable by a raw pointer, so that during iteration no reference counting takes place. In this particular case, I think that this change does not impose any risks as there is no issue with ownership or life time management. I am unsure if this mailing list is the best or correct medium to report this, so if not, please point me to the right direction. If somebody would be interested in looking at the root cause of this issue, I should be able to provide some code to reproduce the crash. Just let me know. Best regards, Yves
fix.patch
Description: Binary data
_______________________________________________ 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
