<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="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 class="" style="white-space:pre"> </span><br>
</div><div class="gmail_extra"><span class="" style="white-space:pre"><br></span></div><div class="gmail_extra"><span class="" style="white-space:pre"><br></span></div><div class="gmail_extra"><span style="white-space:pre">It looks like an instance of (b), and most likely a bug</span></div>
<div class="gmail_extra"><span style="white-space:pre">in the computation of image extent of one of the filters</span></div><div class="gmail_extra"><span style="white-space:pre">involved.</span></div><div class="gmail_extra">
<span style="white-space:pre"><br></span></div><div class="gmail_extra"><span style="white-space:pre">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">this happens. That is, whether this happened at the first attempt</span></div>
<div class="gmail_extra"><span style="white-space:pre">to access a pixel in that image, or whether it happened after the</span></div><div class="gmail_extra"><span style="white-space:pre">filter has processed a set of pixels.</span></div>
<div class="gmail_extra"><span style="white-space:pre"><br></span></div><div class="gmail_extra"><span style="white-space:pre"><br></span></div><div class="gmail_extra"><span style="white-space:pre">When you interrupt it in the Debugger, </span></div>
<div class="gmail_extra"><span style="white-space:pre"><br></span></div><div class="gmail_extra"><span style="white-space:pre"><br></span></div><div class="gmail_extra"><span style="white-space:pre"> itkAnisotropicDiffusionVesselEnhancementImageFilterTest.exe!</span><br>
</div><div class="gmail_extra"><span style="white-space:pre"><br></span></div><div class="gmail_extra"><span style="white-space:pre"> itk::ConstNeighborhoodIterator<</span></div><div class="gmail_extra"><span style="white-space:pre"> itk::Image<itk::DiffusionTensor3D<double>,3>,</span></div>
<div class="gmail_extra"><span style="white-space:pre"> itk::ZeroFluxNeumannBoundaryCondition<</span></div><div class="gmail_extra"><span style="white-space:pre"> itk::Image<itk::DiffusionTensor3D<double>,3>,</span></div>
<div class="gmail_extra"><span style="white-space:pre"> itk::Image<itk::DiffusionTensor3D<double>,3></span></div><div class="gmail_extra"><span style="white-space:pre"> > </span></div>
<div class="gmail_extra"><span style="white-space:pre"> >::GetPixel(unsigned long i) Line 171 </span><br></div><div class="gmail_extra"><br></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>