diff --git a/CI/Invoke-CmdScript.ps1 b/CI/Invoke-CmdScript.ps1 index 9d6ecbabc8285a317a92571245cfa1e736e42b6e..382e6b35464701abb4618e27c0b54942fc063bd6 100644 --- a/CI/Invoke-CmdScript.ps1 +++ b/CI/Invoke-CmdScript.ps1 @@ -24,7 +24,7 @@ PowerShell instance. .DESCRIPTION Running development tools at the command line in PowerShell can be a hassle since -they rely on environment varibles and those are set through batch files. This +they rely on environment variables and those are set through batch files. This cmdlet runs those batch files and imports any set environment variables into the running PowerShell instance. diff --git a/CMakeLists.txt b/CMakeLists.txt index c451398229892005ee0ef5338ce56b52dcc15747..c6c4538620210a187e70be3897ab806d20fdb881 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,7 +114,7 @@ set(main_project_name ${_OTBModuleMacros_DEFAULT_LABEL}) #----------------------------------------------------------------------------- # OTB version number. set(OTB_VERSION_MAJOR "9") -set(OTB_VERSION_MINOR "0") +set(OTB_VERSION_MINOR "1") set(OTB_VERSION_PATCH "0") set(OTB_VERSION_STRING "${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}.${OTB_VERSION_PATCH}") diff --git a/Examples/Classification/SOMImageClassificationExample.cxx b/Examples/Classification/SOMImageClassificationExample.cxx index dab2781dd88e54325dd7ddfbb33807807ce6ba94..00d5a4778a23beb6b6e5acddb1418180bec7d1da 100644 --- a/Examples/Classification/SOMImageClassificationExample.cxx +++ b/Examples/Classification/SOMImageClassificationExample.cxx @@ -51,12 +51,12 @@ int main(int itkNotUsed(argc), char* argv[]) // \doxygen{otb}{VectorImage}s. The labeled image will be a scalar image. using ImageType = otb::VectorImage<PixelType, Dimension>; - using LabeledImageType = otb::Image<LabeledPixelType, Dimension>; + using LabelledImageType = otb::Image<LabeledPixelType, Dimension>; // We can now define the type for the classifier filter, which is // templated over its input and output image types and the SOM type. using SOMMapType = otb::SOMMap<ImageType::PixelType>; - using ClassificationFilterType = otb::SOMImageClassificationFilter<ImageType, LabeledImageType, SOMMapType>; + using ClassificationFilterType = otb::SOMImageClassificationFilter<ImageType, LabelledImageType, SOMMapType>; // And finally, we define the readers (for the input image and theSOM) // and the writer. Since the images, // to classify can be very big, we will use a streamed writer which @@ -64,7 +64,7 @@ int main(int itkNotUsed(argc), char* argv[]) using ReaderType = otb::ImageFileReader<ImageType>; using SOMReaderType = otb::ImageFileReader<SOMMapType>; - using WriterType = otb::ImageFileWriter<LabeledImageType>; + using WriterType = otb::ImageFileWriter<LabelledImageType>; // We instantiate the classifier and the reader objects and we set // the existing SOM obtained in a previous training step. diff --git a/Examples/Classification/SupervisedImageClassificationExample.cxx b/Examples/Classification/SupervisedImageClassificationExample.cxx index 54fd0b43c3156aca036d2a48993a4db3688dc250..59e9bf2050e4e02ea995cd1fb060f9533e485c05 100644 --- a/Examples/Classification/SupervisedImageClassificationExample.cxx +++ b/Examples/Classification/SupervisedImageClassificationExample.cxx @@ -56,11 +56,11 @@ int main(int itkNotUsed(argc), char* argv[]) // with any number of bands. We read the input image as a // \doxygen{otb}{VectorImage}. The labeled image will be a scalar image. using ImageType = otb::VectorImage<PixelType, Dimension>; - using LabeledImageType = otb::Image<LabeledPixelType, Dimension>; + using LabelledImageType = otb::Image<LabeledPixelType, Dimension>; // We can now define the type for the classifier filter, which is // templated over its input and output image types. - using ClassificationFilterType = otb::ImageClassificationFilter<ImageType, LabeledImageType>; + using ClassificationFilterType = otb::ImageClassificationFilter<ImageType, LabelledImageType>; using ModelType = ClassificationFilterType::ModelType; // Moreover, it is necessary to define a \doxygen{otb}{MachineLearningModelFactory} @@ -72,7 +72,7 @@ int main(int itkNotUsed(argc), char* argv[]) // to classify can be very big, we will use a streamed writer which // will trigger the streaming ability of the classifier. using ReaderType = otb::ImageFileReader<ImageType>; - using WriterType = otb::ImageFileWriter<LabeledImageType>; + using WriterType = otb::ImageFileWriter<LabelledImageType>; // We instantiate the classifier and the reader objects and we set // the existing model obtained in a previous training step. diff --git a/Examples/OBIA/LabelMapToVectorData.cxx b/Examples/OBIA/LabelMapToVectorData.cxx index 15b162ad9ca573b303f9df579ee3d06edb697b4f..0df8df814c5a2832d65a9bea9eae8435856c51c7 100644 --- a/Examples/OBIA/LabelMapToVectorData.cxx +++ b/Examples/OBIA/LabelMapToVectorData.cxx @@ -70,11 +70,11 @@ int main(int argc, char* argv[]) const unsigned int Dimension = 2; using LabelType = unsigned short; - using LabeledImageType = otb::Image<LabelType, Dimension>; + using LabelledImageType = otb::Image<LabelType, Dimension>; using VectorDataType = otb::VectorData<double, 2>; // We instantiate reader and writer types - using LabeledReaderType = otb::ImageFileReader<LabeledImageType>; + using LabeledReaderType = otb::ImageFileReader<LabelledImageType>; using WriterType = otb::VectorDataFileWriter<VectorDataType>; // Label map typedef @@ -84,7 +84,7 @@ int main(int argc, char* argv[]) using LabelObjectType = otb::AttributesMapLabelObject<LabelType, Dimension, double>; using LabelMapType = itk::LabelMap<LabelObjectType>; - using LabelMapFilterType = itk::LabelImageToLabelMapFilter<LabeledImageType, LabelMapType>; + using LabelMapFilterType = itk::LabelImageToLabelMapFilter<LabelledImageType, LabelMapType>; LabeledReaderType::Pointer lreader = LabeledReaderType::New(); WriterType::Pointer writer = WriterType::New(); diff --git a/Examples/OBIA/RadiometricAttributesLabelMapFilterExample.cxx b/Examples/OBIA/RadiometricAttributesLabelMapFilterExample.cxx index 971cbc661f6aa6fcde47a24cfad259c1b3cabc88..3c1b9e2460390463ce6a9b9e25deeed73437a2d2 100644 --- a/Examples/OBIA/RadiometricAttributesLabelMapFilterExample.cxx +++ b/Examples/OBIA/RadiometricAttributesLabelMapFilterExample.cxx @@ -87,12 +87,12 @@ int main(int argc, char* argv[]) using LabelType = unsigned int; using MaskPixelType = unsigned char; using PixelType = double; - using LabeledImageType = otb::Image<LabelType, Dimension>; + using LabelledImageType = otb::Image<LabelType, Dimension>; using MaskImageType = otb::Image<MaskPixelType, Dimension>; using ImageType = otb::Image<PixelType, Dimension>; using VectorImageType = otb::VectorImage<PixelType, Dimension>; using OutputVectorImageType = otb::VectorImage<unsigned char, Dimension>; - using LabeledReaderType = otb::ImageFileReader<LabeledImageType>; + using LabeledReaderType = otb::ImageFileReader<LabelledImageType>; using ReaderType = otb::ImageFileReader<ImageType>; using VectorReaderType = otb::ImageFileReader<VectorImageType>; using WriterType = otb::ImageFileWriter<MaskImageType>; @@ -102,7 +102,7 @@ int main(int argc, char* argv[]) // Label map typedef using LabelObjectType = otb::AttributesMapLabelObject<LabelType, Dimension, double>; using LabelMapType = itk::LabelMap<LabelObjectType>; - using LabelMapFilterType = itk::LabelImageToLabelMapFilter<LabeledImageType, LabelMapType>; + using LabelMapFilterType = itk::LabelImageToLabelMapFilter<LabelledImageType, LabelMapType>; using ShapeLabelMapFilterType = otb::ShapeAttributesLabelMapFilter<LabelMapType>; using RadiometricLabelMapFilterType = otb::BandsStatisticsAttributesLabelMapFilter<LabelMapType, VectorImageType>; using OpeningLabelMapFilterType = otb::AttributesMapOpeningLabelMapFilter<LabelMapType>; @@ -122,7 +122,7 @@ int main(int argc, char* argv[]) // Firstly, segment the input image by using the Mean Shift algorithm (see \ref{sec:MeanShift} for deeper // explanations). - using FilterType = otb::MeanShiftSegmentationFilter<VectorImageType, LabeledImageType, VectorImageType>; + using FilterType = otb::MeanShiftSegmentationFilter<VectorImageType, LabelledImageType, VectorImageType>; FilterType::Pointer filter = FilterType::New(); filter->SetSpatialBandwidth(spatialRadius); filter->SetRangeBandwidth(rangeRadius); diff --git a/Modules/Core/Conversion/test/otbLabelMapToVectorDataFilter.cxx b/Modules/Core/Conversion/test/otbLabelMapToVectorDataFilter.cxx index a73904a738e67d20a8641583d94aa6f970611db3..1b2fc9c13598fbd9b2d4d09b78851962dfb115e9 100644 --- a/Modules/Core/Conversion/test/otbLabelMapToVectorDataFilter.cxx +++ b/Modules/Core/Conversion/test/otbLabelMapToVectorDataFilter.cxx @@ -47,13 +47,13 @@ int otbLabelMapToVectorDataFilter(int argc, char* argv[]) // Labeled image type const unsigned int Dimension = 2; typedef unsigned short LabelType; - typedef otb::Image<LabelType, Dimension> LabeledImageType; - typedef otb::ImageFileReader<LabeledImageType> LabeledReaderType; + typedef otb::Image<LabelType, Dimension> LabelledImageType; + typedef otb::ImageFileReader<LabelledImageType> LabeledReaderType; // Label map typedef typedef otb::AttributesMapLabelObject<LabelType, Dimension, double> LabelObjectType; typedef itk::LabelMap<LabelObjectType> LabelMapType; - typedef itk::LabelImageToLabelMapFilter<LabeledImageType, LabelMapType> LabelMapFilterType; + typedef itk::LabelImageToLabelMapFilter<LabelledImageType, LabelMapType> LabelMapFilterType; typedef otb::VectorData<double, 2> VectorDataType; typedef otb::VectorDataFileWriter<VectorDataType> WriterType; typedef otb::VectorDataProjectionFilter<VectorDataType, VectorDataType> VectorDataFilterType; diff --git a/Modules/Core/Conversion/test/otbVectorDataToLabelMapFilter.cxx b/Modules/Core/Conversion/test/otbVectorDataToLabelMapFilter.cxx index a38fb975714fa5385334d1f7acafaf660e82a8a8..2482f764595d47f77b41aa1b7355acfffb775e00 100644 --- a/Modules/Core/Conversion/test/otbVectorDataToLabelMapFilter.cxx +++ b/Modules/Core/Conversion/test/otbVectorDataToLabelMapFilter.cxx @@ -51,8 +51,8 @@ int otbVectorDataToLabelMapFilter(int argc, char* argv[]) // Labeled image type const unsigned int Dimension = 2; typedef unsigned short LabelType; - typedef otb::Image<LabelType, Dimension> LabeledImageType; - typedef otb::ImageFileWriter<LabeledImageType> WriterType; + typedef otb::Image<LabelType, Dimension> LabelledImageType; + typedef otb::ImageFileWriter<LabelledImageType> WriterType; // Label map typedef typedef otb::AttributesMapLabelObject<LabelType, Dimension, double> LabelObjectType; @@ -62,7 +62,7 @@ int otbVectorDataToLabelMapFilter(int argc, char* argv[]) typedef otb::VectorDataFileReader<VectorDataType> ReaderType; typedef otb::VectorDataToLabelMapFilter<VectorDataType, LabelMapType> VectorDataToLabelMapFilterType; - typedef itk::LabelMapToLabelImageFilter<LabelMapType, LabeledImageType> LabelMapToLabelImageFilterType; + typedef itk::LabelMapToLabelImageFilter<LabelMapType, LabelledImageType> LabelMapToLabelImageFilterType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName(infname); diff --git a/Modules/Core/Edge/test/0000094-PolygonsVectorization.cxx b/Modules/Core/Edge/test/0000094-PolygonsVectorization.cxx index 9bd410d22554ee0590b9e391b69339a3c9becaa4..3c125ba6101d3ecca08d4da42758841ec8a41012 100644 --- a/Modules/Core/Edge/test/0000094-PolygonsVectorization.cxx +++ b/Modules/Core/Edge/test/0000094-PolygonsVectorization.cxx @@ -44,26 +44,26 @@ int main(int argc, char* argv[]) typedef unsigned long LabelPixelType; typedef unsigned char PixelTypeOutput; - typedef otb::Image<LabelPixelType, 2> LabeledImageType; + typedef otb::Image<LabelPixelType, 2> LabelledImageType; typedef otb::Image<PixelTypeOutput, 2> OutputImageType; - typedef itk::ImageRegionIterator<LabeledImageType> IteratorType; + typedef itk::ImageRegionIterator<LabelledImageType> IteratorType; typedef otb::Polygon<double> PolygonType; typedef otb::ObjectList<PolygonType> PolygonListType; typedef PolygonListType::Pointer PolygonListPointerType; typedef itk::ImageRegion<2> ImageRegionType; - typedef otb::PersistentVectorizationImageFilter<LabeledImageType, PolygonType> PersistentVectorizationFilterType; + typedef otb::PersistentVectorizationImageFilter<LabelledImageType, PolygonType> PersistentVectorizationFilterType; - typedef itk::ConnectedComponentImageFilter<LabeledImageType, LabeledImageType> ConnectedFilterType; - typedef itk::RescaleIntensityImageFilter<LabeledImageType, OutputImageType> RescalerType; + typedef itk::ConnectedComponentImageFilter<LabelledImageType, LabelledImageType> ConnectedFilterType; + typedef itk::RescaleIntensityImageFilter<LabelledImageType, OutputImageType> RescalerType; /* typedef itk::BinaryBallStructuringElement< LabelPixelType, 2 > StructuringElementType; - typedef itk::BinaryErodeImageFilter<LabeledImageType, LabeledImageType, StructuringElementType> ErodeFilterType; - typedef itk::BinaryDilateImageFilter<LabeledImageType, LabeledImageType, StructuringElementType> DilateFilterType; - typedef itk::MedianImageFilter<LabeledImageType, LabeledImageType> MedianFilterType; - typedef otb::RemoveObjectPreprocessingImageFilter<LabeledImageType> PreprocessingFilterType; + typedef itk::BinaryErodeImageFilter<LabelledImageType, LabelledImageType, StructuringElementType> ErodeFilterType; + typedef itk::BinaryDilateImageFilter<LabelledImageType, LabelledImageType, StructuringElementType> DilateFilterType; + typedef itk::MedianImageFilter<LabelledImageType, LabelledImageType> MedianFilterType; + typedef otb::RemoveObjectPreprocessingImageFilter<LabelledImageType> PreprocessingFilterType; */ - typedef otb::ImageFileReader<LabeledImageType> ReaderType; + typedef otb::ImageFileReader<LabelledImageType> ReaderType; typedef otb::ImageFileWriter<OutputImageType> WriterType; //----------------------------------------------------------------- @@ -214,7 +214,7 @@ int main(int argc, char* argv[]) //----------------------------------------------------------------- // allocate the memory for the output file - LabeledImageType::Pointer outputImage = LabeledImageType::New(); + LabelledImageType::Pointer outputImage = LabelledImageType::New(); outputImage->SetRegions(reader->GetOutput()->GetRequestedRegion()); outputImage->CopyInformation(reader->GetOutput()); outputImage->Allocate(); diff --git a/Modules/Core/IO/IOGDAL/include/otbGDALImageIO.h b/Modules/Core/IO/IOGDAL/include/otbGDALImageIO.h index e71d15387326155cb104e73b09c02ca927a72acb..99debb2f8618d52a1b99f5c2863c4b28285e15b0 100644 --- a/Modules/Core/IO/IOGDAL/include/otbGDALImageIO.h +++ b/Modules/Core/IO/IOGDAL/include/otbGDALImageIO.h @@ -229,10 +229,10 @@ public: } /** If multiple keys have the same path, gives the position of the one with value value*/ - unsigned int GetAttributId(std::string const&, std::string const&) const override + unsigned int GetAttributeId(std::string const&, std::string const&) const override { itkExceptionMacro( - "GetAttributId() not yet implemented in otbGDALImageIO"); + "GetAttributeId() not yet implemented in otbGDALImageIO"); } protected: diff --git a/Modules/Core/LabelMap/include/otbImageToLabelMapWithAttributesFilter.h b/Modules/Core/LabelMap/include/otbImageToLabelMapWithAttributesFilter.h index ff458fa8c93ea5b643ee4be4ba6649eeeb2c40ed..52597bdeea03999f7b0ba0e1669569395301c713 100644 --- a/Modules/Core/LabelMap/include/otbImageToLabelMapWithAttributesFilter.h +++ b/Modules/Core/LabelMap/include/otbImageToLabelMapWithAttributesFilter.h @@ -62,22 +62,22 @@ public: itkNewMacro(Self); typedef TInputImage InputImageType; - typedef TLabeledImage LabeledImageType; + typedef TLabeledImage LabelledImageType; typedef TLabelObject LabelObjectType; typedef typename LabelObjectType::LabelType LabelType; typedef LabelMapWithAdjacency<LabelObjectType> LabelMapType; typedef typename LabelMapType::AdjacentLabelsContainerType AdjacentLabelsContainerType; - typedef LabelImageToLabelMapWithAdjacencyFilter<LabeledImageType, LabelMapType> LabelMapFilterType; + typedef LabelImageToLabelMapWithAdjacencyFilter<LabelledImageType, LabelMapType> LabelMapFilterType; typedef ShapeAttributesLabelMapFilter<LabelMapType> ShapeLabelMapFilterType; typedef BandsStatisticsAttributesLabelMapFilter<LabelMapType, InputImageType> BandStatisticsLabelMapFilterType; using Superclass::SetInput; void SetInput(const InputImageType* image) override; - virtual void SetLabeledImage(const LabeledImageType* image); + virtual void SetLabelledImage(const LabelledImageType* image); const InputImageType* GetInput(void); - const LabeledImageType* GetLabeledImage(); + const LabelledImageType* GetLabelledImage(); virtual LabelMapType* GetOutput(); void GenerateData() override; diff --git a/Modules/Core/LabelMap/include/otbImageToLabelMapWithAttributesFilter.hxx b/Modules/Core/LabelMap/include/otbImageToLabelMapWithAttributesFilter.hxx index 9c3430ecebc8aa95d3e0c11bcb5ca3490481a79f..73ef9feb0f64ca801ff85f900be6821af3ad539f 100644 --- a/Modules/Core/LabelMap/include/otbImageToLabelMapWithAttributesFilter.hxx +++ b/Modules/Core/LabelMap/include/otbImageToLabelMapWithAttributesFilter.hxx @@ -58,10 +58,10 @@ void ImageToLabelMapWithAttributesFilter<TInputImage, TLabeledImage, TOutputLabe } template <class TInputImage, class TLabeledImage, class TOutputLabel, class TObjectLabel> -void ImageToLabelMapWithAttributesFilter<TInputImage, TLabeledImage, TOutputLabel, TObjectLabel>::SetLabeledImage(const LabeledImageType* image) +void ImageToLabelMapWithAttributesFilter<TInputImage, TLabeledImage, TOutputLabel, TObjectLabel>::SetLabelledImage(const LabelledImageType* image) { // Process object is not const-correct so the const_cast is required here - this->itk::ProcessObject::SetNthInput(1, const_cast<LabeledImageType*>(image)); + this->itk::ProcessObject::SetNthInput(1, const_cast<LabelledImageType*>(image)); } template <class TInputImage, class TLabeledImage, class TOutputLabel, class TObjectLabel> @@ -77,15 +77,15 @@ ImageToLabelMapWithAttributesFilter<TInputImage, TLabeledImage, TOutputLabel, TO } template <class TInputImage, class TLabeledImage, class TOutputLabel, class TObjectLabel> -const typename ImageToLabelMapWithAttributesFilter<TInputImage, TLabeledImage, TOutputLabel, TObjectLabel>::LabeledImageType* -ImageToLabelMapWithAttributesFilter<TInputImage, TLabeledImage, TOutputLabel, TObjectLabel>::GetLabeledImage() +const typename ImageToLabelMapWithAttributesFilter<TInputImage, TLabeledImage, TOutputLabel, TObjectLabel>::LabelledImageType* +ImageToLabelMapWithAttributesFilter<TInputImage, TLabeledImage, TOutputLabel, TObjectLabel>::GetLabelledImage() { if (this->GetNumberOfInputs() < 2) { return nullptr; } - return static_cast<const LabeledImageType*>(this->itk::ProcessObject::GetInput(1)); + return static_cast<const LabelledImageType*>(this->itk::ProcessObject::GetInput(1)); } @@ -101,12 +101,12 @@ template <class TInputImage, class TLabeledImage, class TOutputLabel, class TObj void ImageToLabelMapWithAttributesFilter<TInputImage, TLabeledImage, TOutputLabel, TObjectLabel>::GenerateData() { typename InputImageType::Pointer inputImage = const_cast<InputImageType*>(this->GetInput()); - typename LabeledImageType::Pointer labeldImage = const_cast<LabeledImageType*>(this->GetLabeledImage()); + typename LabelledImageType::Pointer labelledImage = const_cast<LabelledImageType*>(this->GetLabelledImage()); // Convert to label map typename LabelMapFilterType::Pointer lfilter = LabelMapFilterType::New(); lfilter->SetBackgroundValue(itk::NumericTraits<LabelType>::max()); - lfilter->SetInput(labeldImage); + lfilter->SetInput(labelledImage); // Compute shape attributes typename ShapeLabelMapFilterType::Pointer shapeLabelMapFilter = ShapeLabelMapFilterType::New(); diff --git a/Modules/Core/LabelMap/test/otbBandsStatisticsAttributesLabelMapFilter.cxx b/Modules/Core/LabelMap/test/otbBandsStatisticsAttributesLabelMapFilter.cxx index 42143fb4e3e29b8defdd14d7d4028d46698ed3ec..ac14c70cd25ef4c8928296c257bb189cf074a4cc 100644 --- a/Modules/Core/LabelMap/test/otbBandsStatisticsAttributesLabelMapFilter.cxx +++ b/Modules/Core/LabelMap/test/otbBandsStatisticsAttributesLabelMapFilter.cxx @@ -36,14 +36,14 @@ typedef double DoublePixelType; typedef otb::AttributesMapLabelObject<LabelType, Dimension, double> LabelObjectType; typedef itk::LabelMap<LabelObjectType> LabelMapType; typedef otb::VectorImage<DoublePixelType, Dimension> VectorImageType; -typedef otb::Image<unsigned int, 2> LabeledImageType; +typedef otb::Image<unsigned int, 2> LabelledImageType; typedef LabelMapType::Iterator IteratorType; typedef otb::ImageFileReader<VectorImageType> ReaderType; -typedef otb::ImageFileReader<LabeledImageType> LabeledReaderType; +typedef otb::ImageFileReader<LabelledImageType> LabeledReaderType; -typedef itk::LabelImageToLabelMapFilter<LabeledImageType, LabelMapType> LabelMapFilterType; +typedef itk::LabelImageToLabelMapFilter<LabelledImageType, LabelMapType> LabelMapFilterType; typedef otb::BandsStatisticsAttributesLabelMapFilter<LabelMapType, VectorImageType> BandsStatisticsFilterType; diff --git a/Modules/Core/LabelMap/test/otbImageToLabelMapWithAttributesFilter.cxx b/Modules/Core/LabelMap/test/otbImageToLabelMapWithAttributesFilter.cxx index da7ee43507d621c99a392a0e04a77ec832a14d02..d6b8d6750721daf6ddd7eb0363257862a28866fc 100644 --- a/Modules/Core/LabelMap/test/otbImageToLabelMapWithAttributesFilter.cxx +++ b/Modules/Core/LabelMap/test/otbImageToLabelMapWithAttributesFilter.cxx @@ -31,12 +31,12 @@ int otbImageToLabelMapWithAttributesFilter(int itkNotUsed(argc), char* argv[]) // Convenient typedefs typedef otb::VectorImage<double, 2> ImageType; - typedef otb::Image<unsigned int, 2> LabeledImageType; + typedef otb::Image<unsigned int, 2> LabelledImageType; typedef otb::AttributesMapLabelObjectWithClassLabel<double, 2, double, double> LabelObjectType; - typedef otb::ImageToLabelMapWithAttributesFilter<ImageType, LabeledImageType, unsigned int, LabelObjectType> FilterType; + typedef otb::ImageToLabelMapWithAttributesFilter<ImageType, LabelledImageType, unsigned int, LabelObjectType> FilterType; typedef otb::ImageFileReader<ImageType> ReaderType; - typedef otb::ImageFileReader<LabeledImageType> LabeledReaderType; + typedef otb::ImageFileReader<LabelledImageType> LabeledReaderType; // SmartPointer instantiation FilterType::Pointer filter = FilterType::New(); @@ -52,7 +52,7 @@ int otbImageToLabelMapWithAttributesFilter(int itkNotUsed(argc), char* argv[]) // Filter filter->SetInput(reader->GetOutput()); - filter->SetLabeledImage(labeledReader->GetOutput()); + filter->SetLabelledImage(labeledReader->GetOutput()); filter->Update(); diff --git a/Modules/Core/LabelMap/test/otbKMeansAttributesLabelMapFilter.cxx b/Modules/Core/LabelMap/test/otbKMeansAttributesLabelMapFilter.cxx index 3ff1a4c78786a78a65638fba8b9d00ce8531abd0..f007007fedc6c237ee3eb8bb2d40bcda7e5ca9d0 100644 --- a/Modules/Core/LabelMap/test/otbKMeansAttributesLabelMapFilter.cxx +++ b/Modules/Core/LabelMap/test/otbKMeansAttributesLabelMapFilter.cxx @@ -36,13 +36,13 @@ typedef double PixelType; typedef otb::AttributesMapLabelObjectWithClassLabel<LabelType, Dim, double, LabelType> LabelObjectType; typedef itk::LabelMap<LabelObjectType> LabelMapType; typedef otb::VectorImage<PixelType, Dim> VectorImageType; -typedef otb::Image<unsigned int, 2> LabeledImageType; +typedef otb::Image<unsigned int, 2> LabelledImageType; typedef LabelMapType::Iterator IteratorType; typedef otb::ImageFileReader<VectorImageType> ReaderType; -typedef otb::ImageFileReader<LabeledImageType> LabeledReaderType; -typedef itk::LabelImageToLabelMapFilter<LabeledImageType, LabelMapType> LabelMapFilterType; +typedef otb::ImageFileReader<LabelledImageType> LabeledReaderType; +typedef itk::LabelImageToLabelMapFilter<LabelledImageType, LabelMapType> LabelMapFilterType; typedef otb::ShapeAttributesLabelMapFilter<LabelMapType> ShapeFilterType; typedef otb::KMeansAttributesLabelMapFilter<LabelMapType> KMeansAttributesLabelMapFilterType; diff --git a/Modules/Core/LabelMap/test/otbLabelMapToSampleListFilter.cxx b/Modules/Core/LabelMap/test/otbLabelMapToSampleListFilter.cxx index 0f720b1ef6853a1dc9cd770dbd1b730cfcaaef6d..a6814529105091f60bf4600793d23175fbe42811 100644 --- a/Modules/Core/LabelMap/test/otbLabelMapToSampleListFilter.cxx +++ b/Modules/Core/LabelMap/test/otbLabelMapToSampleListFilter.cxx @@ -38,11 +38,11 @@ int otbLabelMapToSampleListFilter(int argc, char* argv[]) // Labeled image type const unsigned int Dimension = 2; typedef unsigned short LabelType; - typedef otb::Image<LabelType, Dimension> LabeledImageType; - typedef otb::ImageFileReader<LabeledImageType> LabeledReaderType; + typedef otb::Image<LabelType, Dimension> LabelledImageType; + typedef otb::ImageFileReader<LabelledImageType> LabeledReaderType; typedef otb::AttributesMapLabelObject<LabelType, Dimension, double> LabelObjectType; typedef itk::LabelMap<LabelObjectType> LabelMapType; - typedef itk::BinaryImageToLabelMapFilter<LabeledImageType, LabelMapType> LabelMapFilterType; + typedef itk::BinaryImageToLabelMapFilter<LabelledImageType, LabelMapType> LabelMapFilterType; typedef otb::ShapeAttributesLabelMapFilter<LabelMapType> ShapeLabelMapFilterType; diff --git a/Modules/Core/LabelMap/test/otbLabelMapWithClassLabelToLabeledSampleListFilter.cxx b/Modules/Core/LabelMap/test/otbLabelMapWithClassLabelToLabeledSampleListFilter.cxx index fd30203546fe05bc6e2443996fa0aef12a183a57..3394a8672135ffaab56ba1cdb1de8723ddfdd31f 100644 --- a/Modules/Core/LabelMap/test/otbLabelMapWithClassLabelToLabeledSampleListFilter.cxx +++ b/Modules/Core/LabelMap/test/otbLabelMapWithClassLabelToLabeledSampleListFilter.cxx @@ -39,11 +39,11 @@ int otbLabelMapWithClassLabelToLabeledSampleListFilter(int argc, char* argv[]) // Labeled image type const unsigned int Dimension = 2; typedef unsigned short LabelType; - typedef otb::Image<LabelType, Dimension> LabeledImageType; - typedef otb::ImageFileReader<LabeledImageType> LabeledReaderType; + typedef otb::Image<LabelType, Dimension> LabelledImageType; + typedef otb::ImageFileReader<LabelledImageType> LabeledReaderType; typedef otb::AttributesMapLabelObjectWithClassLabel<LabelType, Dimension, double, LabelType> LabelObjectType; typedef itk::LabelMap<LabelObjectType> LabelMapType; - typedef itk::BinaryImageToLabelMapFilter<LabeledImageType, LabelMapType> LabelMapFilterType; + typedef itk::BinaryImageToLabelMapFilter<LabelledImageType, LabelMapType> LabelMapFilterType; typedef otb::ShapeAttributesLabelMapFilter<LabelMapType> ShapeLabelMapFilterType; diff --git a/Modules/Core/LabelMap/test/otbLabelObjectMapVectorizer.cxx b/Modules/Core/LabelMap/test/otbLabelObjectMapVectorizer.cxx index 99ac4162ae0f702c2d6bf8b57a94c765ed2d7ec2..d175823844916fa4e1a25fbc00221ef110de437a 100644 --- a/Modules/Core/LabelMap/test/otbLabelObjectMapVectorizer.cxx +++ b/Modules/Core/LabelMap/test/otbLabelObjectMapVectorizer.cxx @@ -39,20 +39,20 @@ int otbLabelObjectMapVectorizer(int argc, char* argv[]) // Labeled image type const unsigned int Dimension = 2; typedef unsigned short LabelType; - typedef otb::Image<LabelType, Dimension> LabeledImageType; - typedef otb::ImageFileReader<LabeledImageType> LabeledReaderType; + typedef otb::Image<LabelType, Dimension> LabelledImageType; + typedef otb::ImageFileReader<LabelledImageType> LabeledReaderType; // Label map typedef typedef otb::AttributesMapLabelObject<LabelType, Dimension, double> LabelObjectType; typedef itk::LabelMap<LabelObjectType> LabelMapType; - typedef itk::LabelImageToLabelMapFilter<LabeledImageType, LabelMapType> LabelMapFilterType; + typedef itk::LabelImageToLabelMapFilter<LabelledImageType, LabelMapType> LabelMapFilterType; typedef otb::Polygon<double> PolygonType; typedef otb::Functor::LabelObjectToPolygonFunctor<LabelObjectType, PolygonType> FunctorType; typedef otb::VectorData<double, 2> VectorDataType; typedef VectorDataType::DataNodeType DataNodeType; typedef otb::VectorDataFileWriter<VectorDataType> WriterType; typedef otb::VectorDataProjectionFilter<VectorDataType, VectorDataType> VectorDataFilterType; - typedef itk::MinimumMaximumImageCalculator<LabeledImageType> MinMaxCalculatorType; + typedef itk::MinimumMaximumImageCalculator<LabelledImageType> MinMaxCalculatorType; typedef otb::CorrectPolygonFunctor<PolygonType> CorrectPolygonFunctorType; diff --git a/Modules/Core/LabelMap/test/otbMinMaxAttributesLabelMapFilter.cxx b/Modules/Core/LabelMap/test/otbMinMaxAttributesLabelMapFilter.cxx index 2baab7b108f7458dc4e866cd3b23890fd0a252d8..e198159a904accf2bc3de58e7a87f0527235faa8 100644 --- a/Modules/Core/LabelMap/test/otbMinMaxAttributesLabelMapFilter.cxx +++ b/Modules/Core/LabelMap/test/otbMinMaxAttributesLabelMapFilter.cxx @@ -37,11 +37,11 @@ typedef double PixelType; typedef otb::AttributesMapLabelObject<LabelType, Dimension, double> LabelObjectType; typedef otb::LabelMapWithAdjacency<LabelObjectType> LabelMapType; typedef otb::VectorImage<PixelType, Dimension> VectorImageType; -typedef otb::Image<unsigned int, 2> LabeledImageType; +typedef otb::Image<unsigned int, 2> LabelledImageType; typedef otb::ImageFileReader<VectorImageType> ReaderType; -typedef otb::ImageFileReader<LabeledImageType> LabeledReaderType; -typedef otb::LabelImageToLabelMapWithAdjacencyFilter<LabeledImageType, LabelMapType> LabelMapFilterType; +typedef otb::ImageFileReader<LabelledImageType> LabeledReaderType; +typedef otb::LabelImageToLabelMapWithAdjacencyFilter<LabelledImageType, LabelMapType> LabelMapFilterType; typedef otb::ShapeAttributesLabelMapFilter<LabelMapType> ShapeFilterType; typedef otb::MinMaxAttributesLabelMapFilter<LabelMapType> MinMaxAttributesLabelMapFilterType; diff --git a/Modules/Core/LabelMap/test/otbNormalizeAttributesLabelMapFilter.cxx b/Modules/Core/LabelMap/test/otbNormalizeAttributesLabelMapFilter.cxx index 947feec54b5f14834e70e2e8e16d92cc98ed1d9b..74b945bf91ea0fad4d4c9b9baef3284f59529ba9 100644 --- a/Modules/Core/LabelMap/test/otbNormalizeAttributesLabelMapFilter.cxx +++ b/Modules/Core/LabelMap/test/otbNormalizeAttributesLabelMapFilter.cxx @@ -38,11 +38,11 @@ typedef double PixelType; typedef otb::AttributesMapLabelObject<LabelType, Dimension, double> LabelObjectType; typedef otb::LabelMapWithAdjacency<LabelObjectType> LabelMapType; typedef otb::VectorImage<PixelType, Dimension> VectorImageType; -typedef otb::Image<unsigned int, 2> LabeledImageType; +typedef otb::Image<unsigned int, 2> LabelledImageType; typedef otb::ImageFileReader<VectorImageType> ReaderType; -typedef otb::ImageFileReader<LabeledImageType> LabeledReaderType; -typedef otb::LabelImageToLabelMapWithAdjacencyFilter<LabeledImageType, LabelMapType> LabelMapFilterType; +typedef otb::ImageFileReader<LabelledImageType> LabeledReaderType; +typedef otb::LabelImageToLabelMapWithAdjacencyFilter<LabelledImageType, LabelMapType> LabelMapFilterType; typedef otb::ShapeAttributesLabelMapFilter<LabelMapType> ShapeFilterType; typedef otb::MinMaxAttributesLabelMapFilter<LabelMapType> MinMaxAttributesLabelMapFilterType; typedef otb::NormalizeAttributesLabelMapFilter<LabelMapType> NormalizeAttributesLabelMapFilterType; diff --git a/Modules/Core/Metadata/include/otbGeomMetadataSupplier.h b/Modules/Core/Metadata/include/otbGeomMetadataSupplier.h index 3168f36ceb2df5c9a06ad3f355a0980189481888..33f460066b06dfa135284f022bba082bbfc377b1 100644 --- a/Modules/Core/Metadata/include/otbGeomMetadataSupplier.h +++ b/Modules/Core/Metadata/include/otbGeomMetadataSupplier.h @@ -83,9 +83,9 @@ public: unsigned int GetNumberOf(std::string const&) const override; /** If multiple keys have the same path, gives the position of the one with value value*/ - unsigned int GetAttributId(std::string const&, std::string const&) const override + unsigned int GetAttributeId(std::string const&, std::string const&) const override { - otbLogMacro(Error, << "GetAttributId() not yet implemented in otbGeomMetadataSupplier"); + otbLogMacro(Error, << "GetAttributeId() not yet implemented in otbGeomMetadataSupplier"); return 0; } diff --git a/Modules/Core/Metadata/include/otbMetadataSupplierInterface.h b/Modules/Core/Metadata/include/otbMetadataSupplierInterface.h index ae36220ce5a4e4a6a1d46391f9ff4c3d76226e55..e8dabd00028999de48d086789d553cd5d8fa6906 100644 --- a/Modules/Core/Metadata/include/otbMetadataSupplierInterface.h +++ b/Modules/Core/Metadata/include/otbMetadataSupplierInterface.h @@ -72,7 +72,7 @@ public: virtual unsigned int GetNumberOf(std::string const& path) const = 0; /** If multiple keys have the same path, gives the position of the one with value value*/ - virtual unsigned int GetAttributId(std::string const& path, std::string const& value) const = 0; + virtual unsigned int GetAttributeId(std::string const& path, std::string const& value) const = 0; virtual ~MetadataSupplierInterface() = default; }; diff --git a/Modules/Core/Metadata/include/otbXMLMetadataSupplier.h b/Modules/Core/Metadata/include/otbXMLMetadataSupplier.h index 9d5099da60d6f147771609571053fdc214c1be3c..49be8e7b71bf04875b85d763abb7024011284e8b 100644 --- a/Modules/Core/Metadata/include/otbXMLMetadataSupplier.h +++ b/Modules/Core/Metadata/include/otbXMLMetadataSupplier.h @@ -106,7 +106,7 @@ public: unsigned int GetNumberOf(std::string const& path) const override; /** If multiple keys have the same path, gives the position of the one with value value*/ - unsigned int GetAttributId(std::string const& path, std::string const& value) const override; + unsigned int GetAttributeId(std::string const& path, std::string const& value) const override; /** * @brief Writes the content of the XML file into a string diff --git a/Modules/Core/Metadata/src/otbDimapMetadataHelper.cxx b/Modules/Core/Metadata/src/otbDimapMetadataHelper.cxx index a720564248b47c785a1e78f87ba8f256869ffabd..90573912f4cf2ec5b107c6bafc085def912aa2ff 100644 --- a/Modules/Core/Metadata/src/otbDimapMetadataHelper.cxx +++ b/Modules/Core/Metadata/src/otbDimapMetadataHelper.cxx @@ -402,13 +402,13 @@ void DimapMetadataHelper::ParseSpot5Model(const MetadataSupplierInterface & mds, if (yaw_vector.empty()||pitch_vector.empty()||roll_vector.empty()||time_vector.empty()) { - otbGenericExceptionMacro(itk::ExceptionObject, <<"Missing attitudes informations"); + otbGenericExceptionMacro(itk::ExceptionObject, <<"Missing attitudes information"); } /* Look Angles */ // Use look angles from Green band - // /!\ Warning chech condition with SWIR band not clear in OSSIM! + // /!\ Warning check condition with SWIR band not clear in OSSIM! bool bandFound = false; int i = 1; std::string expr; diff --git a/Modules/Core/Metadata/src/otbXMLMetadataSupplier.cxx b/Modules/Core/Metadata/src/otbXMLMetadataSupplier.cxx index 6dfb37b184d0abcba049ec6a13cfd3db753886fe..149a3457e01d9cccd61b8d65363b090c8ede1252 100644 --- a/Modules/Core/Metadata/src/otbXMLMetadataSupplier.cxx +++ b/Modules/Core/Metadata/src/otbXMLMetadataSupplier.cxx @@ -255,7 +255,7 @@ unsigned int XMLMetadataSupplier::GetNumberOf(std::string const & path) const } return idx.size(); } -unsigned int XMLMetadataSupplier::GetAttributId(std::string const& path, std::string const& value) const +unsigned int XMLMetadataSupplier::GetAttributeId(std::string const& path, std::string const& value) const { // Search for the joker std::size_t found = path.find("_#"); diff --git a/Modules/Core/Wrappers/ApplicationEngine/include/otbWrapperApplication.h b/Modules/Core/Wrappers/ApplicationEngine/include/otbWrapperApplication.h index ad34a826febb9a4c0c3e9c82ef68cea97f8bef25..d5265a4770220d7466d4d4c503220ef7a528d843 100644 --- a/Modules/Core/Wrappers/ApplicationEngine/include/otbWrapperApplication.h +++ b/Modules/Core/Wrappers/ApplicationEngine/include/otbWrapperApplication.h @@ -877,7 +877,7 @@ public: Once registered, the method ReleaseData is called on each one of them. */ - void FreeRessources(); + void FreeResources(); bool IsExecuteDone(); @@ -978,7 +978,7 @@ private: * implementation does nothing */ virtual void AfterExecuteAndWriteOutputs(); - virtual void DoFreeRessources(){}; + virtual void DoFreeResources(){}; Application(const Application&) = delete; void operator=(const Application&) = delete; diff --git a/Modules/Core/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx b/Modules/Core/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx index 98a01a4abd139b9464f006fcbe23424193275d25..22df3fd3959887c978203eab0353f5c82028c241 100644 --- a/Modules/Core/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx +++ b/Modules/Core/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx @@ -622,7 +622,7 @@ void Application::RegisterPipeline() } } -void Application::FreeRessources() +void Application::FreeResources() { std::set<itk::DataObject*> dataSetToRelease; // do not release output std::set<itk::DataObject*> dataSet; @@ -705,7 +705,7 @@ void Application::FreeRessources() data->ReleaseData(); } // Call override method - DoFreeRessources(); + DoFreeResources(); } int Application::Execute() @@ -967,7 +967,7 @@ int Application::ExecuteAndWriteOutput() this->AfterExecuteAndWriteOutputs(); m_Chrono.Stop(); - FreeRessources(); + FreeResources(); m_Filters.clear(); return status; } diff --git a/Modules/Core/Wrappers/CommandLine/include/otbWrapperCommandLineParser.h b/Modules/Core/Wrappers/CommandLine/include/otbWrapperCommandLineParser.h index 11cd6cab384301fbec63d3c41f040c3cc1f834c1..d591f773f05b360a39b0d83bb86cbde0d9cf4090 100644 --- a/Modules/Core/Wrappers/CommandLine/include/otbWrapperCommandLineParser.h +++ b/Modules/Core/Wrappers/CommandLine/include/otbWrapperCommandLineParser.h @@ -59,14 +59,14 @@ public: typedef enum { OK, NOMODULENAME, MULTIPLEMODULENAME, INVALIDMODULENAME, NOMODULEPATH, INVALIDMODULEPATH, DEFAULT } ParseResultType; /** Get the attribute associated to a key (list of element after the key and before the next "--") as a vector of string. */ - std::vector<std::string> GetAttribut(const std::string& key, const std::string& exp); - std::vector<std::string> GetAttribut(const std::string& key, const std::vector<std::string>& exp); + std::vector<std::string> GetAttribute(const std::string& key, const std::string& exp); + std::vector<std::string> GetAttribute(const std::string& key, const std::vector<std::string>& exp); /** Get the attribute associated to a key (list of element after the key and before the next "--") as a string separated by spaces. */ - std::string GetAttributAsString(const std::string& key, const std::string& exp); - std::string GetAttributAsString(const std::string& key, const std::vector<std::string>& exp); + std::string GetAttributeAsString(const std::string& key, const std::string& exp); + std::string GetAttributeAsString(const std::string& key, const std::vector<std::string>& exp); /** Look if a given key is in an expression. */ - bool IsAttributExists(const std::string &key, const std::string& exp); - bool IsAttributExists(const std::string &key, const std::vector<std::string>& exp); + bool IsAttributeExists(const std::string &key, const std::string& exp); + bool IsAttributeExists(const std::string &key, const std::vector<std::string>& exp); /** Get the paths executables in an expression. Store the list in a vector of string. */ CommandLineParser::ParseResultType GetPaths(std::vector<std::string>& paths, const std::string& exp); diff --git a/Modules/Core/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx b/Modules/Core/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx index 1bd955e3054291d41739d757f5e2096c68297038..435bafcb6393fb1f3e095fd345fc0327dcdf6065 100644 --- a/Modules/Core/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx +++ b/Modules/Core/Wrappers/CommandLine/src/otbWrapperCommandLineLauncher.cxx @@ -149,9 +149,9 @@ bool CommandLineLauncher::ExecuteAndWriteOutputNoCatch() // After execution, write parameters to the xml file if requested const char* attrib = "-outxml"; - if (m_Parser->IsAttributExists(attrib, m_VExpression)) + if (m_Parser->IsAttributeExists(attrib, m_VExpression)) { - std::vector<std::string> outXMLValues = m_Parser->GetAttribut(attrib, m_VExpression); + std::vector<std::string> outXMLValues = m_Parser->GetAttribute(attrib, m_VExpression); m_Application->SaveParametersToXML(outXMLValues[0]); } @@ -161,7 +161,7 @@ bool CommandLineLauncher::ExecuteAndWriteOutputNoCatch() bool CommandLineLauncher::ExecuteAndWriteOutput() { // If testenv is used, do not catch exceptions - if (m_Parser->IsAttributExists("-testenv", m_VExpression) == true) + if (m_Parser->IsAttributeExists("-testenv", m_VExpression) == true) { return ExecuteAndWriteOutputNoCatch(); } @@ -229,10 +229,10 @@ bool CommandLineLauncher::BeforeExecute() } // if help is asked... - if (m_Parser->IsAttributExists("-help", m_VExpression) == true) + if (m_Parser->IsAttributeExists("-help", m_VExpression) == true) { std::vector<std::string> val; - val = m_Parser->GetAttribut("-help", m_VExpression); + val = m_Parser->GetAttribute("-help", m_VExpression); if (val.empty()) { @@ -255,14 +255,14 @@ bool CommandLineLauncher::BeforeExecute() } // display OTB version - if (m_Parser->IsAttributExists("-version", m_VExpression) == true) + if (m_Parser->IsAttributeExists("-version", m_VExpression) == true) { std::cerr << "This is the " << m_Application->GetName() << " application, version " << OTB_VERSION_STRING << std::endl; return false; } // if we want to load test environment - if (m_Parser->IsAttributExists("-testenv", m_VExpression) == true) + if (m_Parser->IsAttributeExists("-testenv", m_VExpression) == true) { this->LoadTestEnv(); } @@ -371,16 +371,16 @@ CommandLineLauncher::ParamResultType CommandLineLauncher::LoadParameters() // Read parameters from xml file if provided const char* attrib = "-inxml"; - if (m_Parser->IsAttributExists(attrib, m_VExpression)) + if (m_Parser->IsAttributeExists(attrib, m_VExpression)) { - std::vector<std::string> inXMLValues = m_Parser->GetAttribut(attrib, m_VExpression); + std::vector<std::string> inXMLValues = m_Parser->GetAttribute(attrib, m_VExpression); m_Application->LoadParametersFromXML(inXMLValues[0]); } // Check for the progress report parameter - if (m_Parser->IsAttributExists("-progress", m_VExpression) == true) + if (m_Parser->IsAttributeExists("-progress", m_VExpression) == true) { - std::vector<std::string> val = m_Parser->GetAttribut("-progress", m_VExpression); + std::vector<std::string> val = m_Parser->GetAttribute("-progress", m_VExpression); if (val.size() == 1 && (val[0] == "1" || val[0] == "true")) { m_ReportProgress = true; @@ -406,13 +406,13 @@ CommandLineLauncher::ParamResultType CommandLineLauncher::LoadParameters() ParameterType type = m_Application->GetParameterType(paramKey); - const bool paramExists(m_Parser->IsAttributExists(std::string("-").append(paramKey), m_VExpression)); + const bool paramExists(m_Parser->IsAttributeExists(std::string("-").append(paramKey), m_VExpression)); // if param is a Group, don't do anything, ParamGroup don't have values if (type != ParameterType_Group) { // Get the attribute relative to this key as vector - values = m_Parser->GetAttribut(std::string("-").append(paramKey), m_VExpression); + values = m_Parser->GetAttribute(std::string("-").append(paramKey), m_VExpression); // If the param does not exists in the cli, don't try to set a // value on it, an exception will be thrown later in this function @@ -930,9 +930,9 @@ void CommandLineLauncher::DisplayOutputParameters() } - if (m_Parser->IsAttributExists("-testenv", m_VExpression)) + if (m_Parser->IsAttributeExists("-testenv", m_VExpression)) { - std::vector<std::string> val = m_Parser->GetAttribut("-testenv", m_VExpression); + std::vector<std::string> val = m_Parser->GetAttribute("-testenv", m_VExpression); if (val.size() == 1) { std::ofstream ofs(val[0]); diff --git a/Modules/Core/Wrappers/CommandLine/src/otbWrapperCommandLineParser.cxx b/Modules/Core/Wrappers/CommandLine/src/otbWrapperCommandLineParser.cxx index d3e6e6b82725f578f321b00eac40e0bf5601f770..396f36d95060e1eea083b1b70c899fc4780b12fc 100644 --- a/Modules/Core/Wrappers/CommandLine/src/otbWrapperCommandLineParser.cxx +++ b/Modules/Core/Wrappers/CommandLine/src/otbWrapperCommandLineParser.cxx @@ -149,19 +149,19 @@ CommandLineParser::ParseResultType CommandLineParser::GetPaths(std::vector<std:: if (tempModPath.size() > 0) { - std::vector<itksys::String> pathAttribut = itksys::SystemTools::SplitString(tempModPath, ' ', false); + std::vector<itksys::String> pathAttribute = itksys::SystemTools::SplitString(tempModPath, ' ', false); // Remove " " string element - for (unsigned int i = 0; i < pathAttribut.size(); i++) + for (unsigned int i = 0; i < pathAttribute.size(); i++) { // Suppress possible multi space at the beginning of the string - while (pathAttribut[i].size() > 1 && pathAttribut[i][0] == ' ') + while (pathAttribute[i].size() > 1 && pathAttribute[i][0] == ' ') { - pathAttribut[i].erase(0, 1); + pathAttribute[i].erase(0, 1); } - std::string fullPath = itksys::SystemTools::CollapseFullPath(pathAttribut[i]); + std::string fullPath = itksys::SystemTools::CollapseFullPath(pathAttribute[i]); if (!itksys::SystemTools::FileIsDirectory(fullPath)) { @@ -250,10 +250,10 @@ CommandLineParser::ParseResultType CommandLineParser::GetModuleName(std::string& return OK; } -std::vector<std::string> CommandLineParser::GetAttribut(const std::string& key, const std::vector<std::string>& exp) +std::vector<std::string> CommandLineParser::GetAttribute(const std::string& key, const std::vector<std::string>& exp) { std::vector<std::string> res; - if (!this->IsAttributExists(key, exp)) + if (!this->IsAttributeExists(key, exp)) return res; bool foundKey = false; @@ -289,7 +289,7 @@ std::vector<std::string> CommandLineParser::GetAttribut(const std::string& key, return res; } -std::vector<std::string> CommandLineParser::GetAttribut(const std::string& key, const std::string& exp) +std::vector<std::string> CommandLineParser::GetAttribute(const std::string& key, const std::string& exp) { std::vector<std::string> res; @@ -378,10 +378,10 @@ std::vector<std::string> CommandLineParser::GetAttribut(const std::string& key, return res; } -std::string CommandLineParser::GetAttributAsString(const std::string& key, const std::vector<std::string>& exp) +std::string CommandLineParser::GetAttributeAsString(const std::string& key, const std::vector<std::string>& exp) { std::string res(""); - std::vector<std::string> values = this->GetAttribut(key, exp); + std::vector<std::string> values = this->GetAttribute(key, exp); if (values.size() == 0) { @@ -407,10 +407,10 @@ std::string CommandLineParser::GetAttributAsString(const std::string& key, const return res; } -std::string CommandLineParser::GetAttributAsString(const std::string& key, const std::string& exp) +std::string CommandLineParser::GetAttributeAsString(const std::string& key, const std::string& exp) { std::string res(""); - std::vector<std::string> values = this->GetAttribut(key, exp); + std::vector<std::string> values = this->GetAttribute(key, exp); if (values.size() == 0) { @@ -437,7 +437,7 @@ std::string CommandLineParser::GetAttributAsString(const std::string& key, const } -bool CommandLineParser::IsAttributExists(const std::string& key, const std::string& exp) +bool CommandLineParser::IsAttributeExists(const std::string& key, const std::string& exp) { std::string keySpaced = key; std::string expSpaced = exp; @@ -448,7 +448,7 @@ bool CommandLineParser::IsAttributExists(const std::string& key, const std::stri return (found != std::string::npos); } -bool CommandLineParser::IsAttributExists(const std::string& key, const std::vector<std::string>& exp) +bool CommandLineParser::IsAttributeExists(const std::string& key, const std::vector<std::string>& exp) { for (std::vector<std::string>::const_iterator it = exp.begin(); it != exp.end(); ++it) { diff --git a/Modules/Core/Wrappers/CommandLine/test/otbWrapperCommandLineParserTests.cxx b/Modules/Core/Wrappers/CommandLine/test/otbWrapperCommandLineParserTests.cxx index 49a01fa3a60b74ffbe18b8be7cef62e9ff116352..f1b14593407e39894f47c2bd90604686d1764d3f 100644 --- a/Modules/Core/Wrappers/CommandLine/test/otbWrapperCommandLineParserTests.cxx +++ b/Modules/Core/Wrappers/CommandLine/test/otbWrapperCommandLineParserTests.cxx @@ -75,7 +75,7 @@ int otbWrapperCommandLineParserTest1(int argc, char* argv[]) cmdVector.push_back(std::string(argv[i])); } - std::vector<std::string> res = parser->GetAttribut(argv[1], cmdVector); + std::vector<std::string> res = parser->GetAttribute(argv[1], cmdVector); if (res.size() == 0) { @@ -136,7 +136,7 @@ int otbWrapperCommandLineParserTest3(int argc, char* argv[]) } } - if (parser->IsAttributExists(argv[1], cmdVector)) + if (parser->IsAttributeExists(argv[1], cmdVector)) { return EXIT_FAILURE; } @@ -156,7 +156,7 @@ int otbWrapperCommandLineParserTest4(int argc, char* argv[]) } } - if (parser->IsAttributExists(argv[1], cmdVector)) + if (parser->IsAttributeExists(argv[1], cmdVector)) { return EXIT_SUCCESS; } diff --git a/Modules/Core/Wrappers/SWIG/src/otbApplication.i b/Modules/Core/Wrappers/SWIG/src/otbApplication.i index 71347ef12029108d14dce4166a96469f65658a14..10eab1a170d2f6841fb2d8f247ef0273f87ffecf 100644 --- a/Modules/Core/Wrappers/SWIG/src/otbApplication.i +++ b/Modules/Core/Wrappers/SWIG/src/otbApplication.i @@ -307,7 +307,7 @@ public: std::string GetProgressDescription() const; - void FreeRessources(); + void FreeResources(); itkSetStringMacro(DocLongDescription); itkGetStringMacro(DocLongDescription); diff --git a/Modules/Hyperspectral/Unmixing/include/otbMDMDNMFImageFilter.h b/Modules/Hyperspectral/Unmixing/include/otbMDMDNMFImageFilter.h index b1dfe72d7b02f4a7f5da585e4f297eea7f1f2a21..b83a852a9d8e929b3f3098cd956807617ad1a275 100644 --- a/Modules/Hyperspectral/Unmixing/include/otbMDMDNMFImageFilter.h +++ b/Modules/Hyperspectral/Unmixing/include/otbMDMDNMFImageFilter.h @@ -223,7 +223,7 @@ private: const bool isDirectEvalDirection); static void ProjGradOneStep(const MatrixType& X, const MatrixType& fixedMat, const MatrixType& gradVariMat, const double& sig, const double& betinit, - const double& delt, const double& lambdS, const double& lambdD, MatrixType& variMat, double& alph, + const double& delt, const double& lambdS, const double& lambdD, MatrixType& variMat, double& alpha, const bool isDirectEvalDirection); static void SetNegativeCoefficientsToZero(MatrixType& M); @@ -233,7 +233,7 @@ private: static double SumMatrixElements(const MatrixType& M); static bool ArmijoTest(const double& sig, const MatrixType variMat, const MatrixType& newVariMat, const double& evalf, const double& newEvalf, - const MatrixType& gradVariMat, const double& alph); + const MatrixType& gradVariMat, const double& alpha); // attributes MatrixType m_Endmembers; diff --git a/Modules/Hyperspectral/Unmixing/include/otbMDMDNMFImageFilter.hxx b/Modules/Hyperspectral/Unmixing/include/otbMDMDNMFImageFilter.hxx index 2b9882903bd5afbe50f2bda6aed355a739859031..dc479f815fbaa1119afc31218198c052e8b6468d 100644 --- a/Modules/Hyperspectral/Unmixing/include/otbMDMDNMFImageFilter.hxx +++ b/Modules/Hyperspectral/Unmixing/include/otbMDMDNMFImageFilter.hxx @@ -195,16 +195,16 @@ void MDMDNMFImageFilter<TInputImage, TOutputImage>::EvalGradA(const MatrixType& template <class TInputImage, class TOutputImage> void MDMDNMFImageFilter<TInputImage, TOutputImage>::ProjGradOneStep(const MatrixType& X, const MatrixType& fixedMat, const MatrixType& gradVariMat, const double& sig, const double& betinit, const double& m_Delt, const double& m_LambdS, - const double& m_LambdD, MatrixType& variMat, double& alph, const bool isDirectEvalDirection) + const double& m_LambdD, MatrixType& variMat, double& alpha, const bool isDirectEvalDirection) { double evalf, newEvalf, bet; evalf = Call(variMat, fixedMat, X, m_Delt, m_LambdS, m_LambdD, isDirectEvalDirection); // compute evalf - MatrixType newVariMat = variMat - alph * gradVariMat; + MatrixType newVariMat = variMat - alpha * gradVariMat; SetNegativeCoefficientsToZero(newVariMat); newEvalf = Call(newVariMat, fixedMat, X, m_Delt, m_LambdS, m_LambdD, isDirectEvalDirection); // compute newEvalf - bool bit = ArmijoTest(sig, variMat, newVariMat, evalf, newEvalf, gradVariMat, alph); + bool bit = ArmijoTest(sig, variMat, newVariMat, evalf, newEvalf, gradVariMat, alpha); int count = 1; if (bit == true) @@ -212,15 +212,15 @@ void MDMDNMFImageFilter<TInputImage, TOutputImage>::ProjGradOneStep(const Matrix while (bit == true) { bet = pow(betinit, count); - alph = alph / bet; - newVariMat = variMat - alph * gradVariMat; + alpha = alpha / bet; + newVariMat = variMat - alpha * gradVariMat; SetNegativeCoefficientsToZero(newVariMat); newEvalf = Call(newVariMat, fixedMat, X, m_Delt, m_LambdS, m_LambdD, isDirectEvalDirection); - bit = ArmijoTest(sig, variMat, newVariMat, evalf, newEvalf, gradVariMat, alph); + bit = ArmijoTest(sig, variMat, newVariMat, evalf, newEvalf, gradVariMat, alpha); ++count; } - alph = alph * bet; - newVariMat = variMat - alph * gradVariMat; + alpha = alpha * bet; + newVariMat = variMat - alpha * gradVariMat; SetNegativeCoefficientsToZero(newVariMat); } else @@ -228,11 +228,11 @@ void MDMDNMFImageFilter<TInputImage, TOutputImage>::ProjGradOneStep(const Matrix while (bit == false) { bet = pow(betinit, count); - alph = alph * bet; - newVariMat = variMat - alph * gradVariMat; + alpha = alpha * bet; + newVariMat = variMat - alpha * gradVariMat; SetNegativeCoefficientsToZero(newVariMat); newEvalf = Call(newVariMat, fixedMat, X, m_Delt, m_LambdS, m_LambdD, isDirectEvalDirection); - bit = ArmijoTest(sig, variMat, newVariMat, evalf, newEvalf, gradVariMat, alph); + bit = ArmijoTest(sig, variMat, newVariMat, evalf, newEvalf, gradVariMat, alpha); ++count; } } @@ -299,7 +299,7 @@ double MDMDNMFImageFilter<TInputImage, TOutputImage>::SumMatrixElements(const Ma template <class TInputImage, class TOutputImage> bool MDMDNMFImageFilter<TInputImage, TOutputImage>::ArmijoTest(const double& sig, const MatrixType variMat, const MatrixType& newVariMat, const double& evalf, - const double& newEvalf, const MatrixType& gradVariMat, const double& alph) + const double& newEvalf, const MatrixType& gradVariMat, const double& alpha) { bool bit; @@ -309,7 +309,7 @@ bool MDMDNMFImageFilter<TInputImage, TOutputImage>::ArmijoTest(const double& sig const MatrixType prod = TermByTermMatrixProduct(gradVariMat, newVariMat - variMat); double sumProd = SumMatrixElements(prod); - if (newEvalf - evalf <= sig * alph * sumProd) + if (newEvalf - evalf <= sig * alpha * sumProd) bit = true; else bit = false; @@ -364,8 +364,8 @@ void MDMDNMFImageFilter<TInputImage, TOutputImage>::GenerateData() // Tuning the projected gradient parameters double sig = 0.05; double bet = 0.99; - double alphA = 1.; - double alphS = 1.; + double alphaA = 1.; + double alphaS = 1.; MatrixType X = inputImage2Matrix->GetMatrix(); // otbGenericMsgDebugMacro( << "X " << X ); @@ -420,16 +420,16 @@ void MDMDNMFImageFilter<TInputImage, TOutputImage>::GenerateData() otbGenericMsgDebugMacro(<< "Criterion = " << Criterion(X, A, S, m_Delt, m_LambdS, m_LambdD)); otbGenericMsgDebugMacro(<< "statGradS = " << gradS.fro_norm()); otbGenericMsgDebugMacro(<< "gradS(0, 0) = " << gradS(0, 0)); - otbGenericMsgDebugMacro(<< "alphS = " << alphS); + otbGenericMsgDebugMacro(<< "alphaS = " << alphaS); otbGenericMsgDebugMacro(<< "normS = " << S.fro_norm()); otbGenericMsgDebugMacro(<< "S(0, 0) = " << S(0, 0)); } - ProjGradOneStep(X, A, gradS, sig, bet, m_Delt, m_LambdS, m_LambdD, S, alphS, false); + ProjGradOneStep(X, A, gradS, sig, bet, m_Delt, m_LambdS, m_LambdD, S, alphaS, false); if (counter % divisorParam == 0) { - otbGenericMsgDebugMacro(<< "alphS = " << alphS); + otbGenericMsgDebugMacro(<< "alphaS = " << alphaS); otbGenericMsgDebugMacro(<< "normS = " << S.fro_norm()); otbGenericMsgDebugMacro(<< "S(0, 0) = " << S(0, 0)); } @@ -447,15 +447,15 @@ void MDMDNMFImageFilter<TInputImage, TOutputImage>::GenerateData() if (counter % divisorParam == 0) { - otbGenericMsgDebugMacro(<< "alphA = " << alphA); + otbGenericMsgDebugMacro(<< "alphaA = " << alphaA); otbGenericMsgDebugMacro(<< "normA = " << A.fro_norm()); otbGenericMsgDebugMacro(<< "A(0, 0) = " << A(0, 0)); } - ProjGradOneStep(X, S, gradA, sig, bet, m_Delt, m_LambdS, m_LambdD, A, alphA, true); + ProjGradOneStep(X, S, gradA, sig, bet, m_Delt, m_LambdS, m_LambdD, A, alphaA, true); if (counter % divisorParam == 0) { - otbGenericMsgDebugMacro(<< "alphA = " << alphA); + otbGenericMsgDebugMacro(<< "alphaA = " << alphaA); otbGenericMsgDebugMacro(<< "normA = " << A.fro_norm()); otbGenericMsgDebugMacro(<< "A(0, 0) = " << A(0, 0)); } diff --git a/Modules/Learning/Applications/app/otbImageClassifier.cxx b/Modules/Learning/Applications/app/otbImageClassifier.cxx index 3f8322385da15086b485c0c27e96429f7705d597..089689ea731f8d17c292d1e2489d31189a449b03 100644 --- a/Modules/Learning/Applications/app/otbImageClassifier.cxx +++ b/Modules/Learning/Applications/app/otbImageClassifier.cxx @@ -228,7 +228,7 @@ private: if (IsParameterEnabled("mask")) { otbAppLogINFO("Using input mask"); - // Load mask image and cast into LabeledImageType + // Load mask image and cast into LabelledImageType MaskImageType::Pointer inMask = GetParameterUInt8Image("mask"); m_ClassificationFilter->SetInputMask(inMask); diff --git a/Modules/Learning/Applications/app/otbImageRegression.cxx b/Modules/Learning/Applications/app/otbImageRegression.cxx index 93d3938fd09f3342f9ca07d058afd519d73f9830..a8387a1e0ababf4a6ba3610580ac405582d9bcea 100644 --- a/Modules/Learning/Applications/app/otbImageRegression.cxx +++ b/Modules/Learning/Applications/app/otbImageRegression.cxx @@ -255,7 +255,7 @@ private: if (IsParameterEnabled("mask")) { otbAppLogINFO("Using input mask"); - // Load mask image and cast into LabeledImageType + // Load mask image and cast into LabelledImageType auto inMask = GetParameterUInt8Image("mask"); classificationFilter->SetInputMask(inMask); } diff --git a/Modules/Learning/Applications/app/otbSOMClassification.cxx b/Modules/Learning/Applications/app/otbSOMClassification.cxx index eec2674dfa0e03ae35cbe651ff493eae92e14cd7..d393dcdef1e31b381afdebfda4164f82683dc50c 100644 --- a/Modules/Learning/Applications/app/otbSOMClassification.cxx +++ b/Modules/Learning/Applications/app/otbSOMClassification.cxx @@ -50,7 +50,7 @@ public: itkTypeMacro(SOMClassification, otb::Application); /** Filters typedef */ - typedef UInt16ImageType LabeledImageType; + typedef UInt16ImageType LabelledImageType; typedef itk::VariableLengthVector<double> SampleType; typedef itk::Statistics::EuclideanDistanceMetric<SampleType> DistanceType; @@ -63,10 +63,10 @@ public: typedef FloatVectorImageType::RegionType RegionType; typedef itk::ImageRegionConstIterator<FloatVectorImageType> IteratorType; - typedef itk::ImageRegionConstIterator<LabeledImageType> LabeledIteratorType; + typedef itk::ImageRegionConstIterator<LabelledImageType> LabeledIteratorType; typedef itk::ImageRegionConstIterator<SOMMapType> SOMIteratorType; - typedef otb::SOMImageClassificationFilter<FloatVectorImageType, LabeledImageType, SOMMapType> ClassificationFilterType; + typedef otb::SOMImageClassificationFilter<FloatVectorImageType, LabelledImageType, SOMMapType> ClassificationFilterType; private: @@ -188,7 +188,7 @@ private: itk::Statistics::MersenneTwisterRandomVariateGenerator::Pointer randomGen = itk::Statistics::MersenneTwisterRandomVariateGenerator::GetInstance(); FloatVectorImageType::Pointer input = GetParameterImage("in"); - LabeledImageType::Pointer mask; + LabelledImageType::Pointer mask; m_UseMask = false; if (HasValue("vm")) { @@ -389,7 +389,7 @@ private: AddProcess(m_Classifier, "Classification"); - SetParameterOutputImage<LabeledImageType>("out", m_Classifier->GetOutput()); + SetParameterOutputImage<LabelledImageType>("out", m_Classifier->GetOutput()); } bool m_UseMask; diff --git a/Modules/Learning/LearningBase/test/otbKMeansImageClassificationFilter.cxx b/Modules/Learning/LearningBase/test/otbKMeansImageClassificationFilter.cxx index 8535c65de05a7ffa582c118d7538068d51b2653a..d5fd05a6fed7bd6573e2969c6e26faf38edacaa0 100644 --- a/Modules/Learning/LearningBase/test/otbKMeansImageClassificationFilter.cxx +++ b/Modules/Learning/LearningBase/test/otbKMeansImageClassificationFilter.cxx @@ -35,11 +35,11 @@ int otbKMeansImageClassificationFilter(int itkNotUsed(argc), char* argv[]) typedef unsigned short LabeledPixelType; typedef otb::VectorImage<PixelType, Dimension> ImageType; - typedef otb::Image<LabeledPixelType, Dimension> LabeledImageType; - typedef otb::KMeansImageClassificationFilter<ImageType, LabeledImageType> ClassificationFilterType; + typedef otb::Image<LabeledPixelType, Dimension> LabelledImageType; + typedef otb::KMeansImageClassificationFilter<ImageType, LabelledImageType> ClassificationFilterType; typedef ClassificationFilterType::KMeansParametersType KMeansParametersType; typedef otb::ImageFileReader<ImageType> ReaderType; - typedef otb::ImageFileWriter<LabeledImageType> WriterType; + typedef otb::ImageFileWriter<LabelledImageType> WriterType; // Instantiating object ClassificationFilterType::Pointer filter = ClassificationFilterType::New(); diff --git a/Modules/Learning/SOM/test/otbSOMImageClassificationFilter.cxx b/Modules/Learning/SOM/test/otbSOMImageClassificationFilter.cxx index c8f99904371069118a2418ba2d2f71149929f238..7374449b5915c0dfbb56667742ad5f4e3919df5e 100644 --- a/Modules/Learning/SOM/test/otbSOMImageClassificationFilter.cxx +++ b/Modules/Learning/SOM/test/otbSOMImageClassificationFilter.cxx @@ -35,12 +35,12 @@ int otbSOMImageClassificationFilter(int itkNotUsed(argc), char* argv[]) typedef unsigned short LabeledPixelType; typedef otb::VectorImage<PixelType, Dimension> ImageType; - typedef otb::Image<LabeledPixelType, Dimension> LabeledImageType; + typedef otb::Image<LabeledPixelType, Dimension> LabelledImageType; typedef otb::SOMMap<ImageType::PixelType> SOMMapType; - typedef otb::SOMImageClassificationFilter<ImageType, LabeledImageType, SOMMapType> ClassificationFilterType; + typedef otb::SOMImageClassificationFilter<ImageType, LabelledImageType, SOMMapType> ClassificationFilterType; typedef otb::ImageFileReader<ImageType> ReaderType; typedef otb::ImageFileReader<SOMMapType> SOMReaderType; - typedef otb::ImageFileWriter<LabeledImageType> WriterType; + typedef otb::ImageFileWriter<LabelledImageType> WriterType; // Instantiating object ClassificationFilterType::Pointer filter = ClassificationFilterType::New(); diff --git a/Modules/Learning/Supervised/test/otbImageClassificationFilter.cxx b/Modules/Learning/Supervised/test/otbImageClassificationFilter.cxx index 50f8314b7e968dbf8fc2f2279e2f8e4337a8cec6..10be0797af0159acc2a934dcdf195cbe5af4557c 100644 --- a/Modules/Learning/Supervised/test/otbImageClassificationFilter.cxx +++ b/Modules/Learning/Supervised/test/otbImageClassificationFilter.cxx @@ -30,14 +30,14 @@ typedef double PixelType; typedef unsigned short LabeledPixelType; typedef otb::VectorImage<PixelType, Dimension> ImageType; -typedef otb::Image<LabeledPixelType, Dimension> LabeledImageType; -typedef otb::ImageClassificationFilter<ImageType, LabeledImageType> ClassificationFilterType; +typedef otb::Image<LabeledPixelType, Dimension> LabelledImageType; +typedef otb::ImageClassificationFilter<ImageType, LabelledImageType> ClassificationFilterType; typedef ClassificationFilterType::ModelType ModelType; typedef ClassificationFilterType::ValueType ValueType; typedef ClassificationFilterType::LabelType LabelType; typedef otb::MachineLearningModelFactory<ValueType, LabelType> MachineLearningModelFactoryType; typedef otb::ImageFileReader<ImageType> ReaderType; -typedef otb::ImageFileWriter<LabeledImageType> WriterType; +typedef otb::ImageFileWriter<LabelledImageType> WriterType; int otbImageClassificationFilterLoadModel(int itkNotUsed(argc), char* argv[]) diff --git a/Modules/Learning/Supervised/test/otbLabelMapClassifier.cxx b/Modules/Learning/Supervised/test/otbLabelMapClassifier.cxx index 3df79127f2f9850e7f693885984fdd969892261d..a8b6ff3da4f8cfa57c4ff02fa792977aa0f68eb1 100644 --- a/Modules/Learning/Supervised/test/otbLabelMapClassifier.cxx +++ b/Modules/Learning/Supervised/test/otbLabelMapClassifier.cxx @@ -42,14 +42,14 @@ typedef double DoublePixelType; typedef otb::AttributesMapLabelObjectWithClassLabel<LabelType, Dimension, double, LabelType> LabelObjectType; typedef itk::LabelMap<LabelObjectType> LabelMapType; typedef otb::VectorImage<DoublePixelType, Dimension> VectorImageType; -typedef otb::Image<unsigned int, 2> LabeledImageType; +typedef otb::Image<unsigned int, 2> LabelledImageType; typedef otb::ImageFileReader<VectorImageType> ReaderType; -typedef otb::ImageFileReader<LabeledImageType> LabeledReaderType; +typedef otb::ImageFileReader<LabelledImageType> LabeledReaderType; typedef otb::ImageFileWriter<VectorImageType> WriterType; -typedef otb::ImageFileWriter<LabeledImageType> LabeledWriterType; +typedef otb::ImageFileWriter<LabelledImageType> LabeledWriterType; -typedef itk::LabelImageToLabelMapFilter<LabeledImageType, LabelMapType> LabelMapFilterType; +typedef itk::LabelImageToLabelMapFilter<LabelledImageType, LabelMapType> LabelMapFilterType; typedef otb::ShapeAttributesLabelMapFilter<LabelMapType> ShapeFilterType; typedef otb::BandsStatisticsAttributesLabelMapFilter<LabelMapType, VectorImageType> BandsStatisticsFilterType; @@ -62,7 +62,7 @@ typedef otb::LabelMapWithClassLabelToLabeledSampleListFilter<LabelMapType, ListS typedef otb::LibSVMMachineLearningModel<double, LabelType> SVMType; typedef otb::LabelMapClassifier<LabelMapType> ClassifierType; -typedef otb::LabelMapWithClassLabelToClassLabelImageFilter<LabelMapType, LabeledImageType> ClassifImageGeneratorType; +typedef otb::LabelMapWithClassLabelToClassLabelImageFilter<LabelMapType, LabelledImageType> ClassifImageGeneratorType; LabelObjectType::Pointer makeTrainingSample(LabelMapType* labelMap, LabelType labelObjectId, LabelType classLabel) diff --git a/Modules/Learning/Supervised/test/otbSharkImageClassificationFilter.cxx b/Modules/Learning/Supervised/test/otbSharkImageClassificationFilter.cxx index ce76ba68e89ae4bf54e877694172b05c03ab9075..32d17ce2a3ba316a2c055c4bbf86175427443359 100644 --- a/Modules/Learning/Supervised/test/otbSharkImageClassificationFilter.cxx +++ b/Modules/Learning/Supervised/test/otbSharkImageClassificationFilter.cxx @@ -32,15 +32,15 @@ typedef float PixelType; typedef unsigned short LabeledPixelType; typedef otb::VectorImage<PixelType, Dimension> ImageType; -typedef otb::Image<LabeledPixelType, Dimension> LabeledImageType; -typedef otb::ImageClassificationFilter<ImageType, LabeledImageType> ClassificationFilterType; +typedef otb::Image<LabeledPixelType, Dimension> LabelledImageType; +typedef otb::ImageClassificationFilter<ImageType, LabelledImageType> ClassificationFilterType; typedef ClassificationFilterType::ModelType ModelType; typedef ClassificationFilterType::ValueType ValueType; typedef ClassificationFilterType::LabelType LabelType; typedef otb::SharkRandomForestsMachineLearningModelFactory<ValueType, LabelType> MachineLearningModelFactoryType; typedef otb::ImageFileReader<ImageType> ReaderType; -typedef otb::ImageFileReader<LabeledImageType> MaskReaderType; -typedef otb::ImageFileWriter<LabeledImageType> WriterType; +typedef otb::ImageFileReader<LabelledImageType> MaskReaderType; +typedef otb::ImageFileWriter<LabelledImageType> WriterType; typedef otb::SharkRandomForestsMachineLearningModel<PixelType, short unsigned int> MachineLearningModelType; typedef MachineLearningModelType::InputValueType LocalInputValueType; @@ -169,7 +169,7 @@ int otbSharkImageClassificationFilter(int argc, char* argv[]) // Check that the chosen labels correspond to the max proba - itk::ImageRegionConstIterator<LabeledImageType> labIt(filter->GetOutput(), filter->GetOutput()->GetLargestPossibleRegion()); + itk::ImageRegionConstIterator<LabelledImageType> labIt(filter->GetOutput(), filter->GetOutput()->GetLargestPossibleRegion()); itk::ImageRegionConstIterator<ClassificationFilterType::ProbaImageType> probIt(filter->GetOutputProba(), filter->GetOutputProba()->GetLargestPossibleRegion()); diff --git a/Modules/Learning/Unsupervised/test/otbSharkUnsupervisedImageClassificationFilter.cxx b/Modules/Learning/Unsupervised/test/otbSharkUnsupervisedImageClassificationFilter.cxx index 98ae5d42ff90422af7fcdea59a923b9edbb4a012..9b0fa16e08718875c631e22518bbe4b4484aabab 100644 --- a/Modules/Learning/Unsupervised/test/otbSharkUnsupervisedImageClassificationFilter.cxx +++ b/Modules/Learning/Unsupervised/test/otbSharkUnsupervisedImageClassificationFilter.cxx @@ -32,15 +32,15 @@ typedef float PixelType; typedef unsigned short LabeledPixelType; typedef otb::VectorImage<PixelType, Dimension> ImageType; -typedef otb::Image<LabeledPixelType, Dimension> LabeledImageType; -typedef otb::ImageClassificationFilter<ImageType, LabeledImageType> ClassificationFilterType; +typedef otb::Image<LabeledPixelType, Dimension> LabelledImageType; +typedef otb::ImageClassificationFilter<ImageType, LabelledImageType> ClassificationFilterType; typedef ClassificationFilterType::ModelType ModelType; typedef ClassificationFilterType::ValueType ValueType; typedef ClassificationFilterType::LabelType LabelType; typedef otb::SharkKMeansMachineLearningModelFactory<ValueType, LabelType> MachineLearningModelFactoryType; typedef otb::ImageFileReader<ImageType> ReaderType; -typedef otb::ImageFileReader<LabeledImageType> MaskReaderType; -typedef otb::ImageFileWriter<LabeledImageType> WriterType; +typedef otb::ImageFileReader<LabelledImageType> MaskReaderType; +typedef otb::ImageFileWriter<LabelledImageType> WriterType; typedef otb::SharkKMeansMachineLearningModel<PixelType, short unsigned int> MachineLearningModelType; typedef MachineLearningModelType::InputValueType LocalInputValueType; diff --git a/Modules/Miscellaneous/Applications/app/otbImageDimensionalityReduction.cxx b/Modules/Miscellaneous/Applications/app/otbImageDimensionalityReduction.cxx index dd4aa75048d4ae5e3020cc900609e667913d7ce6..c5b6b9bf8dc42b042bc0df008c2cfda42aacf16f 100644 --- a/Modules/Miscellaneous/Applications/app/otbImageDimensionalityReduction.cxx +++ b/Modules/Miscellaneous/Applications/app/otbImageDimensionalityReduction.cxx @@ -250,7 +250,7 @@ private: if (IsParameterEnabled("mask")) { otbAppLogINFO("Using input mask"); - // Load mask image and cast into LabeledImageType + // Load mask image and cast into LabelledImageType MaskImageType::Pointer inMask = GetParameterUInt8Image("mask"); m_ClassificationFilter->SetInputMask(inMask); diff --git a/Modules/Miscellaneous/Applications/app/otbMorphologicalClassification.cxx b/Modules/Miscellaneous/Applications/app/otbMorphologicalClassification.cxx index 9b7012b4437b90187d68f0fafd979603dff438e2..2b5cc8e9ad59a8c73b0f4222ff3af2fc5e382b90 100644 --- a/Modules/Miscellaneous/Applications/app/otbMorphologicalClassification.cxx +++ b/Modules/Miscellaneous/Applications/app/otbMorphologicalClassification.cxx @@ -56,11 +56,11 @@ public: typedef otb::Image<InputPixelType, 2> FloatImageType; typedef unsigned short LabeledPixelType; - typedef otb::Image<LabeledPixelType, 2> LabeledImageType; + typedef otb::Image<LabeledPixelType, 2> LabelledImageType; typedef otb::MultiToMonoChannelExtractROI<FloatVectorImageType::InternalPixelType, InputPixelType> ExtractorFilterType; - typedef otb::ConvexOrConcaveClassificationFilter<FloatImageType, LabeledImageType> ClassificationFilterType; + typedef otb::ConvexOrConcaveClassificationFilter<FloatImageType, LabelledImageType> ClassificationFilterType; typedef itk::BinaryBallStructuringElement<InputPixelType, 2> BallStructuringElementType; typedef itk::BinaryCrossStructuringElement<InputPixelType, 2> CrossStructuringElementType; diff --git a/Modules/Miscellaneous/Applications/app/otbMorphologicalProfilesAnalysis.cxx b/Modules/Miscellaneous/Applications/app/otbMorphologicalProfilesAnalysis.cxx index f5db1490fdfd8c71ea83256875f1f57bde564cad..b01759599b84b98d0941dab0ff44ec1000b768d1 100644 --- a/Modules/Miscellaneous/Applications/app/otbMorphologicalProfilesAnalysis.cxx +++ b/Modules/Miscellaneous/Applications/app/otbMorphologicalProfilesAnalysis.cxx @@ -56,7 +56,7 @@ public: typedef FloatVectorImageType::InternalPixelType InputPixelType; typedef unsigned short LabeledPixelType; - typedef otb::Image<LabeledPixelType, 2> LabeledImageType; + typedef otb::Image<LabeledPixelType, 2> LabelledImageType; typedef otb::MultiToMonoChannelExtractROI<InputPixelType, InputPixelType> ExtractorFilterType; @@ -228,8 +228,8 @@ private: typedef otb::MorphologicalClosingProfileFilter<FloatImageType, FloatImageType, StructuringElementType> ClosingProfileFilterType; typedef otb::ProfileToProfileDerivativeFilter<FloatImageType, FloatImageType> DerivativeFilterType; - typedef otb::MultiScaleConvexOrConcaveClassificationFilter<FloatImageType, LabeledImageType> MultiScaleClassificationFilterType; - typedef otb::ProfileDerivativeToMultiScaleCharacteristicsFilter<FloatImageType, FloatImageType, LabeledImageType> MultiScaleCharacteristicsFilterType; + typedef otb::MultiScaleConvexOrConcaveClassificationFilter<FloatImageType, LabelledImageType> MultiScaleClassificationFilterType; + typedef otb::ProfileDerivativeToMultiScaleCharacteristicsFilter<FloatImageType, FloatImageType, LabelledImageType> MultiScaleCharacteristicsFilterType; // Instantiation typename OpeningProfileFilterType::Pointer oprofileFilter = OpeningProfileFilterType::New(); diff --git a/Modules/Miscellaneous/Simulation/include/otbAtmosphericEffects.hxx b/Modules/Miscellaneous/Simulation/include/otbAtmosphericEffects.hxx index 66dfe4f8f199670f7916cd74ec8c88b2a24610c9..7ad8e88cb6a79dabba02594da9b913c95ef3d4f4 100644 --- a/Modules/Miscellaneous/Simulation/include/otbAtmosphericEffects.hxx +++ b/Modules/Miscellaneous/Simulation/include/otbAtmosphericEffects.hxx @@ -45,7 +45,7 @@ AtmosphericEffects<TSpectralResponse , TRSR> //LMoad the filter function from the RSR for (unsigned int i=0; i<this->m_InputSatRSR->GetNbBands(); ++i) { - m_DataAtmosphericCorrectionParameters->SetWavelenghtSpectralBandWithIndex(i, this->m_InputSatRSR->GetRSR()[i]->GetFilterFunctionValues (step)); + m_DataAtmosphericCorrectionParameters->SetWavelengthSpectralBandWithIndex(i, this->m_InputSatRSR->GetRSR()[i]->GetFilterFunctionValues (step)); } } */ diff --git a/Modules/Miscellaneous/Simulation/test/otbLabelMapToSimulatedImageFilterTest.cxx b/Modules/Miscellaneous/Simulation/test/otbLabelMapToSimulatedImageFilterTest.cxx index 43f2cd05cdeb99bba37890bb53e5cd713372a984..0aee88cd81179279b1850c0a45f7ded30144612f 100644 --- a/Modules/Miscellaneous/Simulation/test/otbLabelMapToSimulatedImageFilterTest.cxx +++ b/Modules/Miscellaneous/Simulation/test/otbLabelMapToSimulatedImageFilterTest.cxx @@ -38,8 +38,8 @@ int otbLabelMapToSimulatedImageFilterTest(int itkNotUsed(argc), char* argv[]) typedef unsigned short LabelType; const unsigned int Dimension = 2; - typedef otb::VectorImage<double, Dimension> LabeledImageType; - typedef otb::ImageFileWriter<LabeledImageType> WriterType; + typedef otb::VectorImage<double, Dimension> LabelledImageType; + typedef otb::ImageFileWriter<LabelledImageType> WriterType; typedef otb::VectorData<double, Dimension> VectorDataType; typedef otb::AttributesMapLabelObject<LabelType, Dimension, std::string> LabelObjectType; typedef itk::LabelMap<LabelObjectType> LabelMapType; @@ -48,7 +48,7 @@ int otbLabelMapToSimulatedImageFilterTest(int itkNotUsed(argc), char* argv[]) typedef otb::ProspectModel ProspectType; typedef otb::SailModel SailType; - typedef otb::LabelMapToSimulatedImageFilter<LabelMapType, ProspectType, SailType, LabeledImageType> LabelMapToSimulatedImageFilterType; + typedef otb::LabelMapToSimulatedImageFilter<LabelMapType, ProspectType, SailType, LabelledImageType> LabelMapToSimulatedImageFilterType; /** Instantiation of pointer objects*/ diff --git a/Modules/Segmentation/MorphologicalProfiles/include/otbProfileDerivativeToMultiScaleCharacteristicsFilter.h b/Modules/Segmentation/MorphologicalProfiles/include/otbProfileDerivativeToMultiScaleCharacteristicsFilter.h index e73bed9d589f2f95b904927c914c4beca5b0ae2e..4aa88ac29305c0c5055891991ab9d345a26d62c7 100644 --- a/Modules/Segmentation/MorphologicalProfiles/include/otbProfileDerivativeToMultiScaleCharacteristicsFilter.h +++ b/Modules/Segmentation/MorphologicalProfiles/include/otbProfileDerivativeToMultiScaleCharacteristicsFilter.h @@ -60,14 +60,14 @@ public: /** Template parameters typedefs */ typedef TInputImage InputImageType; typedef TOutputImage OutputImageType; - typedef TLabeledImage LabeledImageType; + typedef TLabeledImage LabelledImageType; typedef typename InputImageType::Pointer InputImagePointerType; typedef typename OutputImageType::Pointer OutputImagePointerType; - typedef typename LabeledImageType::Pointer LabeledImagePointerType; + typedef typename LabelledImageType::Pointer LabeledImagePointerType; typedef typename Superclass::InputImageListType InputImageListType; typedef typename InputImageListType::Pointer InputImageListPointerType; typedef typename OutputImageType::RegionType RegionType; - typedef typename LabeledImageType::PixelType LabeledPixelType; + typedef typename LabelledImageType::PixelType LabeledPixelType; typedef typename OutputImageType::PixelType OutputPixelType; /** diff --git a/Modules/Segmentation/MorphologicalProfiles/include/otbProfileDerivativeToMultiScaleCharacteristicsFilter.hxx b/Modules/Segmentation/MorphologicalProfiles/include/otbProfileDerivativeToMultiScaleCharacteristicsFilter.hxx index c62fb9a4ca69520d6f7871d9b683c99b9a776321..16025c9720fedc6e37e4e30e870abb5c4387ea71 100644 --- a/Modules/Segmentation/MorphologicalProfiles/include/otbProfileDerivativeToMultiScaleCharacteristicsFilter.hxx +++ b/Modules/Segmentation/MorphologicalProfiles/include/otbProfileDerivativeToMultiScaleCharacteristicsFilter.hxx @@ -33,7 +33,7 @@ ProfileDerivativeToMultiScaleCharacteristicsFilter<TInputImage, TOutputImage, TL { this->SetNumberOfRequiredOutputs(2); this->SetNthOutput(0, OutputImageType::New()); - this->SetNthOutput(1, LabeledImageType::New()); + this->SetNthOutput(1, LabelledImageType::New()); m_InitialValue = 0; m_Step = 1; } @@ -45,7 +45,7 @@ TLabeledImage* ProfileDerivativeToMultiScaleCharacteristicsFilter<TInputImage, T { return nullptr; } - return static_cast<LabeledImageType*>(this->itk::ProcessObject::GetOutput(1)); + return static_cast<LabelledImageType*>(this->itk::ProcessObject::GetOutput(1)); } /** * GenerateOutputInformation @@ -143,7 +143,7 @@ void ProfileDerivativeToMultiScaleCharacteristicsFilter<TInputImage, TOutputImag // defines input and output iterators typedef itk::ImageRegionConstIterator<InputImageType> InputIteratorType; typedef itk::ImageRegionIterator<OutputImageType> OutputIteratorType; - typedef itk::ImageRegionIterator<LabeledImageType> LabeledIteratorType; + typedef itk::ImageRegionIterator<LabelledImageType> LabeledIteratorType; typename InputImageListType::ConstIterator inputListIt = inputPtr->Begin(); diff --git a/Modules/Segmentation/MorphologicalProfiles/test/otbMultiScaleConvexOrConcaveClassificationFilter.cxx b/Modules/Segmentation/MorphologicalProfiles/test/otbMultiScaleConvexOrConcaveClassificationFilter.cxx index 7406d4cef17c15321baf3aa22a6903ef130b6a87..4f0f47623e24e4540671189f5a847df1b2bbc7ec 100644 --- a/Modules/Segmentation/MorphologicalProfiles/test/otbMultiScaleConvexOrConcaveClassificationFilter.cxx +++ b/Modules/Segmentation/MorphologicalProfiles/test/otbMultiScaleConvexOrConcaveClassificationFilter.cxx @@ -46,17 +46,17 @@ int otbMultiScaleConvexOrConcaveClassificationFilter(int itkNotUsed(argc), char* typedef otb::Image<InputPixelType, Dimension> InputImageType; typedef otb::Image<OutputPixelType, Dimension> OutputImageType; - typedef otb::Image<LabeledPixelType, 2> LabeledImageType; + typedef otb::Image<LabeledPixelType, 2> LabelledImageType; typedef otb::ImageFileReader<InputImageType> ReaderType; - typedef otb::ImageFileWriter<LabeledImageType> LabeledWriterType; + typedef otb::ImageFileWriter<LabelledImageType> LabeledWriterType; typedef itk::BinaryBallStructuringElement<InputPixelType, Dimension> StructuringElementType; typedef otb::MorphologicalOpeningProfileFilter<InputImageType, InputImageType, StructuringElementType> OpeningProfileFilterType; typedef otb::MorphologicalClosingProfileFilter<InputImageType, InputImageType, StructuringElementType> ClosingProfileFilterType; typedef otb::ProfileToProfileDerivativeFilter<InputImageType, InputImageType> DerivativeFilterType; - typedef otb::ProfileDerivativeToMultiScaleCharacteristicsFilter<InputImageType, OutputImageType, LabeledImageType> MultiScaleCharacteristicsFilterType; - typedef otb::MultiScaleConvexOrConcaveClassificationFilter<InputImageType, LabeledImageType> MultiScaleClassificationFilterType; + typedef otb::ProfileDerivativeToMultiScaleCharacteristicsFilter<InputImageType, OutputImageType, LabelledImageType> MultiScaleCharacteristicsFilterType; + typedef otb::MultiScaleConvexOrConcaveClassificationFilter<InputImageType, LabelledImageType> MultiScaleClassificationFilterType; // Reading input image ReaderType::Pointer reader = ReaderType::New(); diff --git a/Modules/Segmentation/MorphologicalProfiles/test/otbProfileDerivativeToMultiScaleCharacteristicsFilter.cxx b/Modules/Segmentation/MorphologicalProfiles/test/otbProfileDerivativeToMultiScaleCharacteristicsFilter.cxx index 6f6d8baef35209f190da71503185476ea7812d2b..055fe6e91de532fcd92db09060774f493f689dd9 100644 --- a/Modules/Segmentation/MorphologicalProfiles/test/otbProfileDerivativeToMultiScaleCharacteristicsFilter.cxx +++ b/Modules/Segmentation/MorphologicalProfiles/test/otbProfileDerivativeToMultiScaleCharacteristicsFilter.cxx @@ -44,16 +44,16 @@ int otbProfileDerivativeToMultiScaleCharacteristicsFilter(int itkNotUsed(argc), typedef otb::Image<InputPixelType, Dimension> InputImageType; typedef otb::Image<OutputPixelType, Dimension> OutputImageType; - typedef otb::Image<LabeledPixelType, 2> LabeledImageType; + typedef otb::Image<LabeledPixelType, 2> LabelledImageType; typedef otb::ImageFileReader<InputImageType> ReaderType; typedef otb::ImageFileWriter<OutputImageType> WriterType; - typedef otb::ImageFileWriter<LabeledImageType> LabeledWriterType; + typedef otb::ImageFileWriter<LabelledImageType> LabeledWriterType; typedef itk::BinaryBallStructuringElement<InputPixelType, Dimension> StructuringElementType; typedef otb::MorphologicalOpeningProfileFilter<InputImageType, InputImageType, StructuringElementType> OpeningProfileFilterType; typedef otb::ProfileToProfileDerivativeFilter<InputImageType, InputImageType> DerivativeFilterType; - typedef otb::ProfileDerivativeToMultiScaleCharacteristicsFilter<InputImageType, OutputImageType, LabeledImageType> MultiScaleCharacteristicsFilterType; + typedef otb::ProfileDerivativeToMultiScaleCharacteristicsFilter<InputImageType, OutputImageType, LabelledImageType> MultiScaleCharacteristicsFilterType; // Reading input image ReaderType::Pointer reader = ReaderType::New();