That&#39;s an abuse of what ShapedNeighborhood iterator is meant for. Its meant for small shape templates. Theoretically, yes you can do this with that class, but in practice no..<br><br>Its API is not meant for this. For each voxel in the mask, you will have to activate each offset for the shape template pixel  by pixel .. <br>
<br>  shapedIt.ActivateOffset( offset1 ); ....<br><br>And you would duplicate your entire mask as a shape template. And it would be slow.<br><br>I think you don&#39;t have such a class in ITK. However, it should not be hard to write your own iterator.<br>
<br>Thanks<br>--<br>karthik<br><br><br><div class="gmail_quote">On Wed, Nov 4, 2009 at 3:27 AM, Michael Mai <span dir="ltr">&lt;<a href="mailto:Michael.Mai@zeiss-oim.de">Michael.Mai@zeiss-oim.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
See itk::ShapedNeighborhoodIterator (<a href="http://www.itk.org/Insight/Doxygen/html/classitk_1_1ShapedNeighborhoodIterator.html" target="_blank">http://www.itk.org/Insight/Doxygen/html/classitk_1_1ShapedNeighborhoodIterator.html</a>) with customized TBoundaryCondition.<br>

<br>
<br>
-----Ursprüngliche Nachricht-----<br>
Von: <a href="mailto:insight-users-bounces@itk.org">insight-users-bounces@itk.org</a> [mailto:<a href="mailto:insight-users-bounces@itk.org">insight-users-bounces@itk.org</a>] Im Auftrag von Brady McCary<br>
Gesendet: Dienstag, 3. November 2009 22:16<br>
An: <a href="mailto:insight-users@itk.org">insight-users@itk.org</a><br>
Betreff: [Insight-users] Mask+Neumann Boundary Condition<br>
<div><div></div><div class="h5"><br>
insight-users,<br>
<br>
Is there an neighborhood iterator which will use a non-rectangular<br>
mask and a Neumann boundary condition? I.e., I would like an iterator<br>
that will<br>
<br>
1. Only iterate over a mask I supply (e.g., an itk::ImageMaskSpatialObject).<br>
2. Use the Neumann boundary condition to compute a neighborhood, using<br>
information only within the mask.<br>
<br>
Brady<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" 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" 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.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" 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" 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.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</div></div></blockquote></div><br><br>