View Issue Details

IDProjectCategoryView StatusLast Update
0004679Slicer4Core: Segmentationpublic2019-03-15 02:58
ReporterphcerdanAssigned Topinter 
Status assignedResolutionopen 
Product Version 
Target VersionSlicer 4.11.0Fixed in Version 
Summary0004679: itkGrowCutSegmentationImageFilter.txx is not using multiple threads


It overrides both: GenerateData and ThreadedGenerateData
This is wrong. In ITK, GenerateData performs allocation of the output image and then calls BeforeThreads, ThreadedGenerateData (or DynamicThreadedGenerateData in itkv5) and AfterThreadsXXX.
If you want a single thread, you override GenerateData to avoid those calls (and you need to allocate the output manually).
If you want multi threads you override ThreadedGenerateData, or DynamicGenerateData in itkv5, but not GenerateData.

This filter overrides both, so GenerateData is called, but not ThreadedGenerateData.
In fact, ThreadedGenerateData is called when m_RunOneIteration is true, which is the opposite of what is intended.

I am going to "fix it" for the ITKv5 transition to just use the ITKv4 mechanism to avoid a compatibility error. But this should be tackled properly.

Suggestion. Remove GenerateData, and test if both implementations (the one in GenerateData and in ThreadedGenerateData) are compatible/solid.

TagsNo tags attached.


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2019-03-14 19:38 phcerdan New Issue
2019-03-14 19:38 phcerdan Status new => assigned
2019-03-14 19:38 phcerdan Assigned To => pinter
2019-03-15 02:58 jcfr Target Version => Slicer 4.11.0