Skip to content
Snippets Groups Projects
Commit 8f3eba3b authored by OTB Bot's avatar OTB Bot
Browse files

STYLE

parent c79e1d59
No related branches found
No related tags found
No related merge requests found
...@@ -87,7 +87,6 @@ typedef otb::VectorData<VectorDataCoordinatePrecisionType, ...@@ -87,7 +87,6 @@ typedef otb::VectorData<VectorDataCoordinatePrecisionType,
typedef otb::ObjectList<FloatVectorImageType> FloatVectorImageListType; typedef otb::ObjectList<FloatVectorImageType> FloatVectorImageListType;
} // end namespace Wrapper } // end namespace Wrapper
} //end namespace otb } //end namespace otb
......
...@@ -35,7 +35,7 @@ int main(int argc, char* argv[]) ...@@ -35,7 +35,7 @@ int main(int argc, char* argv[])
if( i!= argc-1) if( i!= argc-1)
{ {
exp.append(argv[i]); exp.append(argv[i]);
exp.append(" "); exp.append(" ");
} }
else else
{ {
......
...@@ -85,7 +85,7 @@ CommandLineLauncher::Load() ...@@ -85,7 +85,7 @@ CommandLineLauncher::Load()
if( this->CheckUnicity() == false ) if( this->CheckUnicity() == false )
{ {
std::cerr<<"ERROR: At least one key is not unique in the expression..."<<std::endl; std::cerr<<"ERROR: At least one key is not unique in the expression..."<<std::endl;
return false; return false;
} }
if ( this->LoadPath() == false ) if ( this->LoadPath() == false )
...@@ -110,7 +110,7 @@ CommandLineLauncher::Execute() ...@@ -110,7 +110,7 @@ CommandLineLauncher::Execute()
m_Application->Execute(); m_Application->Execute();
return true; return true;
} }
bool bool
...@@ -132,7 +132,7 @@ CommandLineLauncher::BeforeExecute() ...@@ -132,7 +132,7 @@ CommandLineLauncher::BeforeExecute()
{ {
if( m_Application.IsNull() ) if( m_Application.IsNull() )
{ {
itkExceptionMacro("No application loaded"); itkExceptionMacro("No application loaded");
} }
// if help is asked... // if help is asked...
...@@ -209,7 +209,7 @@ CommandLineLauncher::LoadPath() ...@@ -209,7 +209,7 @@ CommandLineLauncher::LoadPath()
// Contain paths into a string, separating each path with ":" // Contain paths into a string, separating each path with ":"
m_Path = std::string(""); m_Path = std::string("");
for( unsigned i=0; i<pathList.size(); i++) for( unsigned i=0; i<pathList.size(); i++)
{ {
m_Path.append(pathList[i]); m_Path.append(pathList[i]);
m_Path.append(":"); m_Path.append(":");
} }
...@@ -232,7 +232,7 @@ CommandLineLauncher::LoadApplication() ...@@ -232,7 +232,7 @@ CommandLineLauncher::LoadApplication()
std::string moduleName; std::string moduleName;
if( m_Parser->GetModuleName( moduleName, m_Expression ) != CommandLineParser::OK ) if( m_Parser->GetModuleName( moduleName, m_Expression ) != CommandLineParser::OK )
{ {
std::cerr << "ERROR: LoadApplication, no module found..." <<std::endl; std::cerr << "ERROR: LoadApplication, no module found..." <<std::endl;
return; return;
} }
...@@ -310,8 +310,8 @@ CommandLineLauncher::LoadParameters() ...@@ -310,8 +310,8 @@ CommandLineLauncher::LoadParameters()
// Single value parameter // Single value parameter
if( type == ParameterType_Choice || type == ParameterType_Float || type == ParameterType_Int || type == ParameterType_Radius if( type == ParameterType_Choice || type == ParameterType_Float || type == ParameterType_Int || type == ParameterType_Radius
|| type == ParameterType_Directory || type == ParameterType_String || type == ParameterType_Filename || type == ParameterType_InputComplexImage || type == ParameterType_Directory || type == ParameterType_String || type == ParameterType_Filename || type == ParameterType_InputComplexImage
|| type == ParameterType_InputImage || type == ParameterType_InputVectorData || type == ParameterType_OutputImage || type == ParameterType_OutputVectorData ) || type == ParameterType_InputImage || type == ParameterType_InputVectorData || type == ParameterType_OutputImage || type == ParameterType_OutputVectorData )
{ {
m_Application->SetParameterString( param->GetKey(), values[0] ); m_Application->SetParameterString( param->GetKey(), values[0] );
...@@ -354,11 +354,11 @@ CommandLineLauncher::LinkWatchers() ...@@ -354,11 +354,11 @@ CommandLineLauncher::LinkWatchers()
std::vector<std::string> paramList = m_Application->GetParametersKeys(true); std::vector<std::string> paramList = m_Application->GetParametersKeys(true);
std::vector<std::string>::const_iterator it = paramList.begin(); std::vector<std::string>::const_iterator it = paramList.begin();
std::cout<<"BRRRRRRRRRRRRRRR"<<std::endl; std::cout<<"BRRRRRRRRRRRRRRR"<<std::endl;
for ( ; it != paramList.end(); ++it) for (; it != paramList.end(); ++it)
{ {
if (m_Application->GetParameterType(*it) == ParameterType_OutputImage) if (m_Application->GetParameterType(*it) == ParameterType_OutputImage)
{ {
std::cout<<"-------------------------------------------------------------t'en as?"<<std::endl; std::cout<<"-------------------------------------------------------------t'en as?"<<std::endl;
Parameter* param = m_Application->GetParameterByKey(*it); Parameter* param = m_Application->GetParameterByKey(*it);
OutputImageParameter* outputParam = dynamic_cast<OutputImageParameter*>(param); OutputImageParameter* outputParam = dynamic_cast<OutputImageParameter*>(param);
itk::OStringStream oss; itk::OStringStream oss;
...@@ -398,7 +398,7 @@ CommandLineLauncher::DisplayHelp() ...@@ -398,7 +398,7 @@ CommandLineLauncher::DisplayHelp()
std::cerr<<"\t Description: Paths to the executable library."<<std::endl; std::cerr<<"\t Description: Paths to the executable library."<<std::endl;
if( !m_Parser->IsAttributExists( m_Parser->GetModulePathKey(), m_Expression ) ) if( !m_Parser->IsAttributExists( m_Parser->GetModulePathKey(), m_Expression ) )
std::cerr<<"\t Status: ENVIRONEMENT PATH"<<std::endl; std::cerr<<"\t Status: ENVIRONEMENT PATH"<<std::endl;
else if( m_Path == "") else if( m_Path == "")
std::cerr<< "\t Status: NO VALUE ASSOCIATED "<<m_Path<<std::endl; std::cerr<< "\t Status: NO VALUE ASSOCIATED "<<m_Path<<std::endl;
else else
std::cerr<< "\t Status: USER VALUE: "<<m_Path<<std::endl; std::cerr<< "\t Status: USER VALUE: "<<m_Path<<std::endl;
...@@ -421,7 +421,7 @@ CommandLineLauncher::DisplayHelp() ...@@ -421,7 +421,7 @@ CommandLineLauncher::DisplayHelp()
std::cerr<<"\t Default value: 1"<< std::endl; std::cerr<<"\t Default value: 1"<< std::endl;
if( !m_Parser->IsAttributExists( "--progress", m_Expression ) ) if( !m_Parser->IsAttributExists( "--progress", m_Expression ) )
std::cerr<<"\t Status: DEFAULT VALUE"<<std::endl; std::cerr<<"\t Status: DEFAULT VALUE"<<std::endl;
else if( m_Parser->GetAttribut( "--progress", m_Expression ).size() == 0 ) else if( m_Parser->GetAttribut( "--progress", m_Expression ).size() == 0 )
std::cerr<< "\t Status: none"<<m_Path<<std::endl; std::cerr<< "\t Status: none"<<m_Path<<std::endl;
else else
std::cerr<< "\t Status: USER VALUE: "<<m_Parser->GetAttribut( "--progress", m_Expression )[0]<<std::endl; std::cerr<< "\t Status: USER VALUE: "<<m_Parser->GetAttribut( "--progress", m_Expression )[0]<<std::endl;
......
...@@ -38,7 +38,7 @@ namespace Wrapper ...@@ -38,7 +38,7 @@ namespace Wrapper
/** \class CommandLineLauncher /** \class CommandLineLauncher
* \brief This class check the validity of a command line application. * \brief This class check the validity of a command line application.
* *
* To be valid, the expression must be as follow: * To be valid, the expression must be as follow:
* ModuleName --attribut1_Key attrubut1_Value --attribut2_Key attrubut2_Value * ModuleName --attribut1_Key attrubut1_Value --attribut2_Key attrubut2_Value
* After the attribut key, if the user give several values (expression without \"--\" separated by space), it will automacally be interpreted as a list. * After the attribut key, if the user give several values (expression without \"--\" separated by space), it will automacally be interpreted as a list.
...@@ -59,7 +59,7 @@ public: ...@@ -59,7 +59,7 @@ public:
itkNewMacro(Self); itkNewMacro(Self);
/** RTTI support */ /** RTTI support */
itkTypeMacro(CommandLineLauncher,itk::Object); itkTypeMacro(CommandLineLauncher, itk::Object);
/** Parse result enum */ /** Parse result enum */
typedef CommandLineParser::ParseResultType ParseResultType; typedef CommandLineParser::ParseResultType ParseResultType;
...@@ -79,22 +79,22 @@ public: ...@@ -79,22 +79,22 @@ public:
/** same as Load method but set the expression before. */ /** same as Load method but set the expression before. */
bool Load( const std::string & exp ); bool Load( const std::string & exp );
/** Launch the process, using the Execute application method /** Launch the process, using the Execute application method
* The method will check if the user asked for help (looking at --help key) before loading parameter and launching process. * The method will check if the user asked for help (looking at --help key) before loading parameter and launching process.
**/ **/
bool Execute(); bool Execute();
/** Launch the process, using the ExecuteAndWriteOutput application method /** Launch the process, using the ExecuteAndWriteOutput application method
* The method will check if the user asked for help (looking at --help key) before loading parameter and launching process. * The method will check if the user asked for help (looking at --help key) before loading parameter and launching process.
*/ */
bool ExecuteAndWriteOutput(); bool ExecuteAndWriteOutput();
/** Gather the code process to do before Execute and ExecuteAndWriteOutput /** Gather the code process to do before Execute and ExecuteAndWriteOutput
* Returns false if a problem occurs, true otherwise. * Returns false if a problem occurs, true otherwise.
*/ */
bool BeforeExecute(); bool BeforeExecute();
/** Create and display the help of the application */ /** Create and display the help of the application */
void DisplayHelp(); void DisplayHelp();
protected: protected:
...@@ -109,20 +109,20 @@ protected: ...@@ -109,20 +109,20 @@ protected:
/** Load the executable path. It looks for the key --modulePath, extract and interpret as path the following strings. */ /** Load the executable path. It looks for the key --modulePath, extract and interpret as path the following strings. */
bool LoadPath(); bool LoadPath();
/** Load the application calling the CreateApplication method of the ApplicationRegistry classes. /** Load the application calling the CreateApplication method of the ApplicationRegistry classes.
* Pay attention, the executable paths have to be loaded or set in the environment before calling the function. */ * Pay attention, the executable paths have to be loaded or set in the environment before calling the function. */
void LoadApplication(); void LoadApplication();
/** Parse the user expression, extract the key and the associated string and set it as value of each corresonding application parameter. */ /** Parse the user expression, extract the key and the associated string and set it as value of each corresonding application parameter. */
CommandLineLauncher::ParamResultType LoadParameters(); CommandLineLauncher::ParamResultType LoadParameters();
/** Create and display the help of the application */ /** Create and display the help of the application */
std::string DisplayParameterHelp( const Parameter::Pointer & param ); std::string DisplayParameterHelp( const Parameter::Pointer & param );
/** Check if each key is unique in the expression. */ /** Check if each key is unique in the expression. */
bool CheckUnicity(); bool CheckUnicity();
/** Check if each key is valid for the application. */ /** Check if each key is valid for the application. */
bool CheckKeyValidity(); bool CheckKeyValidity();
/** Load the watchers for internal progress and writeing progress report. */ /** Load the watchers for internal progress and writeing progress report. */
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
Copyright (c) 2002 Insight Consortium. All rights reserved. Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information. PURPOSE. See the above copyright notices for more information.
=========================================================================*/ =========================================================================*/
...@@ -64,7 +64,7 @@ QtProgressBar::ProcessEvent( itk::Object * caller, ...@@ -64,7 +64,7 @@ QtProgressBar::ProcessEvent( itk::Object * caller,
} }
} }
void void
QtProgressBar::ConstProcessEvent( const itk::Object * caller, QtProgressBar::ConstProcessEvent( const itk::Object * caller,
const itk::EventObject & event ) const itk::EventObject & event )
{ {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
Copyright (c) 2002 Insight Consortium. All rights reserved. Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information. PURPOSE. See the above copyright notices for more information.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment