Is it possible to use itk registration v4 algorithms such as SyN or Time Varying Velocity Field transforms in the ITKPython package. I installed the itk package and am doing something like this
primary_image_path = "fix.png"
reader = itk.ImageFileReader[itk.Image.SS2].New()
reader.SetFileName(primary_image_path)
reader.Update()
primary_image = reader.GetOutput()
secondary_image_path = "mov.png"
reader = itk.ImageFileReader[itk.Image.SS2].New()
reader.SetFileName(secondary_image_path)
reader.Update()
secondary_image = reader.GetOutput()
filt = itk.PDEDeformableRegistrationFilter[itk.Image.SS2, itk.Image.SS2, itk.Image.VF22].New()
filt.SetFixedImage(primary_image)
filt.SetMovingImage(secondary_image)
filt.Update()
This throws a runtime error
RuntimeError: /work/ITK-source/ITK/Modules/Registration/PDEDeformable/include/itkPDEDeformableRegistrationFilter.hxx:198:
ITK ERROR: PDEDeformableRegistrationFilter(0x558f99fafec0): FiniteDifferenceFunction not of type PDEDeformableRegistrationFilterFunction