[ITK] help

Abu-Sammour, Denis Denis.Abu-Sammour at medma.uni-heidelberg.de
Tue Apr 28 05:19:43 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/20150428/676adfca/attachment.html>


More information about the Community mailing list