[ITK] [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/community/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/community/attachments/20161231/57985a59/attachment.png>
-------------- next part --------------
_____________________________________
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