[Insight-users] Two WrapITK Questions

Brian Chapman chapmanbe at upmc.edu
Thu Dec 28 12:31:20 EST 2006


I have two WrapITK questions.

1) Has anyone successfully used the
itk.MultiResolutionImageRegistrationMethod? I am trying to translate the
example code in MultiResImageRegistration1.cxx to Python. When I start the
registration, I get the following error:

Starting registration
failed in main():  
/Users/brian/Sources/ITK/InsightToolkit-3.0.0/Code/Algorithms/itkMultiResolu
tionImageRegistrationMethod.txx:156:
itk::ERROR: MultiResolutionImageRegistrationMethod(0x10cf9e10): Size
mismatch between initial parameter and transform

I initialize the transform parameters with the array initialParameters:

In [62]: WrapITKUtils.print_itkArray(initialParameters)
<class 'itkArray.itkArrayDPtr'>
0 0.0   1 0.0  

In [63]: registration.SetInitialTransformParameters(initialParameters)

However, if I now look at the value stored in the registration's initial
transform parameters, its an empty array:

In [64]: 
WrapITKUtils.print_itkArray(registration.GetInitialTransformParameters())
<class 'itkArray.itkArrayDPtr'>

It seems as if the Set method is not working. Any thoughts?

2) I can't figure out the template syntax for objects like the interpolator
that I would define using object attributes in the interpreter as follows:

interpolator = itk.LinearInterpolateImageFunction.IF2D.New()

How would I create this using template arguments instead?

Thanks,

Brian



More information about the Insight-users mailing list