<div>On Mon, Jul 18, 2011 at 10:35 AM, Dawood AlMasslawi <span dir="ltr">&lt;<a href="mailto:masslawi@gmail.com">masslawi@gmail.com</a>&gt;</span> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Following the same logic it should return the neighborhood index of <div>
<br></div><div>the pixel which the constant iterator is currently accessing.<div>
<br></div><div>In the wiki example since the radius of the neighborhood is set</div>
<div><br></div><div>equal to the size of the image I guess it returns the number of the pixel</div><div><br></div><div>as the iterator walks from the top left to the bottom right.</div><div><br></div><div>Hence the neighborhood index would start with 0 and end with </div>


<div><br></div><div>number of pixels minus 1.</div><div><br></div><div>Still, 199 and 241 seems a bit much, the image has only 100 pixels!!</div><div><br></div><font color="#888888"><div><br></div><div>Dawood<br></div></font></div>
</blockquote></div></div></div></blockquote><div><br></div><div>I see. I changed it to:</div><div><br></div><div>itk::Size&lt;2&gt; radius;</div><div>radius.Fill(1);</div><div>IteratorType iterator(radius, image, image-&gt;GetLargestPossibleRegion());</div>
<div><br></div><div>and now the output is:</div><div><br></div><div><div>New position: </div><div>At [0, 0]</div><div>1 -&gt; [0, -1] = 0</div><div>At [0, 0]</div><div>7 -&gt; [0, 1] = 0</div></div><div><br></div><div>Which makes sense, because I set the (0,1) and (0,-1) pixels as active, so if the neighborhood positions are indexed as:</div>
<div><br></div><div>0 1 2</div><div>3 4 5</div><div>6 7 8</div><div><br></div><div>that makes sense. I don&#39;t know what the issue was with the larger radius - maybe it just isn&#39;t designed to have a radius on the order of the size of the image?</div>
<div><br></div><div>David </div></div>