Skip to content

Commit

Permalink
Merge pull request ANTsX#1672 from ANTsX/ANTsWarnings3
Browse files Browse the repository at this point in the history
COMP:  ANTs warnings 3.
  • Loading branch information
ntustison authored Jan 30, 2024
2 parents 76ee033 + 7b5ad92 commit c1719ee
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 28 deletions.
28 changes: 14 additions & 14 deletions ImageRegistration/itkANTSImageRegistrationOptimizer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ ANTSImageRegistrationOptimizer<TDimension, TReal>::ComposeDiffs(DisplacementFiel
VPointType pointIn1;
VPointType pointIn2;
VPointType pointIn3;
unsigned int ct = 0;
// unsigned int ct = 0;
// iterate through fieldtowarpby finding the points that it maps to via field.
// then take the difference from the original point and put it in the output field.
// std::cout << " begin iteration " << std::endl;
Expand Down Expand Up @@ -517,7 +517,7 @@ ANTSImageRegistrationOptimizer<TDimension, TReal>::ComposeDiffs(DisplacementFiel
}

fieldout->SetPixel(m_FieldIter.GetIndex(), out);
ct++;
// ct++;
} // endif
} // end iteration
}
Expand Down Expand Up @@ -888,7 +888,7 @@ ANTSImageRegistrationOptimizer<TDimension, TReal>::ComputeUpdateField(Displaceme
Iterator dIter(totalUpdateField, totalUpdateField->GetLargestPossibleRegion());
TReal mag = 0.0;
TReal max = 0.0;
unsigned long ct = 0;
// unsigned long ct = 0;
TReal total = 0;
for (dIter.GoToBegin(); !dIter.IsAtEnd(); ++dIter)
{
Expand All @@ -905,7 +905,7 @@ ANTSImageRegistrationOptimizer<TDimension, TReal>::ComputeUpdateField(Displaceme
{
max = mag;
}
ct++;
// ct++;
total += mag;
// std::cout << " mag " << mag << std::endl;
}
Expand Down Expand Up @@ -977,7 +977,7 @@ ANTSImageRegistrationOptimizer<TDimension, TReal>::ComputeUpdateField(Displaceme
Iterator invDIter(totalUpdateInvField, totalUpdateInvField->GetLargestPossibleRegion());
mag = 0.0;
max = 0.0;
ct = 0;
// ct = 0;
total = 0;
for (invDIter.GoToBegin(); !invDIter.IsAtEnd(); ++invDIter)
{
Expand All @@ -995,7 +995,7 @@ ANTSImageRegistrationOptimizer<TDimension, TReal>::ComputeUpdateField(Displaceme
{
max = mag;
}
ct++;
// ct++;
total += mag;
// std::cout << " mag " << mag << std::endl;
}
Expand Down Expand Up @@ -1368,7 +1368,7 @@ ANTSImageRegistrationOptimizer<TDimension, TReal>::ComputeUpdateFieldAlternating
Iterator dIter(totalUpdateField, totalUpdateField->GetLargestPossibleRegion());
TReal mag = 0.0;
TReal max = 0.0;
unsigned long ct = 0;
// unsigned long ct = 0;
TReal total = 0;
for (dIter.GoToBegin(); !dIter.IsAtEnd(); ++dIter)
{
Expand All @@ -1385,7 +1385,7 @@ ANTSImageRegistrationOptimizer<TDimension, TReal>::ComputeUpdateFieldAlternating
{
max = mag;
}
ct++;
// ct++;
total += mag;
// std::cout << " mag " << mag << std::endl;
}
Expand Down Expand Up @@ -1444,7 +1444,7 @@ ANTSImageRegistrationOptimizer<TDimension, TReal>::ComputeUpdateFieldAlternating
Iterator invDIter(totalUpdateInvField, totalUpdateInvField->GetLargestPossibleRegion());
mag = 0.0;
max = 0.0;
ct = 0;
// ct = 0;
total = 0;
for (invDIter.GoToBegin(); !invDIter.IsAtEnd(); ++invDIter)
{
Expand All @@ -1461,7 +1461,7 @@ ANTSImageRegistrationOptimizer<TDimension, TReal>::ComputeUpdateFieldAlternating
{
max = mag;
}
ct++;
// ct++;
total += mag;
// std::cout << " mag " << mag << std::endl;
}
Expand Down Expand Up @@ -2647,7 +2647,7 @@ ANTSImageRegistrationOptimizer<TDimension, TReal>::IntegratePointVelocity(TReal
velo.Fill(0);

TReal itime = starttimein;
unsigned long ct = 0;
// unsigned long ct = 0;
TReal thislength = 0, euclideandist = 0;
bool timedone = false;
VectorType disp;
Expand Down Expand Up @@ -2681,7 +2681,7 @@ ANTSImageRegistrationOptimizer<TDimension, TReal>::IntegratePointVelocity(TReal
disp.Fill(0.0);
timedone = false;
itime = starttimein;
ct = 0;
// ct = 0;
while (!timedone)
{
TReal itimetn1 = itime - timesign * deltaTime;
Expand Down Expand Up @@ -2788,7 +2788,7 @@ ANTSImageRegistrationOptimizer<TDimension, TReal>::IntegratePointVelocity(TReal
// std::cout << " p3 " << pointIn3 << std::endl;
dmag = std::sqrt(dmag);
totalmag += static_cast<TReal>(std::sqrt(mag));
ct++;
// ct++;
thislength += totalmag;
euclideandist = dmag;
itime = itime + deltaTime * timesign;
Expand Down Expand Up @@ -2832,7 +2832,7 @@ ANTSImageRegistrationOptimizer<TDimension, TReal>::IntegratePointVelocity(TReal
disp.Fill(0.0);
timedone = false;
itime = starttimein;
ct = 0;
// ct = 0;
while (!timedone)
{
TReal itimetn1 = itime - timesign * deltaTime;
Expand Down
4 changes: 2 additions & 2 deletions ImageRegistration/itkANTSImageRegistrationOptimizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -2069,7 +2069,7 @@ class ANTSImageRegistrationOptimizer final : public Object
// all we have to do here is add the local field to the global field.
Iterator vfIter(field, field->GetLargestPossibleRegion());
SizeType size = field->GetLargestPossibleRegion().GetSize();
unsigned long ct = 1;
// unsigned long ct = 1;
TReal totalmag = 0;
TReal maxstep = 0;
// this->m_EuclideanNorm=0;
Expand Down Expand Up @@ -2110,7 +2110,7 @@ class ANTSImageRegistrationOptimizer final : public Object
{
maxstep = stepl;
}
ct++;
// ct++;
totalmag += mag;
// this->m_EuclideanNorm+=stepl;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ AvantsMutualInformationRegistrationFunction<TFixedImage, TMovingImage, TDisplace
// Reset the joint pdfs to zero
m_JointPDF->FillBuffer(0.0);

unsigned long nSamples = 0;
// unsigned long nSamples = 0;
RandomIterator iter(this->m_FixedImage, this->m_FixedImage->GetLargestPossibleRegion());
for (iter.GoToBegin(); !iter.IsAtEnd(); ++iter)
{
Expand Down Expand Up @@ -368,7 +368,7 @@ AvantsMutualInformationRegistrationFunction<TFixedImage, TMovingImage, TDisplace
jointPDFIndex = this->m_JointPDF->TransformPhysicalPointToIndex(jointPDFpoint);
this->m_JointPDF->SetPixel(jointPDFIndex, this->m_JointPDF->GetPixel(jointPDFIndex) + 1);

++nSamples;
// ++nSamples;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ modified to round. 6- The normalization is done based on NomberOfHistogramBins-1
float px, py, pxy;
double mival = 0;
double mi;
unsigned long ct = 0;
// unsigned long ct = 0;

typename JointPDFType::IndexType index;
for (unsigned int ii = 0; ii < m_NumberOfHistogramBins; ii++)
Expand Down Expand Up @@ -496,7 +496,7 @@ modified to round. 6- The normalization is done based on NomberOfHistogramBins-1
mi = pxy * std::log(pxy / denom);
// test mi
// mi = 1.0 + log(pxy/denom);
ct++;
// ct++;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,11 +455,11 @@ ExpectationBasedPointSetRegistrationFunction<TFixedImage, TMovingImage, TDisplac
this->m_bweights->Initialize();
this->m_bcount = 0;

unsigned int lct = 0;
// unsigned int lct = 0;
typename LabelSetType::const_iterator it;
for (it = this->m_LabelSet.begin(); it != this->m_LabelSet.end(); ++it)
{
lct++;
// lct++;
auto label = (PointDataType)*it;
// std::cout << " doing label " << label << std::endl;
this->SetUpKDTrees(label);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ SpatialMutualInformationRegistrationFunction<TFixedImage, TMovingImage, TDisplac
m_JointPDFXuYr->FillBuffer(0.0);
m_JointHist->FillBuffer(0.0);

unsigned long nSamples = 0;
// unsigned long nSamples = 0;
RandomIterator iter(this->m_FixedImage, this->m_FixedImage->GetLargestPossibleRegion());
for (iter.GoToBegin(); !iter.IsAtEnd(); ++iter)
{
Expand Down Expand Up @@ -524,7 +524,7 @@ SpatialMutualInformationRegistrationFunction<TFixedImage, TMovingImage, TDisplac
pdfPtr += pdfMovingIndex;
*(pdfPtr) += static_cast<PDFValueType>(1);

++nSamples;
// ++nSamples;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ class SpatialMutualInformationRegistrationFunction final
float px, py, pxy;
double mival = 0;
double mi;
unsigned long ct = 0;
// unsigned long ct = 0;

typename JointPDFType::IndexType index;
// for (unsigned int ii=this->m_Padding+1; ii<m_NumberOfHistogramBins-this->m_Padding-2; ii++)
Expand Down Expand Up @@ -369,7 +369,7 @@ class SpatialMutualInformationRegistrationFunction final
mi = static_cast<double>(pxy * std::log(pxy / denom));
// test mi
// mi = 1.0 + log(pxy/denom);
ct++;
// ct++;
}
}

Expand Down
4 changes: 2 additions & 2 deletions Utilities/itkWarpImageMultiTransformFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,8 @@ WarpImageMultiTransformFilter<TInputImage, TOutputImage, TDisplacementField, TTr
{
DisplacementFieldPointer field = m_TransformList.front().second.dex.field;

m_bFirstDeformNoInterp = (this->GetOutputSize() == field->GetLargestPossibleRegion().GetSize()) &
(this->GetOutputSpacing() == field->GetSpacing()) &
m_bFirstDeformNoInterp = (this->GetOutputSize() == field->GetLargestPossibleRegion().GetSize()) &&
(this->GetOutputSpacing() == field->GetSpacing()) &&
(this->GetOutputOrigin() == field->GetOrigin());

// std::cout << "in set: field size: " << field->GetLargestPossibleRegion().GetSize()
Expand Down

0 comments on commit c1719ee

Please sign in to comment.