Commit 452403fa authored by OTB Bot's avatar OTB Bot

STYLE

parent 80212e15
......@@ -67,7 +67,7 @@ private:
AddParameter(ParameterType_Filename, "out", "Output XML file");
SetParameterDescription( "out", "Name of the XML file where the statistics are saved for future reuse" );
MandatoryOff("out");
SetParameterRole("out",Role_Output);
SetParameterRole("out", Role_Output);
}
void DoUpdateParameters()
......
......@@ -358,4 +358,3 @@ private:
OTB_APPLICATION_EXPORT(otb::Wrapper::KMeansClassification)
......@@ -25,7 +25,6 @@
namespace otb
{
namespace Wrapper
......
......@@ -78,10 +78,10 @@ public:
/** Standard macro */
itkNewMacro(Self)
;
;
itkTypeMacro(TrainSVMImagesClassifier, otb::Application)
;
;
typedef otb::Image<FloatVectorImageType::InternalPixelType, 2> ImageReaderType;
......
......@@ -68,10 +68,10 @@ public:
/** Standard macro */
itkNewMacro(Self)
;
;
itkTypeMacro(ValidateSVMImagesClassifier, otb::Application)
;
;
typedef otb::Image<FloatVectorImageType::InternalPixelType, 2> ImageReaderType;
......
......@@ -80,7 +80,7 @@ private:
AddParameter(ParameterType_Directory, "dem", "DEM directory");
MandatoryOff("dem");
AddParameter(ParameterType_Empty, "norescale", "No rescaling in [0,255]");
AddParameter(ParameterType_Empty, "norescale", "No rescaling in [0, 255]");
MandatoryOff("norescale");
}
......
......@@ -42,10 +42,10 @@ typedef otb::StreamingStatisticsVectorImageFilter<DoubleVectorImageType> Streami
typedef otb::EigenvalueLikelihoodMaximisation<double> ELMType;
typedef otb::VCAImageFilter<DoubleVectorImageType> VCAFilterType;
typedef otb::UnConstrainedLeastSquareImageFilter<DoubleVectorImageType,DoubleVectorImageType,double> UCLSUnmixingFilterType;
typedef otb::ISRAUnmixingImageFilter<DoubleVectorImageType,DoubleVectorImageType,double> ISRAUnmixingFilterType;
typedef otb::NCLSUnmixingImageFilter<DoubleVectorImageType,DoubleVectorImageType,double> NCLSUnmixingFilterType;
typedef otb::FCLSUnmixingImageFilter<DoubleVectorImageType,DoubleVectorImageType,double> FCLSUnmixingFilterType;
typedef otb::UnConstrainedLeastSquareImageFilter<DoubleVectorImageType, DoubleVectorImageType, double> UCLSUnmixingFilterType;
typedef otb::ISRAUnmixingImageFilter<DoubleVectorImageType, DoubleVectorImageType, double> ISRAUnmixingFilterType;
typedef otb::NCLSUnmixingImageFilter<DoubleVectorImageType, DoubleVectorImageType, double> NCLSUnmixingFilterType;
typedef otb::FCLSUnmixingImageFilter<DoubleVectorImageType, DoubleVectorImageType, double> FCLSUnmixingFilterType;
typedef otb::VectorImageToMatrixImageFilter<DoubleVectorImageType> VectorImageToMatrixImageFilterType;
......
......@@ -114,7 +114,7 @@ private:
AddParameter(ParameterType_Choice, "outputs.mode", "Mode Type");
AddChoice("outputs.mode.auto", "User Defined");
AddChoice("outputs.mode.autosize", "Automatic Size ");
AddChoice("outputs.mode.autospacing", "Automatic Spacing");
AddChoice("outputs.mode.autospacing", "Automatic Spacing");
// Upper left point coordinates
AddParameter(ParameterType_Float, "outputs.ulx", "Upper Left X");
......@@ -143,7 +143,7 @@ private:
isotropOss << "Default spacing values are estimated from the sensor modelling of the image. It can therefore result in a non-isotropic spacing. ";
isotropOss << "This option allows you to force default values to be isotropic (in this case, the minimum of spacing in both direction is applied. ";
isotropOss << "Values overriden by user are not affected by this option.";
SetParameterDescription("outputs.isotropic",isotropOss.str());
SetParameterDescription("outputs.isotropic", isotropOss.str());
EnableParameter("outputs.isotropic");
// DEM
......@@ -156,7 +156,7 @@ private:
std::ostringstream oss;
oss << "Activate RPC sensor model estimation"<<std::endl;
oss << "Parameter is the number of control points per axis";
//SetParameterDescription("rpc",oss.str().c_str());
//SetParameterDescription("rpc", oss.str().c_str());
MandatoryOff("rpc");
// Interpolators
......@@ -174,11 +174,11 @@ private:
AddParameter(ParameterType_Int, "map.utm.zone", "Zone number");
AddParameter(ParameterType_Empty, "map.utm.hem", "Hemisphere North");
AddChoice("map.lambert2", "Lambert II Etendu");
AddChoice("map.lambert2", "Lambert II Etendu");
AddChoice("map.epsg","EPSG");
AddParameter(ParameterType_Int, "map.epsg.code", "EPSG Code");
SetDefaultParameterInt("map.epsg.code",32631);
AddParameter(ParameterType_Int, "map.epsg.code", "EPSG Code");
SetDefaultParameterInt("map.epsg.code", 32631);
SetParameterString("map", "epsg");
// Deformation Field Spacing
......@@ -192,7 +192,7 @@ private:
{
if (HasValue("in"))
{
// input image
// input image
FloatVectorImageType::Pointer inImage = GetParameterImage("in");
// Update the UTM zone params
......@@ -221,7 +221,7 @@ private:
dynamic_cast< NumericalParameter<float> * >(GetParameterByKey("outputs.spacingy"))->SetMinimumValue(-50000.0);
dynamic_cast< NumericalParameter<float> * >(GetParameterByKey("outputs.spacingy"))->SetMaximumValue(10000.0);
// Fill the Gui with the computed parameters
// Fill the Gui with the computed parameters
if (!HasUserValue("outputs.ulx"))
{
SetParameterFloat("outputs.ulx", genericRSEstimator->GetOutputOrigin()[0]);
......@@ -242,7 +242,7 @@ private:
if (!HasUserValue("outputs.spacingy"))
SetParameterFloat("outputs.spacingy", genericRSEstimator->GetOutputSpacing()[1]);
// Handle the spacing and size field following the mode
// Handle the spacing and size field following the mode
// choosed by the user
switch (GetParameterInt("outputs.mode") )
{
......@@ -319,7 +319,7 @@ private:
MandatoryOn("outputs.sizex");
MandatoryOn("outputs.sizey");
ResampleFilterType::SizeType size;
ResampleFilterType::SizeType size;
size[0] = GetParameterInt("outputs.sizex");
size[1] = GetParameterInt("outputs.sizey");
......@@ -352,7 +352,7 @@ private:
int zone = otb::Utils::GetZoneFromGeoPoint(genericRSEstimator->GetOutputOrigin()[0],
genericRSEstimator->GetOutputOrigin()[1]);
// Update the UTM Gui fields
SetParameterInt("map.utm.zone",zone);
SetParameterInt("map.utm.zone", zone);
if(genericRSEstimator->GetOutputOrigin()[0] > 0.)
{
EnableParameter("map.utm.hem");
......@@ -379,7 +379,7 @@ private:
std::string hem = "N";
if (!IsParameterEnabled("map.utm.hem"))
hem = "S";
utmProjection->SetHemisphere(hem[0]);
utmProjection->SetHemisphere(hem[0]);
// Get the projection ref
m_OutputProjectionRef = utmProjection->GetWkt();
......@@ -411,7 +411,7 @@ private:
m_ResampleFilter = ResampleFilterType::New();
m_ResampleFilter->SetInput(inImage);
// Set the output projection Ref
// Set the output projection Ref
m_ResampleFilter->SetInputProjectionRef(inImage->GetProjectionRef());
m_ResampleFilter->SetInputKeywordList(inImage->GetImageKeywordlist());
m_ResampleFilter->SetOutputProjectionRef(m_OutputProjectionRef);
......@@ -445,7 +445,7 @@ private:
break;
}
// DEM
// DEM
if (IsParameterEnabled("dem") && HasValue("dem"))
{
m_ResampleFilter->SetDEMDirectory(GetParameterString("dem"));
......@@ -492,7 +492,7 @@ private:
m_ResampleFilter->SetDeformationFieldSpacing(gridSpacing);
}
// Output Image
// Output Image
SetParameterOutputImage("out", m_ResampleFilter->GetOutput());
}
......
......@@ -160,11 +160,11 @@ private:
SetParameterDescription("index.laindvilog", "Leaf Area Index from NDVI using a logarithmic relationship");
AddParameter(ParameterType_Empty, "index.lairefl", "LAIFromReflLinear");
MandatoryOff("index.lairefl");
MandatoryOff("index.lairefl");
SetParameterDescription("index.lairefl", "Leaf Area Index from reflectance using a linear relationship");
AddParameter(ParameterType_Empty, "index.laindviformo", "LAIFromNDVIFormo");
MandatoryOff("index.laindviformo");
MandatoryOff("index.laindviformo");
SetParameterDescription("index.laindviformo", "Leaf Area Index from reflectance using using formula a*(exp(nir-red)/((red+nir)*b)-exp(c*b)), with a = 0.1519 b = 3.9443 c = 0.13. This formula is only valid for Formosat 2 reflectance TOCa linear relationship.");
}
......@@ -173,9 +173,9 @@ private:
if ( HasValue("in") )
{
// Put the limit of the channel indices
dynamic_cast< NumericalParameter<int> * >(GetParameterByKey("channels.red"))->SetMinimumValue(1);
dynamic_cast< NumericalParameter<int> * >(GetParameterByKey("channels.red"))->SetMinimumValue(1);
dynamic_cast< NumericalParameter<int> * >(GetParameterByKey("channels.red"))->SetMaximumValue(GetParameterImage("in")->GetNumberOfComponentsPerPixel());
dynamic_cast< NumericalParameter<int> * >(GetParameterByKey("channels.nir"))->SetMinimumValue(1);
dynamic_cast< NumericalParameter<int> * >(GetParameterByKey("channels.nir"))->SetMinimumValue(1);
dynamic_cast< NumericalParameter<int> * >(GetParameterByKey("channels.nir"))->SetMaximumValue(GetParameterImage("in")->GetNumberOfComponentsPerPixel());
}
}
......
......@@ -116,7 +116,7 @@ private:
std::ostringstream oss;
oss << "Sensor relative spectral response file"<<std::endl;
oss << "By default the application gets these informations in the metadata";
SetParameterDescription("rsr",oss.str());
SetParameterDescription("rsr", oss.str());
MandatoryOff("rsr");
AddParameter(ParameterType_Choice, "aerosol", "Aerosol Model");
......@@ -214,7 +214,7 @@ private:
}
break;
}
// Set the atmospheric param
// Set the atmospheric param
m_AtmosphericParam->SetOzoneAmount(GetParameterFloat("oz"));
m_AtmosphericParam->SetWaterVaporAmount(GetParameterFloat("wa"));
m_AtmosphericParam->SetAtmosphericPressure(GetParameterFloat("atmo"));
......@@ -236,7 +236,7 @@ private:
m_ReflectanceToSurfaceReflectanceFilter->SetAeronetFileName(GetParameterString("AeronetFile"));
}
//
//
AtmosphericRadiativeTerms::Pointer radTerms = AtmosphericRadiativeTerms::New();
radTerms->ValuesInitialization(inImage->GetNumberOfComponentsPerPixel());
m_ReflectanceToSurfaceReflectanceFilter->SetAtmosphericRadiativeTerms(radTerms);
......
......@@ -63,7 +63,7 @@ private:
SetDocSeeAlso(" ");
SetDocCLExample("otbApplicationLauncherCommandLine BandMath ${OTB-BIN}/bin"
" --il ${OTB-Data}/oupees_sub_c1.png ${OTB-Data}/oupees_sub_c2.png ${OTB-Data}/oupees_sub.png"
"--out apTvUtBandMathOutput.tif --exp \"cos(im1b1)+im2b1*im3b1-im3b2+ndvi(im3b3,im3b4)\"");
"--out apTvUtBandMathOutput.tif --exp \"cos(im1b1)+im2b1*im3b1-im3b2+ndvi(im3b3, im3b4)\"");
AddDocTag("Util");
}
......@@ -124,7 +124,7 @@ private:
otb::Parser::Pointer dummyParser = otb::Parser::New();
std::vector<double> dummyVars;
std::string success = "The expression is Valid";
SetParameterDescription("exp",success);
SetParameterDescription("exp", success);
std::ostringstream failure;
if (HasValue("exp"))
......@@ -146,7 +146,7 @@ private:
{
// Change the parameter description to be able to have the
// parser errors in the tooltip
SetParameterDescription("exp",err.GetDescription());
SetParameterDescription("exp", err.GetDescription());
}
}
}
......@@ -175,7 +175,7 @@ private:
FloatVectorImageType::Pointer currentImage = inList->GetNthElement(i);
currentImage->UpdateOutputInformation();
otbAppLogINFO( << "Image #" << i + 1 << " has "
otbAppLogINFO( << "Image #" << i + 1 << " has "
<< currentImage->GetNumberOfComponentsPerPixel()
<< " components" << std::endl );
......
......@@ -48,7 +48,7 @@ public:
typedef otb::ImageList<FloatImageType> ImageListType;
typedef ImageListToVectorImageFilter<ImageListType,
FloatVectorImageType > ListConcatenerFilterType;
typedef MultiToMonoChannelExtractROI<FloatVectorImageType::InternalPixelType,
typedef MultiToMonoChannelExtractROI<FloatVectorImageType::InternalPixelType,
FloatImageType::PixelType> ExtractROIFilterType;
typedef ObjectList<ExtractROIFilterType> ExtractROIFilterListType;
......@@ -97,7 +97,7 @@ private:
}
void DoExecute()
{
{
// Get the input image list
FloatVectorImageListType::Pointer inList = this->GetParameterImageList("il");
......@@ -116,7 +116,7 @@ private:
FloatVectorImageType::Pointer vectIm = inList->GetNthElement(i);
vectIm->UpdateOutputInformation();
if( size != vectIm->GetLargestPossibleRegion().GetSize() )
{
{
itkExceptionMacro("Input Image size mismatch...");
}
......@@ -132,7 +132,6 @@ private:
}
m_Concatener->SetInput( m_ImageList );
SetParameterOutputImage("out", m_Concatener->GetOutput());
......
......@@ -121,7 +121,7 @@ private:
template<class TImageType>
void GenericDoExecute()
{
{
typename TImageType::Pointer castIm;
std::string rescaleType = this->GetParameterString("type");
......@@ -240,7 +240,7 @@ private:
void DoExecute()
{
{
switch ( this->GetParameterOutputImagePixelType("out") )
{
case ImagePixelType_int8:
......
......@@ -43,7 +43,7 @@ public:
itkTypeMacro(ExtractROI, otb::Application);
/** Filters typedef */
typedef otb::MultiChannelExtractROI<FloatVectorImageType::InternalPixelType,
typedef otb::MultiChannelExtractROI<FloatVectorImageType::InternalPixelType,
FloatVectorImageType::InternalPixelType> ExtractROIFilterType;
private:
......@@ -117,16 +117,16 @@ private:
}
// Put the limit of the index and the size relative the image
dynamic_cast< NumericalParameter<int> * >(GetParameterByKey("sizex"))->SetMinimumValue(0);
dynamic_cast< NumericalParameter<int> * >(GetParameterByKey("sizex"))->SetMinimumValue(0);
dynamic_cast< NumericalParameter<int> * >(GetParameterByKey("sizex"))->SetMaximumValue(largestRegion.GetSize(0));
dynamic_cast< NumericalParameter<int> * >(GetParameterByKey("sizey"))->SetMinimumValue(0);
dynamic_cast< NumericalParameter<int> * >(GetParameterByKey("sizey"))->SetMinimumValue(0);
dynamic_cast< NumericalParameter<int> * >(GetParameterByKey("sizey"))->SetMaximumValue(largestRegion.GetSize(1));
dynamic_cast< NumericalParameter<int> * >(GetParameterByKey("startx"))->SetMinimumValue(0);
dynamic_cast< NumericalParameter<int> * >(GetParameterByKey("startx"))->SetMinimumValue(0);
dynamic_cast< NumericalParameter<int> * >(GetParameterByKey("startx"))->SetMaximumValue(largestRegion.GetSize(0));
dynamic_cast< NumericalParameter<int> * >(GetParameterByKey("starty"))->SetMinimumValue(0);
dynamic_cast< NumericalParameter<int> * >(GetParameterByKey("starty"))->SetMinimumValue(0);
dynamic_cast< NumericalParameter<int> * >(GetParameterByKey("starty"))->SetMaximumValue(largestRegion.GetSize(1));
// Crop the roi region to be included in the largest possible
......@@ -164,7 +164,7 @@ private:
}
void DoExecute()
{
{
ExtractROIFilterType::InputImageType* inImage = GetParameterImage("in");
m_ExtractROIFilter = ExtractROIFilterType::New();
......
......@@ -82,7 +82,7 @@ private:
AddParameter(ParameterType_Filename, "out", "Output Image");
SetParameterDescription("out","will be used to get the prefix and the extension of the images to write");
SetParameterRole("out",Role_Output);
SetParameterRole("out", Role_Output);
AddParameter(ParameterType_Int, "level", "Number Of Levels");
SetDefaultParameterInt("level", 1);
......@@ -179,7 +179,7 @@ private:
paramOut->SetValue(m_ShrinkFilter->GetOutput());
// Add the current level to be written
paramOut->InitializeWriters();
AddProcess(paramOut->GetWriter(),osswriter.str());
AddProcess(paramOut->GetWriter(), osswriter.str());
paramOut->Write();
++currentLevel;
......
......@@ -183,7 +183,6 @@ private:
};
}
}
......
......@@ -44,7 +44,7 @@ public:
itkTypeMacro(SplitImage, Application);
/** Filters typedef */
typedef otb::MultiToMonoChannelExtractROI<FloatVectorImageType::InternalPixelType,
typedef otb::MultiToMonoChannelExtractROI<FloatVectorImageType::InternalPixelType,
FloatVectorImageType::InternalPixelType> FilterType;
private:
......@@ -71,7 +71,7 @@ private:
AddParameter(ParameterType_Filename, "out", "Output Image");
SetParameterDescription("out",
"Will be used to get the prefix and the extension of the output images to write");
SetParameterRole("out",Role_Output);
SetParameterRole("out", Role_Output);
}
void DoUpdateParameters()
......@@ -100,7 +100,7 @@ private:
for (unsigned int i = 0; i < inImage->GetNumberOfComponentsPerPixel(); ++i)
{
// Set the channel to extract
m_Filter->SetChannel(i+1);
m_Filter->SetChannel(i+1);
// build the current output filename
std::ostringstream oss;
......@@ -118,11 +118,11 @@ private:
paramOut->SetValue(m_Filter->GetOutput());
// Add the current level to be written
paramOut->InitializeWriters();
AddProcess(paramOut->GetWriter(),osswriter.str());
AddProcess(paramOut->GetWriter(), osswriter.str());
paramOut->Write();
}
// Disable the output Image parameter to avoid writing
// Disable the output Image parameter to avoid writing
// the last image (Application::ExecuteAndWriteOutput method)
GetParameterByKey("out")->SetActive(false);
}
......
......@@ -183,9 +183,9 @@ public:
*/
void SetParameterFloat(std::string parameter, float value);
/* Set an default integer value,must used in the
/* Set an default integer value, must used in the
* DoCreateParameters when setting a value by default
* for the parameter
* for the parameter
*
* Can be called for types :
* \li ParameterType_Int
......@@ -195,9 +195,9 @@ public:
*/
void SetDefaultParameterInt(std::string parameter, int value);
/* Set a default floating value, must used in the
/* Set a default floating value, must used in the
* DoCreateParameters when setting a value by default
* for the parameter
* for the parameter
*
* Can be called for types :
* \li ParameterType_Float
......
......@@ -93,10 +93,10 @@ void QtWidgetParameterGroup::DoCreateWidget()
}
gridLayout->addWidget(checkBox, i, 0);
// Reset Button
// Reset Button
// Make sense only for NumericalParameter
if (dynamic_cast<IntParameter*>(param)
|| dynamic_cast<FloatParameter*>(param)
|| dynamic_cast<FloatParameter*>(param)
|| dynamic_cast<RadiusParameter*>(param) )
{
QPushButton* resetButton = new QPushButton;
......
......@@ -155,7 +155,7 @@ QWidget* QtWidgetView::CreateDoc()
for (unsigned int i = 0; i < m_Application->GetDocTags().size() - 1; i++)
{
oss << m_Application->GetDocTags()[i] << ", ";
;
;
}
oss << m_Application->GetDocTags()[m_Application->GetDocTags().size() - 1];
}
......@@ -256,7 +256,7 @@ void QtWidgetView::GetDocParameterGroup( std::string & val, const std::string &
std::string spaces, equals;
for(unsigned int i=0; i<level; i++)
{
spaces.append("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
spaces.append("&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;");
equals.append("===");
}
equals.append("===");
......
......@@ -247,7 +247,6 @@ int main(int argc, char * argv[])
// Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
while (pIt != filter->GetOutput()->GetPoints()->End())
{
// Software Guide : EndCodeSnippet
......
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