Skip to content

Commit

Permalink
STYLE: Specify fill value (0) when constructing temporary DerivativeType
Browse files Browse the repository at this point in the history
No need to call `Fill` afterwards, in the ComputeDerivativeLowMemory member functions of ParzenWindowMutualInformationImageToImageMetric.
  • Loading branch information
N-Dekker committed Jul 10, 2024
1 parent 3695445 commit d44e65e
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,7 @@ ParzenWindowMutualInformationImageToImageMetric<TFixedImage, TMovingImage>::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. */
Expand Down Expand Up @@ -431,8 +430,7 @@ ParzenWindowMutualInformationImageToImageMetric<TFixedImage, TMovingImage>::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. */
Expand Down

0 comments on commit d44e65e

Please sign in to comment.