greedy icon indicating copy to clipboard operation
greedy copied to clipboard

itkv5 progress

Open mschachter opened this issue 4 years ago • 5 comments

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?

mschachter avatar Dec 09 '20 15:12 mschachter

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 avatar Jan 06 '21 17:01 pyushkevich

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.

pyushkevich avatar Jan 12 '21 20:01 pyushkevich

Thanks Paul! I'll check it out soon.

mschachter avatar Jan 20 '21 13:01 mschachter

Hi, Any news about the ITK5 branch? Thanks.

BorisMansencal avatar Dec 19 '23 09:12 BorisMansencal

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.

BorisMansencal avatar Dec 19 '23 11:12 BorisMansencal