template <class TFixedImage, class TMovingImage>
void
CorrelationRatioImageToImageMetric<TFixedImage,TMovingImage>
template <class TFixedImage, class TMovingImage>
void
CorrelationRatioImageToImageMetric<TFixedImage,TMovingImage>
//check in which bin the fixed value belongs, get the index
const double fixedImageBinTerm = (fixedValue - m_FixedImageMin) / m_FixedImageBinSize;
//check in which bin the fixed value belongs, get the index
const double fixedImageBinTerm = (fixedValue - m_FixedImageMin) / m_FixedImageBinSize;
//adapt the measures per bin
this->m_mMSVPB[fixedImageBinIndex]+=movingSquaredValue;
this->m_mSMVPB[fixedImageBinIndex]+=movingValue;
//adapt the measures per bin
this->m_mMSVPB[fixedImageBinIndex]+=movingSquaredValue;
this->m_mSMVPB[fixedImageBinIndex]+=movingValue;
const unsigned int ParametersDimension = this->GetNumberOfParameters();
derivative = DerivativeType( ParametersDimension );
const unsigned int ParametersDimension = this->GetNumberOfParameters();
derivative = DerivativeType( ParametersDimension );
if( this->m_Interpolator->IsInsideBuffer( transformedPoint ) ) {
const RealType movingValue = this->m_Interpolator->Evaluate( transformedPoint );
if( this->m_Interpolator->IsInsideBuffer( transformedPoint ) ) {
const RealType movingValue = this->m_Interpolator->Evaluate( transformedPoint );
- const TransformJacobianType & jacobian =
- this->m_Transform->GetJacobian( inputPoint );
-
+ TransformJacobianType jacobian;
+ this->m_Transform->ComputeJacobianWithRespectToParameters( inputPoint , jacobian);
const unsigned int ParametersDimension = this->GetNumberOfParameters();
derivative = DerivativeType( ParametersDimension );
const unsigned int ParametersDimension = this->GetNumberOfParameters();
derivative = DerivativeType( ParametersDimension );
if( this->m_Interpolator->IsInsideBuffer( transformedPoint ) ) {
const RealType movingValue = this->m_Interpolator->Evaluate( transformedPoint );
if( this->m_Interpolator->IsInsideBuffer( transformedPoint ) ) {
const RealType movingValue = this->m_Interpolator->Evaluate( transformedPoint );
- const TransformJacobianType & jacobian =
- this->m_Transform->GetJacobian( inputPoint );
-
+ TransformJacobianType jacobian;
+ this->m_Transform->ComputeJacobianWithRespectToParameters( inputPoint, jacobian );