Skip to content

Commit 55471e5

Browse files
committed
STYLE: Remove samplenr which was used in commented-out code in Compute
This particular `samplenr` variable was only used as argument for commented-out `progressObserver->UpdateAndPrintProgress` calls. Those `progressObserver->UpdateAndPrintProgress` calls were already commented-out with commit e9de4b1 (May 25, 2016): https://github.com/SuperElastix/elastix/blob/e9de4b1281a07d2fdbaa96db865f3c7aaaf4e5d2/src/Common/itkComputeJacobianTerms.hxx#L235-L236 Follow-up to pull request #1111 "COMP: Fix `-Wshadow` warnings on local `samplenr` variable"
1 parent afa355d commit 55471e5

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

Common/itkComputeJacobianTerms.hxx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,6 @@ ComputeJacobianTerms<TFixedImage, TTransform>::Compute(double & TrC, double & Tr
222222
/** Initialize band matrix. */
223223
CovarianceMatrixType bandcov(numberOfParameters, bandcovsize, 0.0);
224224

225-
unsigned int samplenr = 0;
226-
227225
/**
228226
* TERM 1
229227
*
@@ -238,10 +236,6 @@ ComputeJacobianTerms<TFixedImage, TTransform>::Compute(double & TrC, double & Tr
238236
}
239237
for (const auto & sample : *sampleContainer)
240238
{
241-
/** Print progress 0-50%.
242-
*progressObserver->UpdateAndPrintProgress( samplenr );*/
243-
++samplenr;
244-
245239
/** Read fixed coordinates and get Jacobian J_j. */
246240
const FixedImagePointType & point = sample.m_ImageCoordinates;
247241
this->m_Transform->GetJacobian(point, jacj, jacind);
@@ -412,7 +406,6 @@ ComputeJacobianTerms<TFixedImage, TTransform>::Compute(double & TrC, double & Tr
412406
JacobianType jacjcovjacj(outdim, outdim);
413407
itk::Array<SizeValueType> jacindExpanded(numberOfParameters);
414408

415-
samplenr = 0;
416409
for (const auto & sample : *sampleContainer)
417410
{
418411
/** Read fixed coordinates and get Jacobian. */
@@ -504,10 +497,6 @@ ComputeJacobianTerms<TFixedImage, TTransform>::Compute(double & TrC, double & Tr
504497
/** Max_j [JCJ_j]. */
505498
maxJCJ = std::max(maxJCJ, JCJ_j);
506499

507-
/** Show progress 50-100%. */
508-
// progressObserver->UpdateAndPrintProgress( samplenr + nrofsamples );
509-
++samplenr;
510-
511500
} // end loop over sample container
512501

513502
/** Finalize progress information. */

0 commit comments

Comments
 (0)