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

Prashanth prashanth.dumpuri at gmail.com
Tue Jan 7 13:22:02 EST 2014


Andras and Luis,
  Thanks for your suggestions. I have tried running the code in 64-bit
Release mode. Using print/cout statements I found out that the code crashes
at the same point as the Debug mode. I have 8GB RAM on my laptop and 'am
using a cropped image to test this filter (dimensions: 66x66x7). Is 7
slices too large? Or is this a bug in the filter?

Thanks
Prashanth


On Sun, Jan 5, 2014 at 3:40 PM, Andras Lasso <lasso at queensu.ca> wrote:

>  No matter how much RAM do you have, if you build a 32-bit application
> then you have memory space of 2GB, which typically means that you start
> running out of memory when you use more than 1-1.5 GB. The situation is
> even worse in debug mode (and also the code may run up to 10x slower).
>
> So, make sure you build 64-bit apps, preferably in release mode.
>
> Andras
>  ------------------------------
> From: Luis Ibanez <luis.ibanez at kitware.com>
> Sent: 2014-01-05 17:36
> To: Prashanth <prashanth.dumpuri at gmail.com>
> Cc: itk <insight-users at itk.org>
> Subject: Re: [ITK Community] [Insight-users] itk AnisotropicDiffusion
> VesselEnhancement ImageFilter crashes
>
>  Prashanth,
>
>  One thought that comes to mind:
>
>  This filter is known for being demanding in memory allocation.
>
>  So, the following questions may help
>
>
>  1) What is the size of your image ?
>
>  2) How much RAM do you have ?
>
>  3) Could you please open the Task Manager, and monitor the memory
> consumption as the executable is running ?
>
>
>
>  This may help to get a sense of whether the problem is related to
> running out of memory.
>
>
>     Thanks
>
>         Luis
>
>
> On Mon, Dec 30, 2013 at 1:02 PM, Prashanth <prashanth.dumpuri at gmail.com>wrote:
>
>>  Luis,
>>   Thanks for the response. I ran the code in Debug mode.
>>
>>  Here's the error message: Unhandled exception in
>> itkAnisotropicDiffusionVesselEnhancementImageFilterTest.exe. Access
>> violation reading location.
>>
>>  And, here's the output from the call stack.
>>
>>  itkAnisotropicDiffusionVesselEnhancementImageFilterTest.exe!itk::
>> *NeighborhoodAccessorFunctor*<itk::Image<itk::DiffusionTensor3D<double>,3>
>> >::*Get*(const itk::DiffusionTensor3D<double> * pixelPointer) Line 68
>>   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
>>
>>  itkAnisotropicDiffusionVesselEnhancementImageFilterTest.exe!itk::AnisotropicDiffusionVesselEnhancementFunction<itk::Image<double,3>
>> >::ComputeUpdate(const
>> itk::ConstNeighborhoodIterator<itk::Image<double,3>,itk::ZeroFluxNeumannBoundaryCondition<itk::Image<double,3>,itk::Image<double,3>
>> > > & it, const
>> itk::ConstNeighborhoodIterator<itk::Image<itk::DiffusionTensor3D<double>,3>,itk::ZeroFluxNeumannBoundaryCondition<itk::Image<itk::DiffusionTensor3D<double>,3>,itk::Image<itk::DiffusionTensor3D<double>,3>
>> > > & gt, void * globalData, const itk::Vector<float,3> & offset) Line 142
>>
>>  itkAnisotropicDiffusionVesselEnhancementImageFilterTest.exe!itk::AnisotropicDiffusionVesselEnhancementImageFilter<itk::Image<double,3>,itk::Image<double,3>>::ThreadedCalculateChange(const
>> itk::ImageRegion<3> & regionToProcess, const itk::ImageRegion<3> &
>> diffusionRegionToProcess, int __formal) Line 755
>>
>>  itkAnisotropicDiffusionVesselEnhancementImageFilterTest.exe!itk::AnisotropicDiffusionVesselEnhancementImageFilter<itk::Image<double,3>,itk::Image<double,3>
>> >::CalculateChangeThreaderCallback(void * arg) Line 631
>>
>>  ITKCommon-4.4.dll!itk::MultiThreader::SingleMethodProxy(void * arg)
>> Line 376
>>  msvcr110d.dll!_callthreadstartex() Line 354
>> msvcr110d.dll!_threadstartex(void * ptd) Line 337
>> kernel32.dll!00007ffd0c3715cd() Unknown
>> ntdll.dll!00007ffd0c9f43d1() Unknown
>>
>>  It looks like a memory access violation error. I'm running ITK 4.4 and
>> 'am using the example dataset that the authors provide. Any pointers on how
>> to proceed further?
>>
>>  Thanks again
>>  Prashanth
>>
>>
>> On Sun, Dec 29, 2013 at 7:54 AM, Luis Ibanez <luis.ibanez at kitware.com>wrote:
>>
>>> Hi Prashanth,
>>>
>>>  Two things that can help:
>>>
>>>  A) Add a try / catch block around the Update() call of the filter,
>>>     and print out the potential error message of the exception.
>>>
>>>  B) Run the filter in Debug mode, and once it crashes, capture
>>>      the call trace (e.g. use backtrace in GDB for example).
>>>
>>>
>>>  In order to find the source of the problem, it will help to know if
>>> this
>>> was and exception being thrown, or a segmentation fault.
>>>
>>>
>>>      Thanks
>>>
>>>          Luis
>>>
>>>
>>>
>>>  On Fri, Dec 20, 2013 at 4:55 PM, Prashanth <prashanth.dumpuri at gmail.com
>>> > wrote:
>>>
>>>>  All,
>>>>     I'm trying to
>>>> run itkAnisotropicDiffusionVesselEnhancementImageFilter that was submitted
>>>> to Insight Journal at
>>>> http://www.insight-journal.org/browse/publication/163
>>>>
>>>>      Since I'm using ITK 4.4, I used Dr. Ramon Casero's modifications.
>>>> The application crashes with an 'access violation reading location' error
>>>> message. Here's the exact location of the crash:
>>>>
>>>>  Filename where it crashes:
>>>> itkAnisotropicDiffusionVesselEnhancementImageFilter.txx
>>>> Function in that file: CalculateChange()
>>>> Line in that function:  this->GetMultiThreader()->SingleMethodExecute();
>>>>
>>>>  I checked Casero's modified version against the original code and the
>>>> only changes he made were to make the code compatible with ITK 4.x. So, the
>>>> crash should have nothing to do with the modification Casero made.
>>>>
>>>> What 'am I missing here? Any help will be appreciated.
>>>>
>>>>  Thanks
>>>>  Prashanth
>>>>
>>>>  _____________________________________
>>>> 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
>>>>
>>>> _______________________________________________
>>>> Community mailing list
>>>> Community at itk.org
>>>> http://public.kitware.com/cgi-bin/mailman/listinfo/community
>>>>
>>>>
>>>
>>
>> _____________________________________
>> 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/20140107/9a112905/attachment.htm>


More information about the Insight-users mailing list