From d44e65e119f0f6b22cfaccd03bc5269484e9c137 Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Wed, 10 Jul 2024 11:55:11 +0200 Subject: [PATCH] STYLE: Specify fill value (0) when constructing temporary DerivativeType No need to call `Fill` afterwards, in the ComputeDerivativeLowMemory member functions of ParzenWindowMutualInformationImageToImageMetric. --- .../itkParzenWindowMutualInformationImageToImageMetric.hxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Components/Metrics/AdvancedMattesMutualInformation/itkParzenWindowMutualInformationImageToImageMetric.hxx b/Components/Metrics/AdvancedMattesMutualInformation/itkParzenWindowMutualInformationImageToImageMetric.hxx index 2ba066bc4..4b41ae4ec 100644 --- a/Components/Metrics/AdvancedMattesMutualInformation/itkParzenWindowMutualInformationImageToImageMetric.hxx +++ b/Components/Metrics/AdvancedMattesMutualInformation/itkParzenWindowMutualInformationImageToImageMetric.hxx @@ -292,8 +292,7 @@ ParzenWindowMutualInformationImageToImageMetric::Comp if (this->GetUseJacobianPreconditioning()) { jacobianPreconditioner = DerivativeType(nzji.size()); - preconditioningDivisor = DerivativeType(this->GetNumberOfParameters()); - preconditioningDivisor.Fill(0.0); + preconditioningDivisor = DerivativeType(this->GetNumberOfParameters(), 0.0); } /** Get a handle to the sample container. */ @@ -431,8 +430,7 @@ ParzenWindowMutualInformationImageToImageMetric::Thre if (this->GetUseJacobianPreconditioning()) { jacobianPreconditioner = DerivativeType(nzji.size()); - preconditioningDivisor = DerivativeType(this->GetNumberOfParameters()); - preconditioningDivisor.Fill(0.0); + preconditioningDivisor = DerivativeType(this->GetNumberOfParameters(), 0.0); } /** Get a handle to the sample container. */