Hi David,<div><br></div><div>The GetNeighborhoodIndex method returns the index of the pixel at</div><div><br></div><div>an offset position from the center of the neighborhood, therefore this</div><div><br></div><div>method should have an offset as an argument. It's strange that you </div>
<div><br></div><div>didn't get any errors!</div><div><br></div><div>This method is implemented in "InsightToolkit\Code\Common\</div><div><br></div><div>itkNeighborhood.txx", line 184, check your version to make sure!</div>
<div><br></div><div>HTH,</div><div><br></div><div>Dawood</div><div><br></div><div><br></div><div>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<</div>
<div><br></div><div>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<</div>
<div><br></div><div><br></div><div><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><pre>In something like this:
<a href="http://www.itk.org/Wiki/ITK/Examples/Iterators/ShapedNeighborhoodIterator_Manual">http://www.itk.org/Wiki/ITK/Examples/Iterators/ShapedNeighborhoodIterator_Manual</a>
these lines:
std::cout << "New position: " << iterator.GetIndex() << std::endl;
std::cout << ci.GetNeighborhoodIndex() << " -> "
<< ci.GetNeighborhoodOffset() << " = " << ci.Get() << std::endl;
produce:
New position [8, 8]:
199 -> [0, -1] = 0
241 -> [0, 1] = 0
I understand the position (from GetIndex) and the offset (from
GetNeighborhoodOffset), but what are the values 199 and 241 that
GetNeighborhoodIndex returns for every pixel?
Thanks,
David</pre></span></div>