Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call FastEvaluateMovingImageValueAndDerivative in six more metrics #558

Merged
merged 3 commits into from
Nov 28, 2021

Conversation

N-Dekker
Copy link
Member

@N-Dekker N-Dekker commented Nov 27, 2021

Follow-up to pull request #556 "PERF: Make AdvancedNormalizedCorrelationImageToImageMetric faster"

Replaced `this->EvaluateMovingImageValueAndDerivative(...)` calls by `this->FastEvaluateMovingImageValueAndDerivative(..., threadId)` in the "Threaded" member functions of six more metrics:

    itkAdvancedKappaStatisticImageToImageMetric
    itkAdvancedMeanSquaresImageToImageMetric
    itkParzenWindowHistogramImageToImageMetric
    itkParzenWindowMutualInformationImageToImageMetric
    itkPCAMetric_F_multithreaded
    itkSumSquaredTissueVolumeDifferenceImageToImageMetric

Expected a significant performance gain on the run-time duration.

`AdvancedKappaStatisticImageToImageMetric::ThreadedGetValueAndDerivative` is being tested by 55/161 - elastix_run_3DCT_lung.Kappa.bspline.ASGD.001_OUTPUT

`AdvancedMeanSquaresImageToImageMetric::ThreadedGetValueAndDerivative` is being tested by:

 - 43/161 - elastix_run_3DCT_lung.SSD.bspline.ASGD.001_OUTPUT
 - 98/161 - elastix_run_3DCT_lung.SSD.bspline.ASGD.002_OUTPUT
 - 102/161 - elastix_run_3DCT_lung.SSD.bspline.ASGD.003_OUTPUT
 - 106/161 - elastix_run_3DCT_lung.SSD.bspline.ASGD.001-Threads1_OUTPUT
 - 110/161 - elastix_run_3DCT_lung.SSD.bspline.ASGD.001-Threads2_OUTPUT
 - 114/161 - elastix_run_3DCT_lung.SSD.bspline.ASGD.001-Threads4_OUTPUT

`ParzenWindowHistogramImageToImageMetric::ThreadedComputePDFs` is being tested by:

 - 20/161 - elastix_run_example_OUTPUT
 - 47/161 - elastix_run_3DCT_lung.MI.bspline.ASGD.001_OUTPUT
 - 82/161 - elastix_run_3DCT_lung.MI.bspline.SGD.001_OUTPUT
 - 86/161 - elastix_run_3DCT_lung.MI.bspline.SGD.002_OUTPUT
 - 90/161 - elastix_run_3DCT_lung.MI.bspline.SGD.003_OUTPUT
 - 94/161 - elastix_run_3DCT_lung.MI.bspline.SGD.004_OUTPUT
 - 130/161 - elastix_run_3DCT_lung.MI.bspline.SGD.001-Threads1_OUTPUT
 - 134/161 - elastix_run_3DCT_lung.MI.bspline.SGD.001-Threads2_OUTPUT
 - 138/161 - elastix_run_3DCT_lung.MI.bspline.SGD.001-Threads4_OUTPUT

Follow-up to pull request #556 commit c8c4a6a "PERF: Make AdvancedNormalizedCorrelationImageToImageMetric faster"
Added `Superclass::` to calls to the (protected) virtual member function `AdvancedImageToImageMetric::EvaluateMovingImageValueAndDerivative` (which has one (protected) override, from `MultiInputImageToImageMetricBase`).

Doing so ensures that virtual dispatching is avoided.
@N-Dekker N-Dekker merged commit d34c196 into develop Nov 28, 2021
@N-Dekker N-Dekker deleted the More-FastEvaluateMovingImageValueAndDerivative branch November 28, 2021 22:28
N-Dekker added a commit that referenced this pull request Jun 12, 2024
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)
N-Dekker added a commit that referenced this pull request Jun 12, 2024
Also replaced `0` with `nullptr`. 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)
N-Dekker added a commit that referenced this pull request Jun 12, 2024
Also replaced `0` with `nullptr`. 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant