# ITK4 cannot read ITK5 .h5 transform files

**URL:** <https://discourse.itk.org/t/itk4-cannot-read-itk5-h5-transform-files/3264>\
**Category:** Engineering\
**Tags:** transformfileread\
**Created:** [July 4, 2020, 3:11am UTC](https://discourse.itk.org/t/itk4-cannot-read-itk5-h5-transform-files/3264 "2020-07-04T03:11:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lassoan](https://discourse.itk.org/user_avatar/discourse.itk.org/lassoan/32/27_2.png) [@lassoan](https://discourse.itk.org/u/lassoan)\
**Post date:** [July 4, 2020, 3:11am UTC](https://discourse.itk.org/t/itk4-cannot-read-itk5-h5-transform-files/3264/1 "2020-07-04T03:11:32Z")

</div>

It seems that simple AffineTransform\_double\_3\_3 saved with ITK 5.1 in HDF format cannot be loaded with ITK 4.13. Here is an example file: [https://github.com/vinkirk/public/raw/master/Xfm\_acpc.h5](https://github.com/vinkirk/public/raw/master/Xfm_acpc.h5)

Is this intentional?  
Does ITK5 stores transforms differently or is it a HDF incompatibility issue?

---

<div class="post-metadata">

**Author:** ![blowekamp](https://discourse.itk.org/user_avatar/discourse.itk.org/blowekamp/32/79_2.png) [@blowekamp](https://discourse.itk.org/u/blowekamp)\
**Post date:** [July 4, 2020, 11:46am UTC](https://discourse.itk.org/t/itk4-cannot-read-itk5-h5-transform-files/3264/2 "2020-07-04T11:46:47Z")

</div>

Andras,

There was a name correction to a field in the HDF5 Transform format in ITKv5. This name correction was added to the ITKv4 branch for forward support:

> <https://github.com/InsightSoftwareConsortium/ITK/commit/321bd266fc8ea68037b28b404c56184068eb1e50#diff-323970afa7a755bd3ced698834de7c11>

ITKv5 supports reading the original misspelled field along with the corrected field. ITKv5 writes the corrected field.

Have a good one.  
🎆

---

<div class="post-metadata">

**Author:** ![lassoan](https://discourse.itk.org/user_avatar/discourse.itk.org/lassoan/32/27_2.png) [@lassoan](https://discourse.itk.org/u/lassoan)\
**Post date:** [July 4, 2020, 3:37pm UTC](https://discourse.itk.org/t/itk4-cannot-read-itk5-h5-transform-files/3264/3 "2020-07-04T15:37:47Z")

</div>

I see, thank you for the explanation. Making ITK4 forward compatible is a nice touch.

It is always hard to decide between doing “the right thing” and preserving compatibility, but users should be able to tolerate breaking changes when a new major version of the library is released.
