<meta http-equiv="content-type" content="text/html; charset=utf-8"><div class="gmail_quote">On Mon, Feb 28, 2011 at 8:26 AM, john smith <span dir="ltr">&lt;<a href="mailto:mkitkinsightuser@gmail.com">mkitkinsightuser@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi to everyone,<br><br> I am beginner in developing my own filter and I am trying to find the maximum value of a neighborhood of 9 pixels and put this value into one pixel value of the output image. I am wandering if I could operate on my input image without using any iterators and using in their places index references, like in C. To be more specific, I suppose that I devide my input image into neighborhoods of nine pixels. The reference, to this pixels is made by using their index, for example (i,j)  for the central pixel and (i-1,j-1), (i,j-1), (i+1,j-1), (i-1,j), (i+1,j), (i-1,j+1), (i,j+1), (i+1,j+1) for the rest 8 pixels of the neighborhood. Could someone write how the for and while loops would look like, if it is possible to operate this way? I am using visualstudio 2010 and cmake.<br>

<br>Thanks in advance<br></blockquote><div><br></div><div>This is exactly what the neighborhood iterator does:</div><div> </div><meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="http://www.itk.org/Wiki/ITK/Examples/Iterators/ConstNeighborhoodIterator">http://www.itk.org/Wiki/ITK/Examples/Iterators/ConstNeighborhoodIterator</a><br clear="all">
<br><div>David </div></div>