[ITK-users] CenteredTransformInitializer Python Wrapping

Sami Koho sami.koho at gmail.com
Thu Aug 27 02:14:20 EDT 2015


Hello,

I tried to convert a registration method that I have to use the
CenteredSimilarity2DTransform instead of the CenteredRigid2DTransform in
Python. There seems to be a problem however, as the
CenteredTransformInitializer in Python only seems to work with the rigid
transforms now. The wrapping file looks like this:

itk_wrap_include("itkVersorRigid3DTransform.h")
itk_wrap_include("itkCenteredRigid2DTransform.h")
itk_wrap_class("itk::CenteredTransformInitializer" POINTER)
    itk_wrap_filter_dims(d 3)
    if(d)
        foreach(t ${WRAP_ITK_SCALAR})

itk_wrap_template("VR3DT${ITKM_D}${ITKM_I${t}${d}}${ITKM_I${t}${d}}"
"itk::VersorRigid3DTransform< ${ITKT_D}
>,${ITKT_I${t}${d}},${ITKT_I${t}${d}}")
        endforeach()
    endif(d)

    itk_wrap_filter_dims(d 2)
    if(d)
        foreach(t ${WRAP_ITK_SCALAR})

itk_wrap_template("CR2DT${ITKM_D}${ITKM_I${t}${d}}${ITKM_I${t}${d}}"
"itk::CenteredRigid2DTransform< ${ITKT_D}
>,${ITKT_I${t}${d}},${ITKT_I${t}${d}}")
        endforeach()
    endif(d)
itk_end_wrap_class()

How would I go about fixing this? Should I just add a new line, like:

 itk_wrap_template("CS2DT${ITKM_D}${ITKM_I${t}${d}}${ITKM_I${t}${d}}"
"itk::CenteredSimilarity2DTransform< ${ITKT_D}
>,${ITKT_I${t}${d}},${ITKT_I${t}${d}}")

inside the if(d)...endif(d) for the 2D images? I could of course just try,
but I thought to ask, as compilation always takes a while with the Python
wrapping :-)

Best,

Sami
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20150827/dede0b5f/attachment.html>


More information about the Insight-users mailing list