[ITK-users] Itk Python GetParameters

D'Isidoro Fabio fisidoro at ethz.ch
Sat Dec 31 05:13:44 EST 2016


Hallo,

within the context of exploring the domain of an image metric (MeanSquaresImageMetric1.cxx), I want to check the current parameters used for the translation transform:

parameters = transform.GetParameters()
parameters[0] = dx
parameters[1] = dy
metric.SetParameters( parameters )


If I then code:


print(metric.GetParameters())


I get the proxy of Swig Object, from which I can't see the parameters.

[cid:image001.png at 01D26356.608C9950]

I have tried in many ways:


print(metric.GetParameters()[0])
print(metric.GetParameters()[1])

print(metric.GetTransform().GetParameters())

print(metric.GetTransform().GetParameters().GetElement(0))

but none of them works.

How can I get the elements from the Swig Object?

Thank you!

Fabio

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20161231/57985a59/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 3700 bytes
Desc: image001.png
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20161231/57985a59/attachment.png>


More information about the Insight-users mailing list