[Insight-users] Weights1D matrix in itkBSplineInterpolationWeightFunction.txx ?
motes motes
mort.motes at gmail.com
Sat Aug 29 11:51:09 EDT 2009
In the itkBSplineInterpolationWeightFunction.txx file a matrix
Weights1D is computed:
Matrix<double,SpaceDimension,SplineOrder + 1> weights1D;
for ( j = 0; j < SpaceDimension; j++ ) {
double x = index[j] - static_cast<double>(startIndex[j]);
for( k = 0; k <= SplineOrder; k++ ) {
weights1D[j][k] = m_Kernel->Evaluate( x );
x -= 1.0;
}
}
For a 2-order BSpline with (order+1*order+1) 9 coefficients/nodes this
results in a 2*3 matrix. This matrix is later used to compute the
final 1*9 weights array:
for ( k = 0; k < m_NumberOfWeights; k++ ) {
weights[k] = 1.0;
for ( j = 0; j < SpaceDimension; j++ ) {
weights[k] *= weights1D[j][ m_OffsetToIndexTable[k][j] ];
}
}
Is it correct that the Weights1D is the first order+1 nodes in the
first dimension and the second order+1 nodes in the second dimension
and that the final nodes are compute from these initial nodes?
I have not been able to find any documentation on how the
BSplineInterpolationWeightFunction actually computes these nodes (page
412 in the itkSoftwareGuide describes the process on a higher level).
More information about the Insight-users
mailing list