# 3D image registration with Python and without SimpleITK

**URL:** <https://discourse.itk.org/t/3d-image-registration-with-python-and-without-simpleitk/4773>\
**Category:** Beginner Questions\
**Tags:** registration, python\
**Created:** [February 1, 2022, 5:56pm UTC](https://discourse.itk.org/t/3d-image-registration-with-python-and-without-simpleitk/4773 "2022-02-01T17:56:26Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [February 1, 2022, 6:53pm UTC](https://discourse.itk.org/t/3d-image-registration-with-python-and-without-simpleitk/4773/2 "2022-02-01T18:53:29Z")

</div>

The main problem is that `fixed_image = itk.ImageFileReader.New(FileName="itk_hello_registration.in1.vtk").GetOutput()` created a UC3 image, instead of F3 image which you seem to expect.

Additionally, `itk.ImageRegistrationMethodv4.New()` creates registration instantiated for F2 → F2 image types by default. The trick is to specify F3.

Attached is a program which runs without error on my computer. I took a look at the files on disk, but they are all all-zeroes.

[edgar\_mwe.py](https://discourse.itk.org/uploads/short-url/v2jPUbpGc3HXfmMHad1B46sER0o.py) (6.9 KB)

---

_[View the full topic](https://discourse.itk.org/t/3d-image-registration-with-python-and-without-simpleitk/4773)._
