To v4 or not to v4

Hello,

For a new project, are the “v4” versions of registration algorithms to be preferred over the ones without a suffix? Does the impending release of ITK 6 have any impact on this choice? I’ve been away from using ITK for several years so have lost track of such issues.

I already asked this here ImageRegistrationMethodv4 crashes Unexpectedly - #2 by spinicist but I thought it was worth asking in a specific thread.

Hello @spinicist,

Short answer: yes. See The Insight ToolKit image registration framework for details about the v4 framework.

Long answer: The v4 suffix are the “newer” ITK registration framework which was implemented early-mid 2010s. The registration related classes without the suffix belong to the original ITK registration framework and were kept for backwards compatibility. Many projects depended on the original framework and it could not be removed without causing a significant amount of disruption to many people. You may find some classes implemented there useful/interesting, as the original and newer registration framework are different, though it is recommended to stick with the v4 framework.

2 Likes

There are no plans of removing the original registration framework (classes without v4 suffix), in ITK 6, or any foreseeable future version.

1 Like

Thanks @zivy, I had forgotten about that paper. I suppose the next question is whether this is explicitly documented somewhere? https://itk.org/ItkSoftwareGuide.pdf uses the v4 versions, but most of the code examples seem to use the older versions. Hence my confusion.

@dzenanz Can I suggest the ITK 6 migration guide ITK v6 Migration Guide - ITK's documentation is reworded please, or at least a note added to the " Remove support for ITKv4 interfaces" section? While I now understand this to be an unfortunate naming collision, when reading it quickly I started to worry that the v4 algorithms were about to be removed!

1 Like

We surely can improve the wording. Can you make a PR to this file with your preferred wording?

Can you give me an example of a function that has been/will be removed in ITK 6 that was in ITK 4 please?

Migration guides (5->6 and 4->5) list the changes. Example of a thing removed is itk::Barrier class. Most removals occurred in 4->5 transition. In 5->6 transition, some functions/methods had their signature changed (mostly const qualifier).