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. */ diff --git a/Components/Metrics/VarianceOverLastDimension/itkVarianceOverLastDimensionImageMetric.hxx b/Components/Metrics/VarianceOverLastDimension/itkVarianceOverLastDimensionImageMetric.hxx index ace43292d..91f45ecab 100644 --- a/Components/Metrics/VarianceOverLastDimension/itkVarianceOverLastDimensionImageMetric.hxx +++ b/Components/Metrics/VarianceOverLastDimension/itkVarianceOverLastDimensionImageMetric.hxx @@ -460,8 +460,7 @@ VarianceOverLastDimensionImageMetric::GetValueAndDeri } else { - dMTdmu[d] = DerivativeType(Superclass::m_AdvancedTransform->GetNumberOfNonZeroJacobianIndices()); - dMTdmu[d].Fill(DerivativeValueType{}); + dMTdmu[d] = DerivativeType(Superclass::m_AdvancedTransform->GetNumberOfNonZeroJacobianIndices(), DerivativeValueType{}); nzjis[d] = NonZeroJacobianIndicesType(Superclass::m_AdvancedTransform->GetNumberOfNonZeroJacobianIndices(), 0); } // end if sampleOk }