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.42k stars 664 forks source link

Use Resample over WarpImageFilter in Examples #809

Open blowekamp opened 5 years ago

blowekamp commented 5 years ago

These two filers apply deformation fields to images ( and vector images ). The same functionality now exist in the ResampleImageFilter.

Should these filters be deprecated to avoid confusion?

blowekamp commented 5 years ago

@thewtex @ntustison @hjmjohnson Any thought on these classes?

hjmjohnson commented 5 years ago

@blowekamp I am in favor of deprecating as long a documentation clearly expresses how to get the same results with ResampleImageFilter (Including an example refactoring).

Thanks Brad.

blowekamp commented 5 years ago

Here is list of examples which use the WarpImageFilter:

Filtering/WarpImageFilter1.cxx
RegistrationITKv3/DeformableRegistration10.cxx
RegistrationITKv3/DeformableRegistration16.cxx
RegistrationITKv3/DeformableRegistration17.cxx
RegistrationITKv3/DeformableRegistration2.cxx
RegistrationITKv3/DeformableRegistration3.cxx
RegistrationITKv3/DeformableRegistration5.cxx
RegistrationITKv3/DeformableRegistration9.cxx
RegistrationITKv3/LandmarkWarping2.cxx
RegistrationITKv4/DeformableRegistration10.cxx
RegistrationITKv4/DeformableRegistration16.cxx
RegistrationITKv4/DeformableRegistration17.cxx
RegistrationITKv4/DeformableRegistration2.cxx
RegistrationITKv4/DeformableRegistration3.cxx
RegistrationITKv4/DeformableRegistration5.cxx
RegistrationITKv4/DeformableRegistration9.cxx
RegistrationITKv4/LandmarkWarping2.cxx

Looks like step one is to update those examples to use the ResampleImageFilter.

blowekamp commented 5 years ago

We need to figure out what to do with the ITKv3 Registration examples...

hjmjohnson commented 5 years ago

The ITKv3 examples should definitely be deprecated, and I would recommend removing them (as they are now confusing to users who accidentally end up in that directory.

hjmjohnson commented 5 years ago

On second thought, perhaps we should just move them out of the "examples" directory and into a "testing" subdirectory as they may still have code coverage utility.

ITKv6 should evaluate if the ITKv3 framework is completely removed.

blowekamp commented 5 years ago

I agree that it is important to keep them as testing while we have the ITKv3 registration framework still there.

Tangentially related, ITKv4 registration framework now sounds old. Perhaps is would have been better to call the old one "legacy" registration framework, and just call the current one "the registration framework". I'm not sure how often it's called ITKv4 registration framework.

blowekamp commented 5 years ago

It would take quite a bit of effort to fully remove the warp filters now. There are a number of filters still using them.

The examples are the important things to update now to just use the ResampleImageFilter. I'll try to knock these off little by little.

hjmjohnson commented 5 years ago

It would take quite a bit of effort to fully remove the warp filters now. There are a number of filters still using them.

The examples are the important things to update now to just use the ResampleImageFilter. I'll try to knock these off little by little.

@blowekamp Thanks. I appreciate the efforts.

dzenanz commented 5 years ago

Can this now be closed? There was some work on this topic over the past month.

blowekamp commented 5 years ago

There is still quite a number of examples which should be updated.

dzenanz commented 5 years ago

I just noticed compile errors in non-default module ITKFEMRegistration: C:\Dashboard\ITK\Modules\Registration\FEM\include\itkFEMRegistrationFilter.h(166): error C2061: syntax error: identifier 'VectorInterpolateImageFunction' [C:\Dashboard\ITK-build\Modules\Registration\FEM\test\ITKFEMRegistrationTestDriver.vcxproj]. Is this on your radar @blowekamp?

blowekamp commented 5 years ago

Nope, I hadn't seen this before. Is it more related to one of my changes or @maekclena changes?

dzenanz commented 5 years ago

Failures started on 2019-07-08. The probable culprit is 9ef036a9cbc2a9f42059f4574fdcf4f0fc83bf88, by @maekclena.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.