3D image registration with Python and without SimpleITK

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 (6.9 KB)

2 Likes