<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Yes, that makes sense!<div><br></div><div>In the past I also had some trouble with neighborhood iterators of a </div>
<div><br></div><div>large radius, so I guess they are not utilized for that use. Probably</div><div><br>
</div><div>it has something to do with the boundary condition, every time I</div><div><br></div><div>iterated near the boundaries somethings went wrong!</div><div><br></div><font color="#888888"><div>Dawood</div></font><div>
<div></div><div class="h5"><div><br></div><div><br></div><div>
<br><div class="gmail_quote">On Mon, Jul 18, 2011 at 9:02 PM, David Doria <span dir="ltr"><<a href="mailto:daviddoria@gmail.com" target="_blank">daviddoria@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Mon, Jul 18, 2011 at 10:35 AM, Dawood AlMasslawi <span dir="ltr"><<a href="mailto:masslawi@gmail.com" target="_blank">masslawi@gmail.com</a>></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><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<2> radius;</div><div>radius.Fill(1);</div><div>IteratorType iterator(radius, image, image->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 -> [0, -1] = 0</div><div>At [0, 0]</div><div>7 -> [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't know what the issue was with the larger radius - maybe it just isn't designed to have a radius on the order of the size of the image?</div>
<div><br></div><font color="#888888"><div>David </div></font></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br>