[Insight-users] Problem with wrapping itk with python 2.3

Luis Ibanez luis.ibanez at kitware.com
Sun Nov 22 20:21:00 EST 2009


The type of "ParametersType" is

  typedef  Array< double >           ParametersType;

and it is declared in

        Insight/Code/Common/itkTransformBase.h


Hope this information may help.


    Luis




---------------------------------------------------------------------
2009/11/18 Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>:
>
> Le 18 nov. 09 à 17:45, alex sando a écrit :
>
>>  hi Gaëtan , currently I am trying the registration function of ITK under
>> python :), Here is my Code:
>>
>>        transformer = itk.TranslationTransform[itk.D, 2].New()
>>        optimizer = itk.RegularStepGradientDescentOptimizer.New()
>>        interpolator = itk.LinearInterpolateImageFunction[itk.Image.US2,
>> itk.D].New()
>>        metric =
>> itk.MeanSquaresImageToImageMetric[itk.Image.US2,itk.Image.US2].New()
>>        registration_object =
>> itk.ImageRegistrationMethod[itk.Image.US2,itk.Image.US2].New()
>>        registration_object.SetMetric(metric.GetPointer())
>>        registration_object.SetOptimizer(optimizer.GetPointer())
>>        registration_object.SetTransform(transformer.GetPointer())
>>        registration_object.SetInterpolator(interpolator.GetPointer())
>>        registration_object.SetFixedImage(convertor.GetOutput())
>>        registration_object.SetMovingImage(convertor1.GetOutput())
>>
>>  registration_object.SetFixedImageRegion(convertor.GetOutput().GetBufferedRegion())
>>
>>        parameters =
>> itk.ImageRegistrationMethod[itk.Image.US2,itk.Image.US2].TranslationTransform[itk.D,
>> 2].TransformParametersType(transformer.GetNumberOfParameters())


More information about the Insight-users mailing list