[ITK-users] ImageToImageMetric in Python
Jagjeet Nain
jagjeet.nain at gmail.com
Wed Apr 9 11:40:36 EDT 2014
Hi Sven,
if it is a Translation Transform, then try this.
import itk
displacement = itk.TranslationTransform[itk.F,dimension].New()
where dimension looks to be 3 in your case.
BR
JN
On Tue, Apr 8, 2014 at 5:34 PM, Prevrhal, Sven <Sven.Prevrhal at philips.com>wrote:
> I am looking at the itk Software Guide to figure out how to implement
> this in Python. I have:
>
>
>
> nccMetric = itk.*NormalizedCorrelationImageToImageMetric*
> .IF3IF3.New()
>
> nccMetric.SetTransform(itk.*IdentityTransform*.D3.New())
>
> nccMetric.SetInterpolator(itk.
> *NearestNeighborInterpolateImageFunction*.IF3D.New())
>
> nccMetric.SetFixedImage(fixedImage)
>
> nccMetric.SetMovingImage(movingImage)
>
>
>
> which I believe works fine. I am getting stumped by the translation of
> this to Python:
>
>
>
> # ITK software guide page 390
>
> # C++ code: MetricType::TransformParametersType displacement( Dimension
> );
>
> displacement = nccMetric.??
>
>
>
> After which
>
>
>
> value = nccMetric.GetValue( displacement )
>
>
>
> should work fine. Anybody knows this?
>
>
>
> Regards,
>
> Sven
>
>
>
> *Sven Prevrhal*
>
> Philips Research
>
>
>
> ------------------------------
> The information contained in this message may be confidential and legally
> protected under applicable law. The message is intended solely for the
> addressee(s). If you are not the intended recipient, you are hereby
> notified that any use, forwarding, dissemination, or reproduction of this
> message is strictly prohibited and may be unlawful. If you are not the
> intended recipient, please contact the sender by return e-mail and destroy
> all copies of the original message.
>
> _____________________________________
> 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://www.itk.org/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20140409/38c97180/attachment.html>
More information about the Insight-users
mailing list