[Insight-users] Radius of Gaussian?
motes motes
mort.motes at gmail.com
Mon Sep 14 07:21:30 EDT 2009
How should the radius of the gaussian be understood? I have done this:
const unsigned int gaussianDim = 1;
typedef itk::GaussianSpatialObject<gaussianDim> GaussianType;
typedef itk::Point<double, gaussianDim> GaussianPoint;
const static int gaussian_radius = 512;
const static int gaussian_max = 1;
GaussianType::Pointer m_Gaussian = GaussianType::New();
m_Gaussian->SetMaximum(1);
m_Gaussian->SetRadius(512);
GaussianPoint pos;
for (int i=0; i<100; i++) {
pos[0] = -300 + i*5;
double weight = 0.0;
m_Gaussian->ValueAt(pos, weight);
std::cout << "pos = " << pos << std::endl;
std::cout << "weight = " << weight << std::endl;
}
But I only get non-zero values in the range [-35, 35]:
pos = [-35]
weight = 9.87711e-267
pos = [-30]
weight = 3.69388e-196
pos = [-25]
weight = 1.91856e-136
pos = [-20]
weight = 1.3839e-087
pos = [-15]
weight = 1.38634e-049
pos = [-10]
weight = 1.92875e-022
pos = [-5]
weight = 3.72665e-006
pos = [0]
weight = 1
pos = [5]
weight = 3.72665e-006
pos = [10]
weight = 1.92875e-022
pos = [15]
weight = 1.38634e-049
pos = [20]
weight = 1.3839e-087
pos = [25]
weight = 1.91856e-136
pos = [30]
weight = 3.69388e-196
pos = [35]
weight = 9.87711e-267
pos = [40]
When the radius is 512 I thought that the bell curve would have
support in the interval: [-512, 512] but it seems that the radius in
the gaussian expresses something else.
More information about the Insight-users
mailing list