[Insight-users] SignedDanielssonDistanceMapImageFilter Very Slow on 3D Volume?

Nicholas Tustison ntustison at gmail.com
Wed Jun 20 10:46:48 EDT 2012


Maurer is much faster than Daniellson.  Even before Gaetan
multi-tthreaded it, it was much, much faster.



On Jun 20, 2012, at 10:23 AM, Bill Lorensen wrote:

> Time in Debug can be many times slower than Release. Some algorithms
> can be over 30 times slower, especially on Windows.
> 
> Please try both algorithms with a Release build.
> 
> On Wed, Jun 20, 2012 at 4:28 AM, Chad Stanford <chadz111 at hotmail.com> wrote:
>> Thanks a million! I didn't know about the Maurer distance filter and it
>> managed to finish in just 3 minutes in debug mode, so problem solved.
>>  Although, it does make me wonder if there's something wrong with the
>> Daniellson distance filter or if it's really just that slow.
>> 
>> Thanks again.
>> 
>> ________________________________
>> Date: Tue, 19 Jun 2012 16:04:49 +0200
>> From: sergio.vera at alma3d.com
>> To: chadz111 at hotmail.com
>> CC: insight-users at itk.org
>> Subject: Re: [Insight-users] SignedDanielssonDistanceMapImageFilter Very
>> Slow on 3D Volume?
>> 
>> 
>> Sorry
>> I meant SignedMaurer not SignedDaniesson (Maurer seems to be much faster
>> than Danielsson)
>> 
>> Maurer is 20-35 secs
>> Danielsson is over 120-130 seconds over  the same image (both compiled in
>> Release)
>> 
>> regards
>> 
>> 
>> On Tue, Jun 19, 2012 at 3:53 PM, Sergio Vera <sergio.vera at alma3d.com> wrote:
>> 
>> Hello
>> Mi experience is that SignedDanielsson runs in about 20-35 seconds in
>> average size volumes (ex: 256x512x400).
>> Debug code can be as slow as 8-10 times easily but 30 minutes is a bit
>> excessive for your image imho .
>> Give it a try in Release mode and see what your timing is.
>> 
>> 
>> 
>> 
>> On Tue, Jun 19, 2012 at 3:32 PM, Chad Stanford <chadz111 at hotmail.com> wrote:
>> 
>> Hello,
>> 
>> I'm new to ITK, but have managed to implement a custom level set
>> segmentation filter by deriving from the SegmentationLevelSet classes.  In
>> my case I am provided a rough initial mask that I feed into the
>> SignedDanielssonDistanceMapImageFilter to get the initial level set input.
>>  This step works almost instantaneously when I test my code on 2D slices
>> from a volume in analyze format (.hdr/.img).  However, when I try running my
>> code on the whole 3D volume (only 256^3 voxels)
>> the SignedDanielssonDistanceMapImageFilter takes at least 30 minutes,
>> possibly much more because I get impatient and stop it before it finishes.
>> 
>> Does anyone know if it is normal for the filter to perform this way on
>> volumes and if not why this might be happening and/or how I can fix it or
>> get around it?
>> 
>> The volume seems to be read in fine because I can read it in, output it
>> again and visualize the output fine.  Tracing through the code shows that it
>> seems to be getting stuck in the while loop beginning on line 408 in the
>> GenerateData function in itkDanielssonDistanceMapImageFilter.hxx .  I am
>> running the code in debug mode, but over 30 minutes seems excessive
>> nonetheless.
>> 
>> 
>> Any ideas?!?
>> 
>> _____________________________________
>> 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
>> 
>> 
>> 
>> 
>> --
>> Sergio Vera
>> 
>>  Alma IT Systems
>>  C/ Vilana, 4B, 4º 1ª
>>  08022 Barcelona
>>  T. (+34) 932 380 592
>>  www.alma3d.com
>> 
>> 
>> 
>> 
>> --
>> Sergio Vera
>> 
>>  Alma IT Systems
>>  C/ Vilana, 4B, 4º 1ª
>>  08022 Barcelona
>>  T. (+34) 932 380 592
>>  www.alma3d.com
>> 
>> _____________________________________ 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
>> 
>> _____________________________________
>> 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
>> 
> 
> 
> 
> -- 
> Unpaid intern in BillsBasement at noware dot com
> _____________________________________
> 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 Insight-users mailing list