Skip to content

Commit

Permalink
"PERF: Bypass virtual table EvaluateMovingImageValueAndDerivative in PCA
Browse files Browse the repository at this point in the history
In "itkPCAMetric.h", just like in "itkPCAMetric_F_multithreaded.h"

- Follow-up to pull request #558 commit d34c196 "PERF: Bypass virtual table on EvaluateMovingImageValueAndDerivative call" (Nov 28, 2021)
  • Loading branch information
N-Dekker committed Jun 12, 2024
1 parent 3dfbc7c commit 351d493
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Components/Metrics/PCAMetric/itkPCAMetric.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ PCAMetric<TFixedImage, TMovingImage>::GetValue(const TransformParametersType & p

if (sampleOk)
{
sampleOk = this->EvaluateMovingImageValueAndDerivative(mappedPoint, movingImageValue, 0);
sampleOk = this->Superclass::EvaluateMovingImageValueAndDerivative(mappedPoint, movingImageValue, nullptr);
}

if (sampleOk)
Expand Down Expand Up @@ -474,7 +474,7 @@ PCAMetric<TFixedImage, TMovingImage>::GetValueAndDerivative(const TransformParam
if (sampleOk)

{
sampleOk = this->EvaluateMovingImageValueAndDerivative(mappedPoint, movingImageValue, 0);
sampleOk = this->Superclass::EvaluateMovingImageValueAndDerivative(mappedPoint, movingImageValue, nullptr);
}

if (sampleOk)
Expand Down Expand Up @@ -672,7 +672,7 @@ PCAMetric<TFixedImage, TMovingImage>::GetValueAndDerivative(const TransformParam
this->GetFixedImage()->TransformContinuousIndexToPhysicalPoint(voxelCoord, fixedPoint);
const MovingImagePointType mappedPoint = this->TransformPoint(fixedPoint);

this->EvaluateMovingImageValueAndDerivative(mappedPoint, movingImageValue, &movingImageDerivative);
this->Superclass::EvaluateMovingImageValueAndDerivative(mappedPoint, movingImageValue, &movingImageDerivative);

/** Get the TransformJacobian dT/dmu */
this->EvaluateTransformJacobian(fixedPoint, jacobian, nzjis[d]);
Expand Down

0 comments on commit 351d493

Please sign in to comment.