[Insight-users] Speed: Is this the right way?

Luis Ibanez luis.ibanez at kitware.com
Wed Oct 29 06:50:29 EDT 2008



Hi Koen,


1) The option "-O" doesn't give you all the optimization that you
    need for instantiating many inline templated methods.

    Please use "-O3" to make sure that templated code gets optimized.


2) DisconnectPipeline() is not discussed in the Software Guide.
    Despite its usefulness, it is not considered to be the normal
    way of using the pipeline.

    Please note that given the extent of ITK, it is not realistic
    to cover every single topic in the Software Guide. The book
    probably covers about 30% of the toolkit capabilities, and
    it is already ~800 pages.


3) DisconnectPipeline() makes possible for the output image of
    a filter, to stay alive after you destroy the filter that
    created the image.  It also makes possible to reuse a filter
    to make it produce N variations of an output image.


4) As described in the Welcoming package
    http://www.itk.org/HTML/Welcome.htm

    The best process for learning ITK is to

     a) read the Tutorials
        http://www.itk.org/HTML/Tutorials.htm

     b) read the ITK software guide
        http://www.itk.org/ItkSoftwareGuide.pdf

     c) ask questions in the mailing list




   Regards,


       Luis



--------------------
Koen Vermeer wrote:
> On Wed, 2008-10-29 at 09:58 +1100, Richard Beare wrote:
> 
>>There has been quite a bit of work done on speeding up some kernel
>>filters, including the morphology ones. Most of these are part of the
>>review section, which isn't built by default, or available via the
>>insight journal. They can make a very big difference in speed,
>>especially as you increase the size of your kernel.
> 
> 
> The kernel is rather small (5x5), at least for this test. I may have
> larger ones for non-morphological filtering.
> 
> 
>>Also, make sure that you are building in release mode.
> 
> 
> I am. That is, I'm setting NDEBUG and I compile with -O. I guess that
> qualifies as release mode, right?
> 
> 
>>Note that in the code above you should do
>>imout->DisconnectPipeline()
>>before returning imout.
> 
> 
> Thanks for the tip! One question, though: I cannot find any occurence of
> DisconnectPipeLine() in the software guide. I assumed that would be the
> best place to start with when learning ITK, but apparently not. Where
> should I look for information like this?
> 
>>From the Doxygen docs, it seems like imout->DisconnectPipeline() kind of
> undoes the 'imout = binaryDilate->GetOutput()'. Is this interpretation
> correct?
> 
> Best,
> Koen
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 


More information about the Insight-users mailing list