[Insight-users] WrapITK: image registration

Paolo Zaffino p.zaffino at yahoo.it
Thu Dec 5 10:10:16 EST 2013


Dear all,
I think that I have fixed the problem.
itk::CenteredTransformInitializer was not wrapped for 2D images (in my 
case I'm working in Python).
As you suggested I edited the 
Modules/Registration/Common/wrapping/itkCenteredTransformInitializer.wrap file 
and now the new feature is available!
I attached the patch in case you would merge it into the main tree.

Thank you very much for your support!
Best regards.
Paolo


On 04/12/2013 19:11, Bradley Lowekamp wrote:
> Here is the cmake wrap code used wrap that class:
>
> https://github.com/Kitware/ITK/blob/master/Modules/Registration/Common/wrapping/itkCenteredTransformInitializer.wrap
>
> You may be able to customize it for your needs.
>
> Brad
>
>
> On Dec 4, 2013, at 12:24 PM, Paolo Zaffino <p.zaffino at yahoo.it 
> <mailto:p.zaffino at yahoo.it>> wrote:
>
>> Thanks a lot for the replies!
>> I would like to be able to execute something like the example files 
>> about registration but from Python.
>>
>> I compiled ITK4.4 with the Python wrapper enabled (chosing 2D and 3D).
>> All work fine, but I don't find itk.CenteredTransformInitializer for 
>> 2D images...is it "normal"?
>>
>> Thank you very much.
>> Regards.
>> Paolo
>>
>>
>> On 02/12/2013 16:46, Bradley Lowekamp wrote:
>>> Hello,
>>>
>>> To assit with the development of the registration framework in SimpleITK could you please share features you were hoping were exposed in SimpleITK? Along with how you were hoping to be able to use it?
>>>
>>> Thanks,
>>> Brad
>>>
>>> On Dec 1, 2013, at 4:35 PM, Paolo Zaffino<p.zaffino at yahoo.it>  wrote:
>>>
>>>> Dear all,
>>>> is there a way to execute image registration using simpleITK?
>>>>
>>>> Thank you very much.
>>>> Regards.
>>>> Paolo
>>>> _____________________________________
>>>> Powered bywww.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://www.itk.org/mailman/listinfo/insight-users
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20131205/082dd14b/attachment.htm>
-------------- next part --------------
--- itkCenteredTransformInitializer.wrap	2013-12-05 15:57:40.901903762 +0100
+++ itkCenteredTransformInitializer.wrap	2013-12-05 15:58:33.735239381 +0100
@@ -1,4 +1,5 @@
 itk_wrap_include("itkVersorRigid3DTransform.h")
+itk_wrap_include("itkCenteredRigid2DTransform.h")
 itk_wrap_class("itk::CenteredTransformInitializer" POINTER)
     itk_wrap_filter_dims(d 3)
     if(d)
@@ -6,4 +7,11 @@
           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(t)
     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(t)
+    endif(d)
 itk_end_wrap_class()


More information about the Insight-users mailing list