[Insight-users] [ITK Community] itk AnisotropicDiffusion VesselEnhancement ImageFilter crashes

Prashanth prashanth.dumpuri at gmail.com
Mon Jan 13 13:26:32 EST 2014


Luis,
  Thanks. I had looped through the image (sometime last week) and found
that the filter crashed after it had processed a few pixels. I did not use
GetPixel(). I will try that and let you know.

P.S. I want to get the code working. Even though I haven't read the entire
math in the original vascular enhancement diffusion paper, I understand it
enough to know that it improves on the vesselness image. And that's
something I want.

Prashanth


On Sat, Jan 11, 2014 at 9:54 AM, Luis Ibanez <luis.ibanez at kitware.com>wrote:

> 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://www.itk.org/pipermail/insight-users/attachments/20140113/d23e5b49/attachment.html>


More information about the Insight-users mailing list