[ITK] [ITK-users] help

Abu-Sammour, Denis Denis.Abu-Sammour at medma.uni-heidelberg.de
Wed Apr 29 03:04:19 EDT 2015


Dear itk Community,

I am a fresh user of itk and c++ as well. I am trying to implement a new metric (similarity measure) to be used for image registration which is not available in the metrics provided by itk. I have seen comments on how to do that which simply stated to take a metric that is already implemented in itk such as "MeanSquaresImageToImageMetric" and modify the content specifically GetValue (), GetDerivative  () and GetValueAndDerivative () members.

Now I have found a itkMeanSquaresImageToImageMetric.txx on the web which I suppose is a templated class code (http://www.na-mic.org/svn/Slicer3-lib-mirrors/trunk/Insight/Code/Algorithms/itkMeanSquaresImageToImageMetric.txx).  As a primitive itk and cpp user, what I have in mind is to copy and paste the content of this class into my code, modify the GetValue (), GetDerivative () and GetValueAndDerivative () functions and rename anything that says  "MeanSquaresImageToImageMetric" with my own metric i.e. "MyMetric". Afterwards link it to the registration as outlined in the itk examples. Is that the way to go for it?!

Additionally, in the "itkMeanSquaresImageToImageMetric.txx" there is also #include "itkMeanSquaresImageToImageMetric.h", should I leave it as is or modify it to #include "itkImageToImageMetric.h" instead? I am a bit lost here..

Thanks you for your time and consideration.

Denis


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20150429/23025f62/attachment.html>
-------------- 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