# To v4 or not to v4

**URL:** https://discourse.itk.org/t/to-v4-or-not-to-v4/7459
**Category:** Beginner Questions
**Created:** [March 14, 2025, 10:14am UTC](https://discourse.itk.org/t/to-v4-or-not-to-v4/7459 "2025-03-14T10:14:57Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![spinicist](https://discourse.itk.org/user_avatar/discourse.itk.org/spinicist/32/183_2.png) [@spinicist](https://discourse.itk.org/u/spinicist)
#### Post date: [March 14, 2025, 10:14am UTC](https://discourse.itk.org/t/to-v4-or-not-to-v4/7459/1 "2025-03-14T10:14:57Z")

</div>

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](https://discourse.itk.org/t/imageregistrationmethodv4-crashes-unexpectedly/5268/2) but I thought it was worth asking in a specific thread.

---

<div class="post-metadata">

### Author: ![zivy](https://discourse.itk.org/user_avatar/discourse.itk.org/zivy/32/1726_2.png) [@zivy](https://discourse.itk.org/u/zivy)
#### Post date: [March 14, 2025, 12:36pm UTC](https://discourse.itk.org/t/to-v4-or-not-to-v4/7459/2 "2025-03-14T12:36:53Z")

</div>

Hello @spinicist,

Short answer: yes. See [The Insight ToolKit image registration framework](https://www.frontiersin.org/journals/neuroinformatics/articles/10.3389/fninf.2014.00044/full) 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.

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [March 14, 2025, 1:16pm UTC](https://discourse.itk.org/t/to-v4-or-not-to-v4/7459/3 "2025-03-14T13:16:00Z")

</div>

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

---

<div class="post-metadata">

### Author: ![spinicist](https://discourse.itk.org/user_avatar/discourse.itk.org/spinicist/32/183_2.png) [@spinicist](https://discourse.itk.org/u/spinicist)
#### Post date: [March 15, 2025, 12:14am UTC](https://discourse.itk.org/t/to-v4-or-not-to-v4/7459/4 "2025-03-15T00:14:47Z")

</div>

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](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](https://docs.itk.org/en/latest/migration_guides/itk_6_migration_guide.html) 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!

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [March 15, 2025, 2:37pm UTC](https://discourse.itk.org/t/to-v4-or-not-to-v4/7459/5 "2025-03-15T14:37:52Z")

</div>

We surely can improve the wording. Can you make a PR to [this file](https://github.com/InsightSoftwareConsortium/ITK/blob/master/Documentation/docs/migration_guides/itk_6_migration_guide.md#remove-support-for-itkv4-interfaces) with your preferred wording?

---

<div class="post-metadata">

### Author: ![spinicist](https://discourse.itk.org/user_avatar/discourse.itk.org/spinicist/32/183_2.png) [@spinicist](https://discourse.itk.org/u/spinicist)
#### Post date: [March 17, 2025, 11:16am UTC](https://discourse.itk.org/t/to-v4-or-not-to-v4/7459/6 "2025-03-17T11:16:36Z")

</div>

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

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [March 17, 2025, 12:30pm UTC](https://discourse.itk.org/t/to-v4-or-not-to-v4/7459/7 "2025-03-17T12:30:46Z")

</div>

Migration guides ([5-\>6](https://github.com/InsightSoftwareConsortium/ITK/blob/master/Documentation/docs/migration_guides/itk_6_migration_guide.md) and [4-\>5](https://github.com/InsightSoftwareConsortium/ITK/blob/master/Documentation/docs/migration_guides/itk_5_migration_guide.md)) 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).
