InsightSoftwareConsortium / ITKIsotropicWavelets

External Module for ITK, implementing Isotropic Wavelets and Riesz Filter for multiscale phase analysis.
Apache License 2.0
13 stars 11 forks source link

ENH: Add compatibility with new threaders #81

Closed phcerdan closed 6 years ago

phcerdan commented 6 years ago

Follow up from #79

phcerdan commented 6 years ago

Thanks for the review @dzenanz. In base class I now have DynamicThreadedGenerateData() instead of the tuple: GenerateData() + ThreadedComputeSomethingAtBase(). And the derived class is untouched with the tuple GenerateData() + ThreadedComputeSomethingAtDerived().

Just a note for self future reference, as we have talked, renaming of the DynamicThreadedGenerateData() in the derived class is necessary, or Superclass::GenerateData() will also call it because it's virtual.

EDIT: This is not tricky as it might sound, we wanted to remove the barrier, so we use the single threaded GenerateData, and call ThreadedFunctions from it, DynamicThreadedGenerateData is used when the filter can use multiple threads from start to finish.