<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Hi Kevin,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Using an offset other than 1 makes little sense to me. Can you check what is done in regular (non-vector) gradient magnitude?</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Regards,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Dženan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 2, 2015 at 2:49 PM, Kevin H. Hobbs <span dir="ltr"><<a href="mailto:hobbsk@ohio.edu" target="_blank">hobbsk@ohio.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">For the attached program I see no difference in the output between<br>
<br>
radius[0] = 1;<br>
radius[1] = 1;<br>
radius[2] = 1;<br>
<br>
and<br>
<br>
radius[0] = 8;<br>
radius[1] = 8;<br>
radius[2] = 8;<br>
<br>
The RadiusType m_NeighborhoodRadius is set, printed, and used to expand<br>
the requested region but the gradient calculations use central<br>
differences only between pixels adjacent to the neighborhood center :<br>
<br>
d_phi_du[i][j] = ... it.GetNext(i)[j] - it.GetPrevious(i)[j]...<br>
<br>
Should these be :<br>
<br>
NeighborhoodIndexType ri = m_NeighborhoodRadius[i];<br>
d_phi_du[i][j] = ... it.GetNext(i,ri)[j] - it.GetPrevious(i,ri)[j]...<br>
<br>
?<br>
<br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">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" rel="noreferrer" target="_blank">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" rel="noreferrer" target="_blank">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" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br></div>