<div dir="ltr">Luis,<div>  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.</div>
<div><br></div><div>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.</div>
<div><br></div><div>Prashanth</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jan 11, 2014 at 9:54 AM, Luis Ibanez <span dir="ltr"><<a href="mailto:luis.ibanez@kitware.com" target="_blank">luis.ibanez@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Prashanth,<div><br></div><div>Andras is probably right here.</div><div><br></div><div><br></div><div>Given the input image size, this doesn't look like a memory problem, </div>
<div><br></div><div>but an actual attempt to access memory improperly.</div>
<div><br></div><div>Typical suspects are:</div><div><br></div><div>a) Uninitialized  pointers</div><div>b) Pointer going outside of an allocated memory array </div><div class="gmail_extra">c) Attempt to access an object after it has been deleted</div>

<div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Since the error message in the back trace is from the Neighbor iterator:</div><div class="im"><div class="gmail_extra"><br></div>
<div class="gmail_extra">
itk::NeighborhoodAccessorFunctor<itk::Image<itk::DiffusionTensor3D<double>,3> >::<br>Get(const itk::DiffusionTensor3D<double> * pixelPointer) Line 68<span style="white-space:pre-wrap">  </span><br>

</div><div class="gmail_extra"><span style="white-space:pre-wrap"><br></span></div><div class="gmail_extra"><span style="white-space:pre-wrap"><br></span></div></div><div class="gmail_extra"><span style="white-space:pre-wrap">It looks like an instance of (b), and most likely a bug</span></div>

<div class="gmail_extra"><span style="white-space:pre-wrap">in the computation of image extent of one of the filters</span></div><div class="gmail_extra"><span style="white-space:pre-wrap">involved.</span></div><div class="gmail_extra">

<span style="white-space:pre-wrap"><br></span></div><div class="gmail_extra"><span style="white-space:pre-wrap">I would be curious to see that is the Index of the pixel at which</span></div><div class="gmail_extra"><span style="white-space:pre-wrap">this happens.  That is, whether this happened at the first attempt</span></div>

<div class="gmail_extra"><span style="white-space:pre-wrap">to access a pixel in that image, or whether it happened after the</span></div><div class="gmail_extra"><span style="white-space:pre-wrap">filter has processed a set of pixels.</span></div>

<div class="gmail_extra"><span style="white-space:pre-wrap"><br></span></div><div class="gmail_extra"><span style="white-space:pre-wrap"><br></span></div><div class="gmail_extra"><span style="white-space:pre-wrap">When you interrupt it in the Debugger, </span></div>

<div class="gmail_extra"><span style="white-space:pre-wrap"><br></span></div><div class="gmail_extra"><span style="white-space:pre-wrap"><br></span></div><div class="gmail_extra"><span style="white-space:pre-wrap">   itkAnisotropicDiffusionVesselEnhancementImageFilterTest.exe!</span><br>

</div><div class="im"><div class="gmail_extra"><span style="white-space:pre-wrap"><br></span></div><div class="gmail_extra"><span style="white-space:pre-wrap">   itk::ConstNeighborhoodIterator<</span></div><div class="gmail_extra">
<span style="white-space:pre-wrap">            itk::Image<itk::DiffusionTensor3D<double>,3>,</span></div>
</div><div class="im"><div class="gmail_extra"><span style="white-space:pre-wrap">            itk::ZeroFluxNeumannBoundaryCondition<</span></div><div class="gmail_extra"><span style="white-space:pre-wrap">                      itk::Image<itk::DiffusionTensor3D<double>,3>,</span></div>

</div><div class="im"><div class="gmail_extra"><span style="white-space:pre-wrap">                      itk::Image<itk::DiffusionTensor3D<double>,3></span></div><div class="gmail_extra"><span style="white-space:pre-wrap">                       > </span></div>

</div><div class="im"><div class="gmail_extra"><span style="white-space:pre-wrap">              >::GetPixel(unsigned long i) Line 171  </span><br></div><div class="gmail_extra"><br></div></div><div class="gmail_extra">
It will be interesting to call</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">                           GetIndex() </div><div class="gmail_extra"><br></div><div class="gmail_extra">in that same iterator where GetPixel() is failing.</div>
<div class="gmail_extra">
<br></div><div class="gmail_extra">or at least, get the value of the "unsigned long i", </div><div class="gmail_extra"><br></div><div class="gmail_extra">because it is likely that the value of "i" is larger than the</div>

<div class="gmail_extra">number of pixels in that image.</div><div class="gmail_extra"><br></div><div class="gmail_extra">This is in</div><div class="gmail_extra"><br></div><div class="gmail_extra">   ITK/Modules/Core/Common/include/itkConstNeighborhoodIterator.h</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">line 171</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">166   /** Returns the pixel value located at a linear array location i. */</div>

<div class="gmail_extra">167   virtual PixelType GetPixel(NeighborIndexType i) const</div><div class="gmail_extra">168   {</div><div class="gmail_extra">169     if ( !m_NeedToUseBoundaryCondition )</div><div class="gmail_extra">

170       {</div><div class="gmail_extra">171       return ( m_NeighborhoodAccessorFunctor.Get( this->operator[](i) ) );</div><div class="gmail_extra">172       }</div><div class="gmail_extra">173     bool inbounds;</div>

<div class="gmail_extra">174     return this->GetPixel(i, inbounds);</div><div class="gmail_extra">175   }</div><div><br></div><div><br></div><div><br></div><div>Overall.... it still seems to be a bug in the code,</div>

<div>but... if you are motivated to get to the bottom of it,</div><div>we will be glad to help with suggestions.</div><div><br></div><div><br></div><div>    Regards,</div><div><br></div><div><br></div><div>              Luis</div>

<div><br></div><div><br></div></div></div>
</blockquote></div><br></div>