Commit ed022fab authored by OTB Bot's avatar OTB Bot
Browse files

STYLE

parent 20cf3656
......@@ -161,9 +161,9 @@ private:
ofs<<"\t<VRTRasterBand dataType=\"UInt32\" band=\"1\">"<<std::endl;
ofs<<"\t\t<ColorInterp>Gray</ColorInterp>"<<std::endl;
for(unsigned int column = 0; column < nbTilesX ; ++column)
for(unsigned int column = 0; column < nbTilesX; ++column)
{
for(unsigned int row = 0; row < nbTilesY ; ++row)
for(unsigned int row = 0; row < nbTilesY; ++row)
{
ofs<<"\t\t<SimpleSource>"<<std::endl;
ofs<<"\t\t\t<SourceFilename relativeToVRT=\"1\">"<<CreateFileName(row,column,"FINAL")<<"</SourceFilename>"<<std::endl;
......@@ -314,8 +314,8 @@ private:
//shifting
otbAppLogINFO(<<"Tile shifting ...");
for(unsigned int row = 0; row < nbTilesY ; ++row)
for(unsigned int column = 0; column < nbTilesX ; ++column)
for(unsigned int row = 0; row < nbTilesY; ++row)
for(unsigned int column = 0; column < nbTilesX; ++column)
{
// Compute extraction parameters
unsigned long startX = column*sizeTilesX;
......@@ -362,7 +362,7 @@ private:
//Expression 1 : radiometric distance < ranger
std::stringstream expr;
expr<<"sqrt((p1b1-p2b1)*(p1b1-p2b1)";
for(unsigned int i=1;i<nbComp;i++)
for(unsigned int i=1; i<nbComp; i++)
expr<<"+(p1b"<<i+1<<"-p2b"<<i+1<<")*(p1b"<<i+1<<"-p2b"<<i+1<<")";
expr<<")"<<"<"<<ranger;
......@@ -404,9 +404,9 @@ private:
for(LabelImagePixelType curLabel = 1; curLabel <= regionCount; ++curLabel)
LUT[curLabel] = curLabel;
for(unsigned int row = 0; row < nbTilesY ; row++)
for(unsigned int row = 0; row < nbTilesY; row++)
{
for(unsigned int column = 0; column < nbTilesX ; column++)
for(unsigned int column = 0; column < nbTilesX; column++)
{
unsigned long startX = column*sizeTilesX;
unsigned long startY = row*sizeTilesY;
......@@ -434,7 +434,7 @@ private:
pixelIndexIn[1] = 0;
pixelIndexUp[1] = sizeTilesY;
for(pixelIndexIn[0]=0;pixelIndexIn[0]<static_cast<long>(sizeX-1);++pixelIndexIn[0])
for(pixelIndexIn[0]=0; pixelIndexIn[0]<static_cast<long>(sizeX-1); ++pixelIndexIn[0])
{
pixelIndexUp[0] = pixelIndexIn[0];
......@@ -474,7 +474,7 @@ private:
pixelIndexIn[0] = 0;
pixelIndexUp[0] = sizeTilesX;
for(pixelIndexIn[1]=0;pixelIndexIn[1]<static_cast<long>(sizeY-1);++pixelIndexIn[1])
for(pixelIndexIn[1]=0; pixelIndexIn[1]<static_cast<long>(sizeY-1); ++pixelIndexIn[1])
{
pixelIndexUp[1] = pixelIndexIn[1];
......@@ -518,9 +518,9 @@ private:
std::vector<unsigned long> sizePerRegion(regionCount+1,0);
otbAppLogINFO(<<"Tiles relabelisation ...");
for(unsigned int column = 0; column < nbTilesX ; ++column)
for(unsigned int column = 0; column < nbTilesX; ++column)
{
for(unsigned int row = 0; row < nbTilesY ; ++row)
for(unsigned int row = 0; row < nbTilesY; ++row)
{
unsigned long startX = column*sizeTilesX;
unsigned long startY = row*sizeTilesY;
......@@ -545,7 +545,7 @@ private:
changeLabel->SetInput(labelImage->GetOutput());
// Fill LUT
for(LabelImagePixelType label = 1;label<regionCount+1; ++label)
for(LabelImagePixelType label = 1; label<regionCount+1; ++label)
{
if(label!=LUT[label])
{
......@@ -600,9 +600,9 @@ private:
// Clear sizePerRegion, we do not need it anymore
sizePerRegion.clear();
for(unsigned int column = 0; column < nbTilesX ; ++column)
for(unsigned int column = 0; column < nbTilesX; ++column)
{
for(unsigned int row = 0; row < nbTilesY ; ++row)
for(unsigned int row = 0; row < nbTilesY; ++row)
{
std::string tileIn = CreateFileName(row,column,"RELAB");
......@@ -611,7 +611,7 @@ private:
ChangeLabelImageFilterType::Pointer changeLabel = ChangeLabelImageFilterType::New();
changeLabel->SetInput(readerIn->GetOutput());
for(LabelImagePixelType label = 1;label<regionCount+1; ++label)
for(LabelImagePixelType label = 1; label<regionCount+1; ++label)
{
if(label != newLabels[label])
{
......@@ -659,7 +659,7 @@ private:
otbAppLogINFO(<<"Final clean-up ...");
for(std::vector<std::string>::iterator it = m_FilesToRemoveAfterExecute.begin();
it!=m_FilesToRemoveAfterExecute.end();++it)
it!=m_FilesToRemoveAfterExecute.end(); ++it)
{
RemoveFile(*it);
}
......
......@@ -171,8 +171,8 @@ private:
//Sums calculation per label
otbAppLogINFO(<<"Sums calculation ...");
for(unsigned int row = 0; row < nbTilesY ; row++)
for(unsigned int column = 0; column < nbTilesX ; column++)
for(unsigned int row = 0; row < nbTilesY; row++)
for(unsigned int column = 0; column < nbTilesX; column++)
{
unsigned long startX = column*sizeTilesX;
unsigned long startY = row*sizeTilesY;
......@@ -223,7 +223,7 @@ private:
//Minimal size region suppression
otbAppLogINFO(<<"Building LUT for small regions merging ...");
for (unsigned int size=1;size<minSize;size++)
for (unsigned int size=1; size<minSize; size++)
{
// LUTtmp creation in order to modify the LUT only at the end of the pass
std::vector<LabelImagePixelType> LUTtmp;
......@@ -234,9 +234,9 @@ private:
LUTtmp[curLabel] = LUT[curLabel];
}
for(unsigned int row = 0; row < nbTilesY ; row++)
for(unsigned int row = 0; row < nbTilesY; row++)
{
for(unsigned int column = 0; column < nbTilesX ; column++)
for(unsigned int column = 0; column < nbTilesX; column++)
{
std::set<int> minLabel, edgeLabel, labelMerged;
std::map<int,std::set<int> > adjMap;
......@@ -256,8 +256,8 @@ private:
LabelImageType::IndexType pixelIndex;
//"Adjacency map" creation for the region with nbPixels=="size"
for(pixelIndex[0]=0;pixelIndex[0]<static_cast<long>(sizeX);++pixelIndex[0])
for(pixelIndex[1]=0;pixelIndex[1]<static_cast<long>(sizeY);++pixelIndex[1])
for(pixelIndex[0]=0; pixelIndex[0]<static_cast<long>(sizeX); ++pixelIndex[0])
for(pixelIndex[1]=0; pixelIndex[1]<static_cast<long>(sizeY); ++pixelIndex[1])
{
LabelImagePixelType curLabel = labelImageROI->GetOutput()->GetPixel(pixelIndex);
......@@ -317,7 +317,7 @@ private:
if((nbPixels[LUT[adjLabelY]]>0)&&(nbPixels[LUT[adjLabelY]]==size))
{
adjMap[LUT[adjLabelY]].insert(LUT[curLabel]);
minLabel.insert(LUT[adjLabelY]);}
minLabel.insert(LUT[adjLabelY]); }
}
}
}
......@@ -407,7 +407,7 @@ private:
//Relabelling
m_ChangeLabelFilter = ChangeLabelImageFilterType::New();
m_ChangeLabelFilter->SetInput(labelIn);
for(LabelImagePixelType label = 1;label<regionCount+1; ++label)
for(LabelImagePixelType label = 1; label<regionCount+1; ++label)
{
if(label!=LUT[label])
{
......
......@@ -193,9 +193,9 @@ private:
//Vectorization per tile
otbAppLogINFO(<<"Vectorization ...");
for(unsigned int row = 0; row < nbTilesY ; row++)
for(unsigned int row = 0; row < nbTilesY; row++)
{
for(unsigned int column = 0; column < nbTilesX ; column++)
for(unsigned int column = 0; column < nbTilesX; column++)
{
unsigned long startX = column*sizeTilesX;
unsigned long startY = row*sizeTilesY;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment