<div dir="ltr">Thanks Matt,<div><br></div><div>The default ZeroFluxNeumannBC that is used should not segfault when I access pixels outside the image ? correct ? </div><div>When I run the block match, i'm expecting pixel access outside the image boundary to be taken care of by the Boundary condition class, but I'm getting seg faults?</div>
<div>Is there some possible setup that I need for the ZeroFluxNeumanBC ? </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 15, 2013 at 9:18 AM, Matt McCormick <span dir="ltr"><<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi David,<br>
<br>
It depends on the assumptions in the block-matching algorithm, and the<br>
data, but ZorFluxNeumannBoundaryCondition is usually better than<br>
ConstantBoundaryCondition. For some datasets, like brain CT's,<br>
ConstantBoundaryCondition is sufficient, but most other cases it is<br>
not.<br>
<br>
Thanks,<br>
Matt<br>
<div><div class="h5"><br>
On Mon, Apr 15, 2013 at 3:07 AM, David Fuentes <<a href="mailto:fuentesdt@gmail.com">fuentesdt@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> The ZeroFluxNeumannBoundaryCondition that is being used by default for the<br>
> ConstNeighborhoodIterator is causing seg faults on two images of different<br>
> spacing and dimension for the BlockMatching filter. It is difficult to track<br>
> down what is exactly causing the seg fault, but the<br>
> ConstantBoundaryCondition seems to work.<br>
><br>
> Is there any benefit of the ZeroFluxNeumannBoundaryCondition ?<br>
><br>
><br>
><br>
> index 2b6635b..5fb38a9 100644<br>
> --- a/Modules/Registration/Common/include/itkBlockMatchingImageFilter.hxx<br>
> +++ b/Modules/Registration/Common/include/itkBlockMatchingImageFilter.hxx<br>
> @@ -21,6 +21,7 @@<br>
> #include "itkBlockMatchingImageFilter.h"<br>
> #include "itkImageRegionConstIterator.h"<br>
> #include "itkConstNeighborhoodIterator.h"<br>
> +#include "itkConstantBoundaryCondition.h"<br>
> #include <limits><br>
><br>
><br>
> @@ -314,10 +315,12 @@ BlockMatchingImageFilter< TFixedImage, TMovingImage,<br>
> TFeatures, TDisplacements,<br>
> center.SetIndex( movingIndex );<br>
><br>
> // iterate over neighborhoods in region window, for each neighborhood:<br>
> iterate over voxels in blockRadius<br>
> - ConstNeighborhoodIterator< FixedImageType > windowIterator(<br>
> m_BlockRadius, fixedImage, window );<br>
> + typedef itk::ConstantBoundaryCondition<FixedImageType><br>
> FixedBoundaryConditionType;<br>
> + ConstNeighborhoodIterator< FixedImageType,FixedBoundaryConditionType ><br>
> windowIterator( m_BlockRadius, fixedImage, window );<br>
><br>
> // iterate over voxels in neighborhood of current feature point<br>
> - ConstNeighborhoodIterator< MovingImageType > centerIterator(<br>
> m_BlockRadius, movingImage, center );<br>
> + typedef itk::ConstantBoundaryCondition<MovingImageType><br>
> MovingBoundaryConditionType;<br>
> + ConstNeighborhoodIterator< MovingImageType,MovingBoundaryConditionType<br>
>> centerIterator( m_BlockRadius, movingImage, center );<br>
> centerIterator.GoToBegin();<br>
><br>
><br>
</div></div>> _____________________________________<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.php" target="_blank">http://www.kitware.com/products/protraining.php</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>
</blockquote></div><br></div>