Search code examples
radixlogarithmitk

The base of the Logarithm in ITK


I encountered the word Logarithm in the following places of ITK. But I am not sure about the base of it. Can anyone tell me the base of the usually talked Logarithm in ITK. Is is 2 or 2.71827 (i.e. the e) or 10?

The LogImageFilter: https://itk.org/Doxygen/html/classitk_1_1LogImageFilter.html

and LogarithmicSigmaSteps at here: https://itk.org/Doxygen/html/classitk_1_1MultiScaleHessianBasedMeasureImageFilter.html


Solution

  • The actual function LogImageFilter executes is this:

    return static_cast< TOutput >( std::log( static_cast< double >( input ) ) );
    

    And that means base is e. MultiScaleHessianBasedMeasureImageFilter also uses std::log (implying base e). Take a look at source code.