Commit aef1534b authored by Emmanuel Christophe's avatar Emmanuel Christophe

BUG: prefer prefix operators over postfix

parent f90102de
......@@ -82,7 +82,7 @@ AngularProjectionBinaryImageFilter< TInputImage, TOutputImage, TPrecision >
{
m_AngleSet = angle;
this->SetNumberOfOutputs( angle.size() );
for ( unsigned int i = 0; i < this->GetNumberOfOutputs(); i++ )
for ( unsigned int i = 0; i < this->GetNumberOfOutputs(); ++i )
{
this->SetNthOutput(i, OutputImageType::New());
}
......@@ -95,7 +95,7 @@ AngularProjectionBinaryImageFilter< TInputImage, TOutputImage, TPrecision >
::GenerateOutputInformation()
{
Superclass::GenerateOutputInformation();
for (unsigned int i = 0; i < this->GetNumberOfOutputs(); i++)
for (unsigned int i = 0; i < this->GetNumberOfOutputs(); ++i)
{
this->GetOutput(i)->SetRegions(
this->GetInput()->GetRequestedRegion());
......@@ -124,7 +124,7 @@ AngularProjectionBinaryImageFilter< TInputImage, TOutputImage, TPrecision >
std::vector< itk::ImageRegionIterator<OutputImageType> > outIter
( this->GetNumberOfOutputs() );
for ( unsigned int i = 0; i < outIter.size(); i++ )
for ( unsigned int i = 0; i < outIter.size(); ++i )
{
outIter[i] = itk::ImageRegionIterator<OutputImageType>
( this->GetOutput(i), outputRegionForThread );
......@@ -133,7 +133,7 @@ AngularProjectionBinaryImageFilter< TInputImage, TOutputImage, TPrecision >
while ( !iter1.IsAtEnd() && !iter2.IsAtEnd() )
{
for ( unsigned int i = 0; i < outIter.size(); i++ )
for ( unsigned int i = 0; i < outIter.size(); ++i )
{
outIter[i].Set( vcl_cos( m_AngleSet[i] ) * iter1.Get()
+ vcl_sin( m_AngleSet[i] ) * iter2.Get() );
......
......@@ -87,7 +87,7 @@ BCOInterpolateImageFunctionBase<TInputImage, TCoordRep>
step = 4./static_cast<double>(2*radius);
position = - double(radius) * step;
for ( int i = -radius; i <= radius; i++)
for ( int i = -radius; i <= radius; ++i)
{
// Compute the BCO coefficients according to alpha.
dist = vcl_abs(position - offset*step);
......@@ -149,9 +149,9 @@ BCOInterpolateImageFunction<TInputImage, TCoordRep>
baseIndex[dim] = itk::Math::Floor< IndexValueType >( index[dim]+0.5 );
}
for( int i = -radius; i <= radius; i++ )
for( int i = -radius; i <= radius; ++i )
{
for( int j = -radius; j <= radius; j++ )
for( int j = -radius; j <= radius; ++j )
{
// get neighbor index
neighIndex[0] = baseIndex[0] + i;
......@@ -214,10 +214,10 @@ BCOInterpolateImageFunction< otb::VectorImage<TPixel, VImageDimension> , TCoordR
std::vector< std::vector< ScalarRealType > > lineRes;
lineRes.resize(winSize);
for( unsigned int i = 0; i<winSize; i++)
for( unsigned int i = 0; i<winSize; ++i)
{
lineRes.at(i).resize(componentNumber);
for( unsigned int j = 0; j<componentNumber; j++)
for( unsigned int j = 0; j<componentNumber; ++j)
{
lineRes.at(i).at(j) = itk::NumericTraits<ScalarRealType>::Zero;
}
......@@ -226,7 +226,7 @@ BCOInterpolateImageFunction< otb::VectorImage<TPixel, VImageDimension> , TCoordR
std::vector< ScalarRealType > value;
value.resize(componentNumber);
for( unsigned int j = 0; j<componentNumber; j++)
for( unsigned int j = 0; j<componentNumber; ++j)
{
value.at(j) = itk::NumericTraits<ScalarRealType>::Zero;
}
......@@ -244,9 +244,9 @@ BCOInterpolateImageFunction< otb::VectorImage<TPixel, VImageDimension> , TCoordR
baseIndex[dim] = itk::Math::Floor< IndexValueType >( index[dim]+0.5 );
}
for( int i = -radius; i <= radius; i++ )
for( int i = -radius; i <= radius; ++i )
{
for( int j = -radius; j <= radius; j++ )
for( int j = -radius; j <= radius; ++j )
{
// get neighbor index
neighIndex[0] = baseIndex[0] + i;
......@@ -270,13 +270,13 @@ BCOInterpolateImageFunction< otb::VectorImage<TPixel, VImageDimension> , TCoordR
}
#endif
for( unsigned int k = 0; k<componentNumber; k++)
for( unsigned int k = 0; k<componentNumber; ++k)
{
lineRes[i+radius].at(k) = lineRes[i+radius].at(k)
+ this->GetInputImage()->GetPixel( neighIndex ).GetElement(k) * BCOCoefY[j+radius];
}
}
for( unsigned int k = 0; k<componentNumber; k++)
for( unsigned int k = 0; k<componentNumber; ++k)
{
value.at(k) += lineRes[i+radius].at(k)*BCOCoefX[i+radius];
}
......@@ -285,7 +285,7 @@ BCOInterpolateImageFunction< otb::VectorImage<TPixel, VImageDimension> , TCoordR
norma = (vcl_log(static_cast<double>(radius))/vcl_log(2.0));
norma = norma * norma;
for( unsigned int k = 0; k<componentNumber; k++)
for( unsigned int k = 0; k<componentNumber; ++k)
{
output.SetElement(k, value.at(k)/norma);
}
......
......@@ -197,17 +197,17 @@ void BandMathImageFilter<TImage>
*itParser = ParserType::New();
}
for(i = 0; i < nbThreads; i++)
for(i = 0; i < nbThreads; ++i)
{
m_AImage.at(i).resize(m_NbVar);
m_VParser.at(i)->SetExpr(m_Expression);
for(j=0; j < nbInputImages; j++)
for(j=0; j < nbInputImages; ++j)
{
m_VParser.at(i)->DefineVar(m_VVarName.at(j), &(m_AImage.at(i).at(j)));
}
for(j=nbInputImages; j < nbInputImages+nbAccessIndex; j++)
for(j=nbInputImages; j < nbInputImages+nbAccessIndex; ++j)
{
m_VVarName.at(j) = tmpIdxVarNames.at(j-nbInputImages);
m_VParser.at(i)->DefineVar(m_VVarName.at(j), &(m_AImage.at(i).at(j)));
......@@ -226,7 +226,7 @@ void BandMathImageFilter<TImage>
m_OverflowCount = 0;
// Accumulate counts for each thread
for(i = 0; i < nbThreads; i++)
for(i = 0; i < nbThreads; ++i)
{
m_UnderflowCount += m_ThreadUnderflow[i];
m_OverflowCount += m_ThreadOverflow[i];
......@@ -255,7 +255,7 @@ void BandMathImageFilter<TImage>
std::vector< ImageRegionConstIteratorType > Vit;
Vit.resize(nbInputImages);
for(j=0; j < nbInputImages; j++)
for(j=0; j < nbInputImages; ++j)
{
Vit[j] = ImageRegionConstIteratorType (this->GetNthInput(j), outputRegionForThread);
}
......@@ -267,17 +267,17 @@ void BandMathImageFilter<TImage>
while(!Vit.at(0).IsAtEnd())
{
for(j=0; j < nbInputImages; j++)
for(j=0; j < nbInputImages; ++j)
{
m_AImage.at(threadId).at(j) = static_cast<double>(Vit.at(j).Get());
}
// Image Indexes
for(j=0; j < 2; j++)
for(j=0; j < 2; ++j)
{
m_AImage.at(threadId).at(nbInputImages+j) = static_cast<double>(Vit.at(0).GetIndex()[j]);
}
for(j=0; j < 2; j++)
for(j=0; j < 2; ++j)
{
m_AImage.at(threadId).at(nbInputImages+2+j) = static_cast<double>(m_Origin[j])
+static_cast<double>(Vit.at(0).GetIndex()[j]) * static_cast<double>(m_Spacing[j]);
......@@ -311,7 +311,7 @@ void BandMathImageFilter<TImage>
ot.Set(static_cast<PixelType>(value));
}
for(j=0; j < nbInputImages; j++)
for(j=0; j < nbInputImages; ++j)
{
++(Vit.at(j));
}
......
......@@ -114,7 +114,7 @@ BoxAndWhiskerImageFilter <TInputImage>
const unsigned int thirdQuartilePosition = (3 * vectorSize) / 4;
VectorType data(vectorSize);
for (i = 0; i < vectorSize; i++)
for (i = 0; i < vectorSize; ++i)
data[i] = pixel[i];
std::sort(data.begin(), data.end());
......@@ -123,7 +123,7 @@ BoxAndWhiskerImageFilter <TInputImage>
double median = ::fabs(static_cast<double>(data[medianPosition]));
PixelType outputPixel(pixel);
for (i = 0; i < vectorSize; i++)
for (i = 0; i < vectorSize; ++i)
{
if (::fabs(static_cast<double>(outputPixel[i]) - box) > median)
{
......
......@@ -74,7 +74,7 @@ public:
TOutput output;
output.SetSize( 2*A.Size() );
for(unsigned int i=0; i<A.Size(); i++)
for(unsigned int i=0; i<A.Size(); ++i)
{
output[2*i] = static_cast<OutputValueType>(A[i].real());
output[2*i+1] = static_cast<OutputValueType>(A[i].imag());
......
......@@ -66,7 +66,7 @@ public:
OutputType operator ()(const InputType& in)
{
OutputType out(in.Size() + 1);
for (unsigned int j = 0; j < in.Size(); j++)
for (unsigned int j = 0; j < in.Size(); ++j)
{
out[j] = in[j];
}
......
......@@ -89,7 +89,7 @@ ConcatenateVectorDataFilter<TVectorData>
this->GetOutput()->GetDataTree()->Add(m_Document , m_Folder);
// Retrieve all the inputs
for(unsigned int idx = 0; idx < this->GetNumberOfInputs(); idx++)
for(unsigned int idx = 0; idx < this->GetNumberOfInputs(); ++idx)
{
// Add the current vectordata
TreeNodeType *
......
......@@ -89,7 +89,7 @@ public:
}
// we fill the buffer
for (unsigned int i = 0; i < m_NbOfBands; i++)
for (unsigned int i = 0; i < m_NbOfBands; ++i)
{
m_AImageP1[i] = static_cast<double> (p1[i]);
m_AImageP2[i] = static_cast<double> (p2[i]);
......@@ -168,7 +168,7 @@ public:
m_AImageP1.resize(NbOfBands, 0.0);
m_AImageP2.resize(NbOfBands, 0.0);
for (unsigned int i = 0; i < NbOfBands; i++)
for (unsigned int i = 0; i < NbOfBands; ++i)
{
varName << "p1b" << i + 1;
m_Parser->DefineVar(varName.str(), &(m_AImageP1[i]));
......
......@@ -115,9 +115,9 @@ DBOverlapDataNodeFeatureFunction<TCoordRep, TPrecision>
j = node.GetLine()->GetVertexList()->Size();
i = currentGeometry->GetPolygonExteriorRing()->GetVertexList()->Size();
}
j++;
++j;
}
i++;
++i;
}
}
++itVector;
......@@ -138,7 +138,7 @@ DBOverlapDataNodeFeatureFunction<TCoordRep, TPrecision>
{
typename DataNodeType::Pointer currentGeometry = it.Get();
nbBuildings ++;
for (unsigned int i=0; i<node.GetLine()->GetVertexList()->Size()-1; i++)
for (unsigned int i=0; i<node.GetLine()->GetVertexList()->Size()-1; ++i)
{
if(currentGeometry->GetPolygonExteriorRing()->NbCrossing(node.GetLine()->GetVertexList()->GetElement(i),
......
......@@ -64,7 +64,7 @@ public:
OutputType operator ()(const InputType& in)
{
OutputType result = 0;
for(unsigned int i = 0; i < in.Size(); i++)
for(unsigned int i = 0; i < in.Size(); ++i)
{
result += in[i] * m_Vector[i];
}
......
......@@ -40,7 +40,7 @@ EuclideanDistanceWithMissingValuePow2<TVector>
double temp, distance = itk::NumericTraits<double>::Zero;
for (unsigned int i = 0; i < x1.Size(); i++)
for (unsigned int i = 0; i < x1.Size(); ++i)
{
if (!IsMissingValue(x1[i]) && !IsMissingValue(x2[i]))
{
......@@ -68,7 +68,7 @@ EuclideanDistanceWithMissingValuePow2<TVector>
double temp, distance = itk::NumericTraits<double>::Zero;
for (unsigned int i = 0; i < measurementVectorSize; i++)
for (unsigned int i = 0; i < measurementVectorSize; ++i)
{
if (!IsMissingValue(this->GetOrigin()[i]) && !IsMissingValue(x[i]))
{
......
......@@ -270,7 +270,7 @@ FastICAImageFilter< TInputImage, TOutputImage, TDirectionOfTransformation >
InternalMatrixType W_tmp = W * W.transpose();
vnl_svd< MatrixElementType > solver ( W_tmp );
InternalMatrixType valP = solver.W();
for ( unsigned int i = 0; i < valP.rows(); i++ )
for ( unsigned int i = 0; i < valP.rows(); ++i )
valP(i, i) = 1. / vcl_sqrt( static_cast<double>( valP(i, i) ) ); // Watch for 0 or neg
InternalMatrixType transf = solver.U();
W_tmp = transf * valP * transf.transpose();
......@@ -278,8 +278,8 @@ FastICAImageFilter< TInputImage, TOutputImage, TDirectionOfTransformation >
// Convergence evaluation
convergence = 0.;
for ( unsigned int i = 0; i < W.rows(); i++ )
for ( unsigned int j = 0; j < W.cols(); j++ )
for ( unsigned int i = 0; i < W.rows(); ++i )
for ( unsigned int j = 0; j < W.cols(); ++j )
convergence += vcl_abs( W(i, j) - W_old(i, j) );
reporter.CompletedPixel();
......
......@@ -132,7 +132,7 @@ FastICAInternalOptimizerVectorImageFilter< TInputImage, TOutputImage >
double den = 0.;
double nbSample = 0;
for ( int i = 0; i < this->GetNumberOfThreads(); i++ )
for ( int i = 0; i < this->GetNumberOfThreads(); ++i )
{
beta += m_BetaVector[i];
den += m_DenVector[i];
......
......@@ -42,7 +42,7 @@ FlexibleDistanceWithMissingValue<TVector>
double temp, distance = itk::NumericTraits<double>::Zero;
for (unsigned int i = 0; i < x1.Size(); i++)
for (unsigned int i = 0; i < x1.Size(); ++i)
{
if (!this->IsMissingValue(x1[i]) && !this->IsMissingValue(x2[i]))
{
......@@ -74,7 +74,7 @@ FlexibleDistanceWithMissingValue<TVector>
double temp, distance = itk::NumericTraits<double>::Zero;
for (unsigned int i = 0; i < measurementVectorSize; i++)
for (unsigned int i = 0; i < measurementVectorSize; ++i)
{
if (!this->IsMissingValue(this->GetOrigin()[i]) && !this->IsMissingValue(x[i]))
{
......
......@@ -39,7 +39,7 @@ public:
{
unsigned int length = input.GetPixel(0).Size();
TOutput output ( length );
for ( unsigned int i = 0; i < length; i++ )
for ( unsigned int i = 0; i < length; ++i )
{
output[i] = static_cast<typename TOutput::ValueType>(
( input.GetPixel(0)[i] - input.GetPixel(2)[i] )
......
......@@ -89,7 +89,7 @@ public:
}
}
for (unsigned int i = 0; i < vInTmp.Size(); i++)
for (unsigned int i = 0; i < vInTmp.Size(); ++i)
{
out[i] = static_cast<InternalInputPixelType>(vInTmp[i]);
}
......
......@@ -131,7 +131,7 @@ void LabelObjectOpeningMuParserFilter<TImage, TFunction>::AllocateOutputs()
}
// If there are more than one outputs, allocate the remaining outputs
for (unsigned int i = 1; i < this->GetNumberOfOutputs(); i++)
for (unsigned int i = 1; i < this->GetNumberOfOutputs(); ++i)
{
ImagePointer outputPtr;
......@@ -185,13 +185,13 @@ void LabelObjectOpeningMuParserFilter<TImage, TFunction>::GenerateData()
if (!m_Functor(*labelObject))
{
// must increment the iterator before removing the object to avoid invalidating the iterator
it++;
++it;
output2->AddLabelObject(labelObject);
output->RemoveLabel(label);
}
else
{
it++;
++it;
}
progress.CompletedPixel();
......
......@@ -52,15 +52,15 @@ public:
TOutput output ( vectorSize );
for ( unsigned int i = 0; i < vectorSize; i++ )
for ( unsigned int i = 0; i < vectorSize; ++i )
{
typename TOutput::ValueType out
= itk::NumericTraits< typename TOutput::ValueType >::Zero;
for ( unsigned int j = 0; j < neighborSize/2; j++ )
for ( unsigned int j = 0; j < neighborSize/2; ++j )
{
out += input.GetPixel(j)[i];
}
for ( unsigned int j = neighborSize/2+1; j < neighborSize; j++ )
for ( unsigned int j = neighborSize/2+1; j < neighborSize; ++j )
{
out += input.GetPixel(j)[i];
}
......
......@@ -44,7 +44,7 @@ public:
*/
unsigned int length = input.GetPixel(0).Size();
TOutput output ( length );
for ( unsigned int i = 0; i < length; i++ )
for ( unsigned int i = 0; i < length; ++i )
{
output[i] = static_cast<typename TOutput::ValueType>(
input.GetCenterPixel()[i]
......
......@@ -295,19 +295,19 @@ MNFImageFilter< TInputImage, TOutputImage, TNoiseImageFilter, TDirectionOfTransf
}
VectorType revStdDev ( m_StdDevValues.Size() );
for ( unsigned int i = 0; i < m_StdDevValues.Size(); i++ )
for ( unsigned int i = 0; i < m_StdDevValues.Size(); ++i )
revStdDev[i] = 1. / m_StdDevValues[i];
m_Normalizer->SetStdDev( revStdDev );
VectorType revMean ( m_MeanValues.Size() );
for ( unsigned int i = 0; i < m_MeanValues.Size(); i++ )
for ( unsigned int i = 0; i < m_MeanValues.Size(); ++i )
revMean[i] = - m_MeanValues[i] / m_StdDevValues[i];
m_Normalizer->SetMean( revMean );
}
else
{
VectorType revMean ( m_MeanValues.Size() );
for ( unsigned int i = 0; i < m_MeanValues.Size(); i++ )
for ( unsigned int i = 0; i < m_MeanValues.Size(); ++i )
revMean[i] = - m_MeanValues[i];
m_Normalizer->SetMean( revMean );
m_Normalizer->SetUseStdDev( false );
......@@ -338,10 +338,10 @@ MNFImageFilter< TInputImage, TOutputImage, TNoiseImageFilter, TDirectionOfTransf
InternalMatrixType normMat //= transf.transpose() * An * transf;
= transf.transpose() * Ax_inv * transf;
for ( unsigned int i = 0; i < transf.rows(); i++ )
for ( unsigned int i = 0; i < transf.rows(); ++i )
{
double norm = 1. / vcl_sqrt( normMat.get(i, i) );
for ( unsigned int j = 0; j < transf.cols(); j++ )
for ( unsigned int j = 0; j < transf.cols(); ++j )
transf.put( j, i, transf.get(j, i) * norm );
}
......@@ -354,7 +354,7 @@ MNFImageFilter< TInputImage, TOutputImage, TNoiseImageFilter, TDirectionOfTransf
m_TransformationMatrix = transf;
m_EigenValues.SetSize( m_NumberOfPrincipalComponentsRequired );
for ( unsigned int i = 0; i < m_NumberOfPrincipalComponentsRequired; i++ )
for ( unsigned int i = 0; i < m_NumberOfPrincipalComponentsRequired; ++i )
m_EigenValues[i] = static_cast< RealType >( valP(i, i) );
}
......@@ -370,10 +370,10 @@ MNFImageFilter< TInputImage, TOutputImage, TNoiseImageFilter, TDirectionOfTransf
if ( m_UseNormalization )
{
os << indent << "Normalisation with :\n" << indent << "Mean: ";
for ( unsigned int i = 0; i < m_MeanValues.Size(); i++ )
for ( unsigned int i = 0; i < m_MeanValues.Size(); ++i )
os << m_MeanValues[i] << " ";
os << "\n" << indent << "StdDev: ";
for ( unsigned int i = 0; i < m_StdDevValues.Size(); i++ )
for ( unsigned int i = 0; i < m_StdDevValues.Size(); ++i )
os << m_StdDevValues[i] << " ";
os << "\n";
}
......@@ -413,7 +413,7 @@ MNFImageFilter< TInputImage, TOutputImage, TNoiseImageFilter, TDirectionOfTransf
if ( m_EigenValues.Size() > 0 )
{
os << indent << "RMS value :";
for ( unsigned int i = 0; i < m_EigenValues.Size(); i++ )
for ( unsigned int i = 0; i < m_EigenValues.Size(); ++i )
os << " " << m_EigenValues[i];
os << "\n";
}
......
......@@ -52,7 +52,7 @@ bool MaskMuParserFunctor<TInputPixel>::operator()(const PixelType &p)
}
// we fill the buffer
for (unsigned int i = 0; i < m_NbOfBands; i++)
for (unsigned int i = 0; i < m_NbOfBands; ++i)
{
m_AImage[i] = static_cast<double> (p[i]);
}
......@@ -113,7 +113,7 @@ MaskMuParserFunctor<TInputPixel>::SetNumberOfBands(unsigned int NbOfBands)
m_AImage.resize(NbOfBands, 0.0);
for (unsigned int i = 0; i < NbOfBands; i++)
for (unsigned int i = 0; i < NbOfBands; ++i)
{
varName << "b" << i + 1;
m_Parser->DefineVar(varName.str(), &(m_AImage[i]));
......
......@@ -101,14 +101,14 @@ void MatrixImageFilter<TInputImage, TOutputImage, TMatrix>::ThreadedGenerateData
OutputPixelType outPix;
outPix.SetSize(outSize);
for(unsigned int i=0; i<inSize; i++)
for(unsigned int i=0; i<inSize; ++i)
{
inVect[i] = static_cast<InputRealType>(inPix[i]);
}
outVect = m_MatrixByVector ? m_Matrix*inVect : inVect*m_Matrix;
for(unsigned int i=0; i<outSize; i++)
for(unsigned int i=0; i<outSize; ++i)
{
outPix[i] = static_cast<OutputInternalPixelType>(outVect[i]);
}
......
......@@ -59,7 +59,7 @@ NAPCAImageFilter< TInputImage, TOutputImage, TNoiseImageFilter, TDirectionOfTran
this->m_TransformationMatrix = transf;
this->m_EigenValues.SetSize( this->GetNumberOfPrincipalComponentsRequired() );
for ( unsigned int i = 0; i < this->GetNumberOfPrincipalComponentsRequired(); i++ )
for ( unsigned int i = 0; i < this->GetNumberOfPrincipalComponentsRequired(); ++i )
this->m_EigenValues[this->GetNumberOfPrincipalComponentsRequired()-1-i]
= static_cast< RealType >( vectValPadj[i] );
}
......
......@@ -49,7 +49,7 @@ public:
{
unsigned int length = input.Size();
TOutput output ( length );
for ( unsigned int i = 0; i < length; i++ )
for ( unsigned int i = 0; i < length; ++i )
{
output[i] = static_cast<typename TOutput::ValueType>(
( static_cast< RealType >( input[i] ) - m_Mean[i] )
......@@ -62,7 +62,7 @@ public:
void SetMean ( const itk::VariableLengthVector<T> & m )
{
m_Mean.SetSize( m.Size() );
for ( unsigned int i = 0; i < m_Mean.Size(); i++ )
for ( unsigned int i = 0; i < m_Mean.Size(); ++i )
m_Mean[i] = static_cast< RealType >( m[i] );
}
......@@ -75,7 +75,7 @@ public:
void SetStdDev ( const itk::VariableLengthVector<T> & sigma )
{
m_StdDev.SetSize( sigma.Size() );
for ( unsigned int i = 0; i < m_StdDev.Size(); i++ )
for ( unsigned int i = 0; i < m_StdDev.Size(); ++i )
{
m_StdDev[i] = static_cast< RealType >( sigma[i] );
if ( m_StdDev[i] == itk::NumericTraits< RealType >::Zero )
......@@ -90,7 +90,7 @@ public:
void SetVariance ( const itk::VariableLengthVector<T> & var )
{
m_StdDev.SetSize( var.Size() );
for ( unsigned int i = 0; i < m_StdDev.Size(); i++ )
for ( unsigned int i = 0; i < m_StdDev.Size(); ++i )
{
m_StdDev[i] = vcl_sqrt( static_cast< RealType >( var[i] ) );
if ( m_StdDev[i] == itk::NumericTraits< RealType >::Zero )
......
......@@ -65,7 +65,7 @@ NormalizeVectorImageFilter< TInputImage, TOutputImage >
{
typename StreamingStatisticsVectorImageFilter< InputImageType >::RealPixelType sigma
( this->GetInput()->GetNumberOfComponentsPerPixel() );
for ( unsigned int i = 0; i < sigma.Size(); i++ )
for ( unsigned int i = 0; i < sigma.Size(); ++i )
sigma[i] = vcl_sqrt( m_CovarianceEstimator->GetCovariance()(i, i) );
this->GetFunctor().SetStdDev( sigma );
......
......@@ -78,7 +78,7 @@ public:
this->SetAttributes(a);
}
for (unsigned int i = 0; i < m_AAttributes.size(); i++)
for (unsigned int i = 0; i < m_AAttributes.size(); ++i)
{
std::string name = (m_AttributesName[i]);
......@@ -112,7 +112,7 @@ public:
void ParseAttributeName(std::string &attributeName)
{
for (unsigned int i = 0; i < attributeName.size(); i++)
for (unsigned int i = 0; i < attributeName.size(); ++i)
{
if (attributeName[i] == ':')
{
......@@ -133,7 +133,7 @@ public:
m_AAttributes.resize(nbOfAttributes, 0.0);
m_AttributesName.resize(nbOfAttributes, "");
m_AttributesName = a.GetAvailableAttributes();
for (unsigned int i = 0; i < nbOfAttributes; i++)
for (unsigned int i = 0; i < nbOfAttributes; ++i)
{
std::string attributeName = m_AttributesName.at(i);
ParseAttributeName(attributeName); //eliminate '::' from string name
......@@ -151,7 +151,7 @@ public:
m_AAttributes.resize(nbOfAttributes, 0.0);
m_AttributesName.resize(nbOfAttributes, "");
std::ostringstream varName;
for (unsigned int i = 0; i < shapeAttributes.size(); i++)
for (unsigned int i = 0; i < shapeAttributes.size(); ++i)
{
varName << "SHAPE::" << shapeAttributes.at(i);
......@@ -163,7 +163,7 @@ public:
varName.str("");
index++;
}
for (unsigned int i = 0; i < statAttributes.size(); i++)
for (unsigned int i = 0; i < statAttributes.size(); ++i)
{
for (unsigned int bandIndex = 1; bandIndex <= nbOfBands; bandIndex++)
{
......