[ITK Community] [Insight-users] itk AnisotropicDiffusion VesselEnhancement ImageFilter crashes
Luis Ibanez
luis.ibanez at kitware.com
Sat Jan 11 12:54:54 EST 2014
Prashanth,
Andras is probably right here.
Given the input image size, this doesn't look like a memory problem,
but an actual attempt to access memory improperly.
Typical suspects are:
a) Uninitialized pointers
b) Pointer going outside of an allocated memory array
c) Attempt to access an object after it has been deleted
Since the error message in the back trace is from the Neighbor iterator:
itk::NeighborhoodAccessorFunctor<itk::Image<itk::DiffusionTensor3D<double>,3>
>::
Get(const itk::DiffusionTensor3D<double> * pixelPointer) Line 68
It looks like an instance of (b), and most likely a bug
in the computation of image extent of one of the filters
involved.
I would be curious to see that is the Index of the pixel at which
this happens. That is, whether this happened at the first attempt
to access a pixel in that image, or whether it happened after the
filter has processed a set of pixels.
When you interrupt it in the Debugger,
itkAnisotropicDiffusionVesselEnhancementImageFilterTest.exe!
itk::ConstNeighborhoodIterator<
itk::Image<itk::DiffusionTensor3D<double>,3>,
itk::ZeroFluxNeumannBoundaryCondition<
itk::Image<itk::DiffusionTensor3D<double>,3>,
itk::Image<itk::DiffusionTensor3D<double>,3>
>
>::GetPixel(unsigned long i) Line 171
It will be interesting to call
GetIndex()
in that same iterator where GetPixel() is failing.
or at least, get the value of the "unsigned long i",
because it is likely that the value of "i" is larger than the
number of pixels in that image.
This is in
ITK/Modules/Core/Common/include/itkConstNeighborhoodIterator.h
line 171
166 /** Returns the pixel value located at a linear array location i. */
167 virtual PixelType GetPixel(NeighborIndexType i) const
168 {
169 if ( !m_NeedToUseBoundaryCondition )
170 {
171 return ( m_NeighborhoodAccessorFunctor.Get( this->operator[](i) )
);
172 }
173 bool inbounds;
174 return this->GetPixel(i, inbounds);
175 }
Overall.... it still seems to be a bug in the code,
but... if you are motivated to get to the bottom of it,
we will be glad to help with suggestions.
Regards,
Luis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140111/57d8b9e7/attachment-0002.html>
-------------- next part --------------
_____________________________________
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
More information about the Community
mailing list