pyushkevich / greedy

Very fast greedy diffeomorphic registration code
GNU General Public License v3.0
59 stars 16 forks source link

itkv5 progress #20

Open mschachter opened 3 years ago

mschachter commented 3 years ago

Hi @pyushkevich - just wanted to give an update. I made lots of little changes to get ITK 5.1.2 compiling on this forked branch.

Now the bigger changes need to happen, the threading code needs to change in MultiComponent*ImageMetric.*, because they use itkBarrier.h. Looking at the ITK5 migration guide, it seems like there is a new strategy for multi-threading.

Could you take a look at the migration guide and let me know what you think the right approach is to refactoring here?

pyushkevich commented 3 years ago

I am sorry I haven't had a chance to look at this yet.

Looking over the docs, it seems that the pattern

GenerateData() //Not Threaded { this->AllocateOutputs(); this->BeforeThreadedGenerateData(); ParallelizeImageRegion(code1 as lambda) //code2 single-threaded ParallelizeImageRegion(code3 as lambda) this->AfterThreadedGenerateData(); }

should work well to replace the use of Barrier in greedy. I will try this when I get a chance but have a lot of ITK-SNAP coding to get through first.

pyushkevich commented 3 years ago

I have ported the code to ITK5. Please see the itk5 branch. I would appreciate if you could try testing it on some example data, I have added a couple tests but not complete code coverage.

mschachter commented 3 years ago

Thanks Paul! I'll check it out soon.

BorisMansencal commented 7 months ago

Hi, Any news about the ITK5 branch? Thanks.

BorisMansencal commented 7 months ago

Nevermind. The documentation is not up-ot-date. It seems that the master branch is now built with ITK 5.1.2 and VTK 9.1.0.