From 5e2cd2e01087ab59403a4bba8306a29c5cb2e69e Mon Sep 17 00:00:00 2001 From: OTB Bot <otbbot@orfeo-toolbox.org> Date: Wed, 30 Nov 2011 19:55:45 +0100 Subject: [PATCH] STYLE --- .../otbHyperspectralUnmixing.cxx | 2 +- .../otbObtainUTMZoneFromGeoPoint.cxx | 4 +- .../Radiometry/otbOpticalCalibration.cxx | 2 +- .../Rasterization/otbRasterization.cxx | 6 +- Applications/Utils/otbReadImageInfo.cxx | 58 +++++++++---------- .../otbWrapperDocExampleStructure.cxx | 24 ++++---- .../otbWrapperDocExampleStructure.h | 2 +- .../otbWrapperDocExampleStructureTest.cxx | 2 +- 8 files changed, 50 insertions(+), 50 deletions(-) diff --git a/Applications/Hyperspectral/otbHyperspectralUnmixing.cxx b/Applications/Hyperspectral/otbHyperspectralUnmixing.cxx index 0a07bad779..2b5033e5f5 100644 --- a/Applications/Hyperspectral/otbHyperspectralUnmixing.cxx +++ b/Applications/Hyperspectral/otbHyperspectralUnmixing.cxx @@ -107,7 +107,7 @@ private: // Documentation SetDocName("Hyperspectral data unmixing"); - SetDocLongDescription("The application applies a linear unmixing algorithm to an hyperspectral data cube. This method supposes that the mixture between materials in the scene is macroscopic and simulate a linear mixing model of spectra.\nThe Linear Mixing Model (LMM) acknowledges that reflectance spectrum associated with each pixel is a linear combination of pure materials in the recovery area, commonly known as endmembers.Endmembers can be estimated using the VertexComponentAnalysis application.\nThe application allows to estimate the abundance maps with several algorithms : Unconstrained Least Square (ucls), Fully Constrained Least Square (fcls),Image Space Reconstruction Algorithm (isra) and Non-negative constrained Least Square (ncls) and Minimum Dispertion Constrained Non Negative Matrix Factorization (MDMDNMF).\n"); + SetDocLongDescription("The application applies a linear unmixing algorithm to an hyperspectral data cube. This method supposes that the mixture between materials in the scene is macroscopic and simulate a linear mixing model of spectra.\nThe Linear Mixing Model (LMM) acknowledges that reflectance spectrum associated with each pixel is a linear combination of pure materials in the recovery area, commonly known as endmembers.Endmembers can be estimated using the VertexComponentAnalysis application.\nThe application allows to estimate the abundance maps with several algorithms : Unconstrained Least Square (ucls), Fully Constrained Least Square (fcls), Image Space Reconstruction Algorithm (isra) and Non-negative constrained Least Square (ncls) and Minimum Dispertion Constrained Non Negative Matrix Factorization (MDMDNMF).\n"); SetDocLimitations("None"); SetDocAuthors("OTB-Team"); SetDocSeeAlso("VertexComponentAnalysis"); diff --git a/Applications/Projections/otbObtainUTMZoneFromGeoPoint.cxx b/Applications/Projections/otbObtainUTMZoneFromGeoPoint.cxx index f7d4f5e4f7..1715abe43c 100644 --- a/Applications/Projections/otbObtainUTMZoneFromGeoPoint.cxx +++ b/Applications/Projections/otbObtainUTMZoneFromGeoPoint.cxx @@ -86,8 +86,8 @@ private: void DoExecute() { int utmZone = otb::Utils::GetZoneFromGeoPoint(GetParameterFloat("lon"), - GetParameterFloat("lat")); - SetParameterInt("utm",utmZone); + GetParameterFloat("lat")); + SetParameterInt("utm", utmZone); } }; diff --git a/Applications/Radiometry/otbOpticalCalibration.cxx b/Applications/Radiometry/otbOpticalCalibration.cxx index 060d48b532..4e93234c05 100644 --- a/Applications/Radiometry/otbOpticalCalibration.cxx +++ b/Applications/Radiometry/otbOpticalCalibration.cxx @@ -151,7 +151,7 @@ private: // Doc example parameter settings SetDocExampleParameterValue("in", "WV2_MUL_ROI_1000_100.tif"); SetDocExampleParameterValue("level", "toa"); - SetDocExampleParameterValue("out", "OpticalCalibration.tif"); + SetDocExampleParameterValue("out", "OpticalCalibration.tif"); } void DoUpdateParameters() diff --git a/Applications/Rasterization/otbRasterization.cxx b/Applications/Rasterization/otbRasterization.cxx index f642dee411..6a516d59b1 100644 --- a/Applications/Rasterization/otbRasterization.cxx +++ b/Applications/Rasterization/otbRasterization.cxx @@ -132,7 +132,7 @@ private: SetDocExampleParameterValue("szx","1100"); SetDocExampleParameterValue("szy","1100"); - } + } void DoUpdateParameters() { @@ -159,7 +159,7 @@ private: // a reference image is given as input if (HasValue("im")) { - if (HasValue("szx") || HasValue("szy") || HasValue("orx") || HasValue("ory") + if (HasValue("szx") || HasValue("szy") || HasValue("orx") || HasValue("ory") || HasValue("spx") || HasValue("spy") || HasValue("epsg")) { otbAppLogWARNING("A reference image has been given, other parameters " @@ -267,7 +267,7 @@ private: AddProcess(m_VectorDataRendering,"Rasterization"); - SetParameterOutputImage<UInt8ImageType>("out",outputImage); + SetParameterOutputImage<UInt8ImageType>("out", outputImage); } diff --git a/Applications/Utils/otbReadImageInfo.cxx b/Applications/Utils/otbReadImageInfo.cxx index b8569d6e98..4f9a8e0fbf 100644 --- a/Applications/Utils/otbReadImageInfo.cxx +++ b/Applications/Utils/otbReadImageInfo.cxx @@ -134,7 +134,7 @@ private: SetParameterDescription("rgb.b","Blue band Number"); SetDefaultParameterInt("rgb.b", 3); - AddParameter(ParameterType_String,"projectionref","Projection Coordinate System"); + AddParameter(ParameterType_String,"projectionref","Projection Coordinate System"); GetParameterByKey("projectionref")->SetRole(Role_Output); AddParameter(ParameterType_String,"keywordlist","Image Keywordlist"); @@ -164,7 +164,7 @@ private: void DoExecute() { - try + try { FloatVectorImageType::Pointer inImage = GetParameterImage("in"); // Read informations @@ -172,19 +172,19 @@ private: ImageMetadataInterfaceType::Pointer metadataInterface = ImageMetadataInterfaceFactory::CreateIMI(inImage->GetMetaDataDictionary()); //Get image size - SetParameterInt("sizex",inImage->GetLargestPossibleRegion().GetSize()[0]); - SetParameterInt("sizey",inImage->GetLargestPossibleRegion().GetSize()[1]); + SetParameterInt("sizex", inImage->GetLargestPossibleRegion().GetSize()[0]); + SetParameterInt("sizey", inImage->GetLargestPossibleRegion().GetSize()[1]); //Get image spacing - SetParameterInt("spacingx",inImage->GetSpacing()[0]); - SetParameterInt("spacingy",inImage->GetSpacing()[1]); + SetParameterInt("spacingx", inImage->GetSpacing()[0]); + SetParameterInt("spacingy", inImage->GetSpacing()[1]); - SetParameterInt("numberbands",inImage->GetNumberOfComponentsPerPixel()); + SetParameterInt("numberbands", inImage->GetNumberOfComponentsPerPixel()); //std::cout << "metadata " << metadataInterface << std::endl; - SetParameterString("sensor",metadataInterface->GetSensorID()); - SetParameterString("id",metadataInterface->GetImageKeywordlist().GetMetadataByKey("image_id")); - SetParameterString("projectionref",metadataInterface->GetProjectionRef()); + SetParameterString("sensor", metadataInterface->GetSensorID()); + SetParameterString("id", metadataInterface->GetImageKeywordlist().GetMetadataByKey("image_id")); + SetParameterString("projectionref", metadataInterface->GetProjectionRef()); // Format acquisition time itk::OStringStream osstime; @@ -202,11 +202,11 @@ private: osstime<<"0"; osstime<<metadataInterface->GetMinute(); osstime<<":00"; - SetParameterString("time",osstime.str()); + SetParameterString("time", osstime.str()); itk::OStringStream osskeywordlist; osskeywordlist<<metadataInterface->GetImageKeywordlist() << std::endl; - SetParameterString("keywordlist",osskeywordlist.str()); + SetParameterString("keywordlist", osskeywordlist.str()); double ullat = atof(metadataInterface->GetImageKeywordlist().GetMetadataByKey("ul_lat").c_str()); double ullon = atof(metadataInterface->GetImageKeywordlist().GetMetadataByKey("ul_lon").c_str()); @@ -217,12 +217,12 @@ private: double lllat = atof(metadataInterface->GetImageKeywordlist().GetMetadataByKey("ll_lat").c_str()); double lllon = atof(metadataInterface->GetImageKeywordlist().GetMetadataByKey("ll_lon").c_str()); - SetParameterInt("rgb.r",metadataInterface->GetDefaultDisplay()[0]); - SetParameterInt("rgb.g",metadataInterface->GetDefaultDisplay()[1]); - SetParameterInt("rgb.b",metadataInterface->GetDefaultDisplay()[2]); + SetParameterInt("rgb.r", metadataInterface->GetDefaultDisplay()[0]); + SetParameterInt("rgb.g", metadataInterface->GetDefaultDisplay()[1]); + SetParameterInt("rgb.b", metadataInterface->GetDefaultDisplay()[2]); - SetParameterInt("gcp.count",metadataInterface->GetGCPCount()); - SetParameterString("gcp.proj",metadataInterface->GetGCPProjection()); + SetParameterInt("gcp.count", metadataInterface->GetGCPCount()); + SetParameterString("gcp.proj", metadataInterface->GetGCPProjection()); std::vector<std::string> gcp_ids; std::vector<std::string> gcp_infos; @@ -233,18 +233,18 @@ private: gcp_infos.push_back(metadataInterface->GetGCPInfo(gcpIdx)); } - SetParameterStringList("gcp.ids",gcp_ids); - SetParameterStringList("gcp.info",gcp_infos); + SetParameterStringList("gcp.ids", gcp_ids); + SetParameterStringList("gcp.info", gcp_infos); // Retrieve footprint - SetParameterFloat("ullat",ullat); - SetParameterFloat("ullon",ullon); - SetParameterFloat("urlat",urlat); - SetParameterFloat("urlon",urlon); - SetParameterFloat("lrlat",lrlat); - SetParameterFloat("lrlon",lrlon); - SetParameterFloat("lllat",lllat); - SetParameterFloat("lllon",lllon); + SetParameterFloat("ullat", ullat); + SetParameterFloat("ullon", ullon); + SetParameterFloat("urlat", urlat); + SetParameterFloat("urlon", urlon); + SetParameterFloat("lrlat", lrlat); + SetParameterFloat("lrlon", lrlon); + SetParameterFloat("lllat", lllat); + SetParameterFloat("lllon", lllon); double centerlat = 0.25*(ullat+urlat+lrlat+lllat); double centerlon = 0.25*(ullon+urlon+lrlon+lllon); @@ -254,8 +254,8 @@ private: coord2name->SetLon(centerlon); coord2name->Evaluate(); - SetParameterString("town",coord2name->GetPlaceName()); - SetParameterString("country",coord2name->GetCountryName()); + SetParameterString("town", coord2name->GetPlaceName()); + SetParameterString("country", coord2name->GetCountryName()); } catch ( itk::ExceptionObject & err ) { diff --git a/Code/ApplicationEngine/otbWrapperDocExampleStructure.cxx b/Code/ApplicationEngine/otbWrapperDocExampleStructure.cxx index 52c8903c2b..9d8f12f8e3 100644 --- a/Code/ApplicationEngine/otbWrapperDocExampleStructure.cxx +++ b/Code/ApplicationEngine/otbWrapperDocExampleStructure.cxx @@ -41,10 +41,10 @@ DocExampleStructure::AddParameter( const std::string key, const std::string valu { - m_ParameterList.at(exId).push_back(std::make_pair(key,value)); + m_ParameterList.at(exId).push_back(std::make_pair(key, value)); } -DocExampleStructure::ParametersVectorOfVectorType +DocExampleStructure::ParametersVectorOfVectorType DocExampleStructure::GetParameterList() { return m_ParameterList; @@ -58,25 +58,25 @@ DocExampleStructure::GetParameterKey( unsigned int i, unsigned int exId) } -std::string +std::string DocExampleStructure::GetParameterValue( unsigned int i, unsigned int exId ) { return m_ParameterList.at(exId).at(i).second; } -void +void DocExampleStructure::SetApplicationName( const std::string name ) { m_ApplicationName = name; } -std::string +std::string DocExampleStructure::GetApplicationName() { return m_ApplicationName; } -std::vector<std::string> +std::vector<std::string> DocExampleStructure::GetExampleCommentList() { return m_ExampleCommentList; @@ -98,7 +98,7 @@ DocExampleStructure::SetExampleComment( const std::string & comm, unsigned int i } -unsigned int +unsigned int DocExampleStructure::AddExample( const std::string & comm ) { m_ExampleCommentList.push_back( comm ); @@ -110,7 +110,7 @@ DocExampleStructure::AddExample( const std::string & comm ) } -std::string +std::string DocExampleStructure::GenerateCLExample( unsigned int exId ) { if( m_ApplicationName.empty() || m_ParameterList.at(exId).empty() ) @@ -138,14 +138,14 @@ DocExampleStructure::GenerateCLExample( unsigned int exId ) return res; } -std::string +std::string DocExampleStructure::GenerateCLExample() { itk::OStringStream oss; for( unsigned int exId=0; exId<m_NbOfExamples; exId++) { if( !m_ExampleCommentList[exId].empty() ) - oss << m_ExampleCommentList[exId]<< std::endl; + oss << m_ExampleCommentList[exId]<< std::endl; oss << this->GenerateCLExample( exId ); oss << std::endl; } @@ -155,7 +155,7 @@ DocExampleStructure::GenerateCLExample() } -std::string +std::string DocExampleStructure::GenerateHtmlExample( unsigned int exId ) { if( m_ApplicationName.empty() || m_ParameterList.size() == 0 ) @@ -187,7 +187,7 @@ DocExampleStructure::GenerateHtmlExample( unsigned int exId ) } -std::string +std::string DocExampleStructure::GenerateHtmlExample() { itk::OStringStream oss; diff --git a/Code/ApplicationEngine/otbWrapperDocExampleStructure.h b/Code/ApplicationEngine/otbWrapperDocExampleStructure.h index 533434b14d..91abef0b04 100644 --- a/Code/ApplicationEngine/otbWrapperDocExampleStructure.h +++ b/Code/ApplicationEngine/otbWrapperDocExampleStructure.h @@ -57,7 +57,7 @@ public: /** Runtime information */ itkTypeMacro(DocExampleStructure, itk::Object); - typedef std::pair<std::string,std::string> ParameterType; + typedef std::pair<std::string, std::string> ParameterType; typedef std::vector<ParameterType> ParametersVectorType; typedef std::vector<ParametersVectorType> ParametersVectorOfVectorType; diff --git a/Testing/Code/ApplicationEngine/otbWrapperDocExampleStructureTest.cxx b/Testing/Code/ApplicationEngine/otbWrapperDocExampleStructureTest.cxx index a957f532b2..03753c2fe1 100644 --- a/Testing/Code/ApplicationEngine/otbWrapperDocExampleStructureTest.cxx +++ b/Testing/Code/ApplicationEngine/otbWrapperDocExampleStructureTest.cxx @@ -56,7 +56,7 @@ int otbWrapperDocExampleStructureTest(int argc, char* argv[]) return EXIT_FAILURE; } ofs << docStruct->GenerateCLExample(); - ofs.close(); + ofs.close(); return EXIT_SUCCESS; } -- GitLab