<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hello,<div><br></div><div>You should look into the ANTSNeighborhoodCorrelationImageToImageMetricv4 [1] and the reference paper on the method. This is another neighborhood based metric.</div><div><br></div><div>From an ITK design perspective, the sample of the image is independent of the metric. For your subdividing, you may find that the regular grid sampling in the ImageToImageRegistrationMethodv4 to be suitable, or you may want to try a random sampling.</div><div><br></div><div>HTH,</div><div>Brad</div><div><br></div><div>[1] <a href="http://www.itk.org/Doxygen/html/classitk_1_1ANTSNeighborhoodCorrelationImageToImageMetricv4.html">http://www.itk.org/Doxygen/html/classitk_1_1ANTSNeighborhoodCorrelationImageToImageMetricv4.html</a></div><div><br><div><div>On Jun 15, 2015, at 9:50 AM, Abu-Sammour, Denis <<a href="mailto:Denis.Abu-Sammour@medma.uni-heidelberg.de">Denis.Abu-Sammour@medma.uni-heidelberg.de</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><font face="Calibri, sans-serif" size="2"><div>Hello,</div><div> </div><div>Thank you for your time in advance.</div><div> </div><div>I am trying to implement a new registration metric which is based on a patch-based  computation of gradient orientations i.e. subdividing images into sub-regions or cells and compute a histogram based on the orientations of the gradients inside each patch. I was told that the best way to proceed is to sneak into one of the implemented metrics in itk (to use the power of the source!).</div><div>Accordingly I looked into one of the easiest  metrics available namely “<b>itkMeanSquaresImageToImageMetricv4</b>” and found out that it is implemented using 4 different header files namely: “<b>itkMeanSquaresImageToImageMetricv4.h</b><b>”</b><b>,</b><b>“</b><b>itkMeanSquaresImageToImageMetricv4.hxx</b><b>”</b><b>,<span class="Apple-converted-space"> </span></b><b>“</b><b>itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.h</b><b>”</b><b>,<span class="Apple-converted-space"> </span></b>and<b><span class="Apple-converted-space"> </span>“</b><b>itkMeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader.hxx</b><b>”.</b></div><div> </div><div>The 1<font size="1"><sup>st</sup></font><span class="Apple-converted-space"> </span>header file says: “<b>see</b><b><span class="Apple-converted-space"> </span></b><b>MeanSquaresImageToImageMetricv4GetValueAndDerivativeThreader::ProcessPoint for algorithm implementation</b>”. When looking into that file it is noted that the values passed to that method are image pixel types (“<b>moving</b><b>ImageValue</b>” and “<b>fixedImageValue</b>”) and NOT the images themselves. Unfortunately, in my case –as described above- the metric computation depends on patches (cells) rather than on single pixel values. Therefore, Is there a way to pass on the images themselves to the ProcessPoint method? Or alternatively is there another metric that also depends on patch-based computation where the images themselves are getting passed on to the ProcessPoint method?</div><div> </div><div>Any suggestion would be appreciated.</div><div> </div><div>Kind regards</div><div> </div><div>Denis</div><div> </div></font>_____________________________________<br>Powered by<span class="Apple-converted-space"> </span><a href="http://www.kitware.com/">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br><a href="http://www.kitware.com/products/protraining.php">http://www.kitware.com/products/protraining.php</a><br><br>Please keep messages on-topic and check the ITK FAQ at:<br><a href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://public.kitware.com/mailman/listinfo/insight-users">http://public.kitware.com/mailman/listinfo/insight-users</a><br>_______________________________________________<br>Community mailing list<br><a href="mailto:Community@itk.org">Community@itk.org</a><br><a href="http://public.kitware.com/mailman/listinfo/community">http://public.kitware.com/mailman/listinfo/community</a></div></blockquote></div><br></div></body></html>