[Insight-users] Expensive Gaussian calls

motes motes mort.motes at gmail.com
Mon Sep 14 15:26:18 EDT 2009


I iterate a 512*512 image.

For each pixel I compute the gaussian of a distance measure (computed
in constant time). But since the gaussian is rather expensive to
evaluate I first do:

    //GaussianPoint gp;
    //gp[0] = dist;
    if (m_Gaussian->IsInside(gp)) {

        double weight = 0.0;
        m_Gaussian->ValueAt(gp, weight);
    }


I have tried just to do the:

m_Gaussian->IsInside(gp)

call and it adds around 10 seconds to the execution time (I am using a
release build). And the m_Gaussian->ValueAt(gp, weight); adds even
more!

What makes:

m_Gaussian->IsInside(gp)
m_Gaussian->ValueAt(gp, weight);

so expensive??


More information about the Insight-users mailing list