[Insight-users] Block match seg fault on different dimension images
David Fuentes
fuentesdt at gmail.com
Mon Apr 15 15:39:10 EDT 2013
Thanks Matt,
The default ZeroFluxNeumannBC that is used should not segfault when I
access pixels outside the image ? correct ?
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?
Is there some possible setup that I need for the ZeroFluxNeumanBC ?
On Mon, Apr 15, 2013 at 9:18 AM, Matt McCormick
<matt.mccormick at kitware.com>wrote:
> Hi David,
>
> It depends on the assumptions in the block-matching algorithm, and the
> data, but ZorFluxNeumannBoundaryCondition is usually better than
> ConstantBoundaryCondition. For some datasets, like brain CT's,
> ConstantBoundaryCondition is sufficient, but most other cases it is
> not.
>
> Thanks,
> Matt
>
> On Mon, Apr 15, 2013 at 3:07 AM, David Fuentes <fuentesdt at gmail.com>
> wrote:
> > Hi,
> >
> > The ZeroFluxNeumannBoundaryCondition that is being used by default for
> the
> > ConstNeighborhoodIterator is causing seg faults on two images of
> different
> > spacing and dimension for the BlockMatching filter. It is difficult to
> track
> > down what is exactly causing the seg fault, but the
> > ConstantBoundaryCondition seems to work.
> >
> > Is there any benefit of the ZeroFluxNeumannBoundaryCondition ?
> >
> >
> >
> > index 2b6635b..5fb38a9 100644
> > --- a/Modules/Registration/Common/include/itkBlockMatchingImageFilter.hxx
> > +++ b/Modules/Registration/Common/include/itkBlockMatchingImageFilter.hxx
> > @@ -21,6 +21,7 @@
> > #include "itkBlockMatchingImageFilter.h"
> > #include "itkImageRegionConstIterator.h"
> > #include "itkConstNeighborhoodIterator.h"
> > +#include "itkConstantBoundaryCondition.h"
> > #include <limits>
> >
> >
> > @@ -314,10 +315,12 @@ BlockMatchingImageFilter< TFixedImage,
> TMovingImage,
> > TFeatures, TDisplacements,
> > center.SetIndex( movingIndex );
> >
> > // iterate over neighborhoods in region window, for each
> neighborhood:
> > iterate over voxels in blockRadius
> > - ConstNeighborhoodIterator< FixedImageType > windowIterator(
> > m_BlockRadius, fixedImage, window );
> > + typedef itk::ConstantBoundaryCondition<FixedImageType>
> > FixedBoundaryConditionType;
> > + ConstNeighborhoodIterator<
> FixedImageType,FixedBoundaryConditionType >
> > windowIterator( m_BlockRadius, fixedImage, window );
> >
> > // iterate over voxels in neighborhood of current feature point
> > - ConstNeighborhoodIterator< MovingImageType > centerIterator(
> > m_BlockRadius, movingImage, center );
> > + typedef itk::ConstantBoundaryCondition<MovingImageType>
> > MovingBoundaryConditionType;
> > + ConstNeighborhoodIterator<
> MovingImageType,MovingBoundaryConditionType
> >> centerIterator( m_BlockRadius, movingImage, center );
> > centerIterator.GoToBegin();
> >
> >
> > _____________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Kitware offers ITK Training Courses, for more information visit:
> > http://www.kitware.com/products/protraining.php
> >
> > Please keep messages on-topic and check the ITK FAQ at:
> > http://www.itk.org/Wiki/ITK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.itk.org/mailman/listinfo/insight-users
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130415/ba559020/attachment.htm>
More information about the Insight-users
mailing list