Commit 7b926c31 authored by Julien Michel's avatar Julien Michel

WRG: Fixing a bunch of warnings

parent 1c7e4208
......@@ -210,11 +210,11 @@ int main(int argc, char * argv[])
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
for (PolygonListType::Iterator it = polygonList->Begin();
it != polygonList->End(); ++it)
for (PolygonListType::Iterator pit = polygonList->Begin();
pit != polygonList->End(); ++pit)
{
DataNodeType::Pointer newPolygon = DataNodeType::New();
newPolygon->SetPolygonExteriorRing(it.Get());
newPolygon->SetPolygonExteriorRing(pit.Get());
tree->Add(newPolygon, multiPolygon);
}
// Software Guide : EndCodeSnippet
......
......@@ -193,7 +193,6 @@ int otbGenericRSResampleImageFilterFromMap(int itkNotUsed(argc), char* argv[])
}
// Write the resampled image
typedef otb::ImageFileWriter<ImageType> WriterType;
WriterType::Pointer writer= WriterType::New();
writer->SetAutomaticTiledStreaming();
writer->SetFileName(outfname);
......
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
Some parts of this code are covered by the GET copyright.
See GETCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __otbSEMClassifier_h
#define __otbSEMClassifier_h
......
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
Some parts of this code are covered by the GET copyright.
See GETCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __otbSEMClassifier_txx
#define __otbSEMClassifier_txx
......@@ -322,9 +341,9 @@ SEMClassifier<TInputImage, TOutputImage>
if (!m_ExternalLabels)
{
m_ClassLabels.resize(m_NbSamples);
if (static_cast<int>(m_InitialProportions.size()) != nbClasses)
if (static_cast<unsigned int>(m_InitialProportions.size()) != nbClasses)
{
int label;
unsigned int label;
for (typename ClassLabelVectorType::iterator labelIter = m_ClassLabels.begin();
labelIter != m_ClassLabels.end();
++labelIter)
......@@ -366,7 +385,7 @@ SEMClassifier<TInputImage, TOutputImage>
sample = double(rand()) / (double(RAND_MAX) + 1.0);
*labelIter = nbClasses - 1;
for (int componentIndex = 0; componentIndex < nbClasses; ++componentIndex)
for (unsigned int componentIndex = 0; componentIndex < nbClasses; ++componentIndex)
{
if (cumulativeProportion <= sample
&& sample < cumulativeProportion + m_InitialProportions[componentIndex])
......@@ -382,7 +401,7 @@ SEMClassifier<TInputImage, TOutputImage>
m_Proportions.resize(nbClasses);
m_Proba.resize(nbClasses);
for (int i = 0; i < nbClasses; ++i)
for (unsigned int i = 0; i < nbClasses; ++i)
m_Proba[i].resize(m_NbSamples);
if (!m_ComponentDeclared)
......@@ -391,7 +410,7 @@ SEMClassifier<TInputImage, TOutputImage>
<< " Gaussian components");
typedef otb::Statistics::GaussianModelComponent<ClassSampleType> GaussianType;
for (int componentIndex = 0; componentIndex < nbClasses; ++componentIndex)
for (unsigned int componentIndex = 0; componentIndex < nbClasses; ++componentIndex)
{
typename GaussianType::Pointer comp = GaussianType::New();
AddComponent(componentIndex, comp);
......@@ -424,7 +443,7 @@ SEMClassifier<TInputImage, TOutputImage>
x = double(rand()) / (double(RAND_MAX) + 1.0);
z = 0.0;
for (int componentIndex = 0; componentIndex < nbClasses; ++componentIndex)
for (unsigned int componentIndex = 0; componentIndex < nbClasses; ++componentIndex)
{
y = z;
z += m_Proba[componentIndex][posSample];
......@@ -459,7 +478,7 @@ SEMClassifier<TInputImage, TOutputImage>
{
unsigned int nbClasses = this->GetNumberOfClasses();
int componentIndex;
unsigned int componentIndex;
for (componentIndex = 0; componentIndex < nbClasses; ++componentIndex)
m_Proportions[componentIndex] = 0.0;
......@@ -517,7 +536,7 @@ SEMClassifier<TInputImage, TOutputImage>
int i, j, a, b;
int voisinage = m_Neighborhood / 2;
int componentIndex;
unsigned int componentIndex;
double sumPdf, aPdf;
double neighborhoodWeight = (double) m_Neighborhood * m_Neighborhood;
......@@ -601,7 +620,8 @@ SEMClassifier<TInputImage, TOutputImage>
m_OutputImage->SetRegions(GetSample()->GetBufferedRegion());
m_OutputImage->Allocate();
int cluster, componentIndex;
int cluster;
unsigned int componentIndex;
typename SampleType::ConstIterator sampleIter = this->GetSampleList()->Begin();
typename SampleType::ConstIterator sampleIterEnd = this->GetSampleList()->End();
......
......@@ -86,7 +86,7 @@ void CommandLineLauncher::DeleteWatcherList()
m_WatcherList.clear();
}
bool CommandLineLauncher::Load(const std::string & exp)
bool CommandLineLauncher::Load(const std::string &)
{
/*m_Expression = exp;
return this->Load(); */
......
......@@ -70,16 +70,16 @@ void QtWidgetRAMParameter::DoUpdateGUI()
}
m_QSpinBox->blockSignals( blocked );
QFont font = m_QSpinBox->font();
QFont f = m_QSpinBox->font();
if (m_RAMParam->HasUserValue())
{
font.setBold(true);
f.setBold(true);
}
else
{
font.setBold(false);
f.setBold(false);
}
m_QSpinBox->setFont(font);
m_QSpinBox->setFont(f);
}
void QtWidgetRAMParameter::SetValue(int value)
......
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