InsightSoftwareConsortium / ITK

Insight Toolkit (ITK) -- Official Repository. ITK builds on a proven, spatially-oriented architecture for processing, segmentation, and registration of scientific images in two, three, or more dimensions.
https://itk.org
Apache License 2.0
1.38k stars 661 forks source link

Add inverse capability to KernelTransform #4529

Open dzenanz opened 3 months ago

dzenanz commented 3 months ago

PR Checklist

N-Dekker commented 3 months ago

Please add a test.

It would be nice to have a test that converts a small (e.g. 8x8) image A to B, using KernelImage, and then from B to C, using its inverse. Then EXPECT_EQ(C, A) 😃

dzenanz commented 3 months ago

Just as I was making a pull request, I realized that a test is needed. I don't really have time to make a meaningful test (aside from the use in my own program). I also see that https://github.com/InsightSoftwareConsortium/ITK/blob/17a221c0c17dad59755e08c3df618125247334aa/Modules/Core/Transform/test/itkTestTransformGetInverse.cxx#L119 is crashing, probably meaning the inversion method I added is not thread-safe. It would be good if someone took over this PR (I am eying you Niels 😄). Otherwise it is likely going to fester for a long time.

N-Dekker commented 3 months ago

It would be good if someone took over this PR

I can ask next week if it may be of interest to elastix. But otherwise this PR does not have a high priority to me. Does it have priority to you? If so, then I think you should try to make it ready, including a simple little test 🤷 Otherwise, just postpone until the summer 🌞 holidays 😸

dzenanz commented 3 months ago

It is not of high priority to me either. So it would be good if you added it to your TODO list for summer holidays 😄