[ITK] [ITK-users] CenteredTransformInitializer Python Wrapping
Sami Koho
sami.koho at gmail.com
Thu Aug 27 05:38:45 EDT 2015
Hello again,
I fixed the wrapping issue. I thought that I might submit a patch to ITK, but I have a question. I am using the ITK version 4.8.0, which I obtained with a checkout from the GIT repository. Is it totally fine that I create the Patch for the 4.8.0 release, or should I switch to the main branch?
Best,
Sami
> On 27 Aug 2015, at 09:14, Sami Koho <sami.koho at gmail.com> wrote:
>
> 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
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users
More information about the Community
mailing list