From fc60d5aeaa849ac7e73badcdfff803cb50309158 Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Wed, 13 May 2026 18:55:36 +0200 Subject: [PATCH] STYLE: Reduce scope of jacobian in ThreadedComputeDerivativeLowMemory Following C++ Core Guidelines, Jul 8, 2025, "Keep scopes small", https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#res-scope Possibly slightly related to issue https://github.com/SuperElastix/elastix/issues/1443 "Suspicious `for`-`while`-loops in ParzenWindowMutualInformationImageToImageMetric" --- .../itkParzenWindowMutualInformationImageToImageMetric.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Components/Metrics/AdvancedMattesMutualInformation/itkParzenWindowMutualInformationImageToImageMetric.hxx b/Components/Metrics/AdvancedMattesMutualInformation/itkParzenWindowMutualInformationImageToImageMetric.hxx index 6f8b58d33..59982f12a 100644 --- a/Components/Metrics/AdvancedMattesMutualInformation/itkParzenWindowMutualInformationImageToImageMetric.hxx +++ b/Components/Metrics/AdvancedMattesMutualInformation/itkParzenWindowMutualInformationImageToImageMetric.hxx @@ -479,9 +479,9 @@ ParzenWindowMutualInformationImageToImageMetric::Thre #endif /** If desired, apply the technique introduced by Tustison. */ - TransformJacobianType jacobian; if (this->GetUseJacobianPreconditioning()) { + TransformJacobianType jacobian; this->EvaluateTransformJacobian(fixedPoint, jacobian, nzji); this->ComputeJacobianPreconditioner(jacobian, nzji, jacobianPreconditioner, preconditioningDivisor);