# BSpline to deformation field Error

**URL:** <https://discourse.slicer.org/t/bspline-to-deformation-field-error/503>\
**Category:** Support\
**Created:** [June 14, 2017, 3:53pm UTC](https://discourse.slicer.org/t/bspline-to-deformation-field-error/503 "2017-06-14T15:53:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![eladam](https://avatars.discourse-cdn.com/v4/letter/e/a183cd/32.png) [@eladam](https://discourse.slicer.org/u/eladam)\
**Post date:** [June 14, 2017, 3:53pm UTC](https://discourse.slicer.org/t/bspline-to-deformation-field-error/503/1 "2017-06-14T15:53:51Z")

</div>

Hello,

I have been trying to work with the BSpline to deformation field module, but it doesn’t seem to work.

As an input I provided the transform that I acquired from the General Registration (BRAINS) module through the procedure of BSpline.

The error I am getting is:  
Can’t Create IO object for file /tmp/Slicer/DHCF\_AxHfBfcEAABABA.mrml#vtkMRMLBSplineTransformNode1  
BSpline to deformation field terminated with an unknown exception.

The Slicer version I am using is 4.6.2. Is there a way to resolve this?

Thank you,  
Eleni

---

<div class="post-metadata">

**Author:** ![ihnorton](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ihnorton/32/9_2.png) [@ihnorton](https://discourse.slicer.org/u/ihnorton)\
**Post date:** [June 14, 2017, 4:09pm UTC](https://discourse.slicer.org/t/bspline-to-deformation-field-error/503/2 "2017-06-14T16:09:30Z")

</div>

Please try a recent nightly. I believe this was caused by the `dynamic_cast` issues in ITK, which have been resolved.

---

<div class="post-metadata">

**Author:** ![eladam](https://avatars.discourse-cdn.com/v4/letter/e/a183cd/32.png) [@eladam](https://discourse.slicer.org/u/eladam)\
**Post date:** [June 14, 2017, 5:38pm UTC](https://discourse.slicer.org/t/bspline-to-deformation-field-error/503/3 "2017-06-14T17:38:12Z")

</div>

Again, there is the error:

terminate called after throwing an instance of 'itk::ExceptionObject’  
what(): /home/kitware/Dashboards/Nightly/Slicer-0-build/ITKv4/Modules/IO/TransformBase/include/itkTransformFileReader.hxx:130:  
itk::ERROR: TransformFileReaderTemplate(0x20f6330):  
Could not create Transform IO object for reading file /tmp/Slicer/HJHD\_AxHfdDeEAAJIdA.mrml#vtkMRMLBSplineTransformNode1  
File does not exists! Tried to create one of the following:  
HDF5TransformIOTemplate  
HDF5TransformIOTemplate  
MatlabTransformIOTemplate  
MatlabTransformIOTemplate  
TxtTransformIOTemplate  
TxtTransformIOTemplate  
You probably failed to set a file suffix, or  
set the suffix to an unsupported type.

I tried entering a transform with .h5 .tfm and .mat suffix, still the same error appears.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 14, 2017, 6:04pm UTC](https://discourse.slicer.org/t/bspline-to-deformation-field-error/503/4 "2017-06-14T18:04:58Z")

</div>

BSpline to deformation field module only works for the old-style ITK bspline transform that we don’t use anymore.

Use Convert section in Transform module to convert any transform to displacement field.

---

<div class="post-metadata">

**Author:** ![eladam](https://avatars.discourse-cdn.com/v4/letter/e/a183cd/32.png) [@eladam](https://discourse.slicer.org/u/eladam)\
**Post date:** [June 14, 2017, 6:15pm UTC](https://discourse.slicer.org/t/bspline-to-deformation-field-error/503/5 "2017-06-14T18:15:35Z")

</div>

Thank you, this worked!

Best,  
Eleni

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [February 21, 2020, 3:22pm UTC](https://discourse.slicer.org/t/bspline-to-deformation-field-error/503/6 "2020-02-21T15:22:21Z")

</div>

A post was split to a new topic: [General Registration (BRAINS) error](https://discourse.slicer.org/t/general-registration-brains-error/10383)
