OTB  9.0.0
Orfeo Toolbox
otbSOMMap.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
3  * Copyright (C) 2007-2012 Institut Mines Telecom / Telecom Bretagne
4  *
5  * This file is part of Orfeo Toolbox
6  *
7  * https://www.orfeo-toolbox.org/
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21 
22 #ifndef otbSOMMap_h
23 #define otbSOMMap_h
24 
25 #include "itkVariableLengthVector.h"
26 #include "itkEuclideanDistanceMetric.h"
27 #include "otbVectorImage.h"
28 
29 namespace otb
30 {
51 template <class TNeuron = itk::VariableLengthVector<double>, class TDistance = itk::Statistics::EuclideanDistanceMetric<TNeuron>,
52  unsigned int VMapDimension = 2>
53 class ITK_EXPORT SOMMap : public otb::VectorImage<typename TNeuron::ComponentType, VMapDimension>
54 {
55 public:
56 
58  typedef SOMMap Self;
60  typedef itk::SmartPointer<Self> Pointer;
61  typedef itk::SmartPointer<const Self> ConstPointer;
62 
64  itkNewMacro(Self);
65 
73  typedef TNeuron NeuronType;
74  typedef TDistance DistanceType;
75  typedef typename DistanceType::Pointer DistancePointerType;
76 
78  typedef typename Superclass::IndexType IndexType;
79  typedef typename Superclass::SizeType SizeType;
83  typedef typename Superclass::PointType PointType;
84 
90  IndexType GetWinner(const NeuronType& sample);
91 
92 protected:
94  SOMMap();
95 
97  ~SOMMap() override;
98 
100  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
101 
102 private:
103  SOMMap(const Self&) = delete;
104  void operator=(const Self&) = delete;
105 };
106 } // end namespace otb
107 
108 #ifndef OTB_MANUAL_INSTANTIATION
109 #include "otbSOMMap.hxx"
110 #endif
111 
112 #endif
otb::VectorImage::RegionType
Superclass::RegionType RegionType
Definition: otbVectorImage.h:113
otb::SOMMap::IndexType
Superclass::IndexType IndexType
Definition: otbSOMMap.h:78
otb::SOMMap::PointType
Superclass::PointType PointType
Definition: otbSOMMap.h:83
otbVectorImage.h
otb::VectorImage::SpacingType
Superclass::SpacingType SpacingType
Definition: otbVectorImage.h:117
otb::SOMMap::SizeType
Superclass::SizeType SizeType
Definition: otbSOMMap.h:79
otb::VectorImage::SizeType
Superclass::SizeType SizeType
Definition: otbVectorImage.h:107
otb::SOMMap::Superclass
otb::VectorImage< typename TNeuron::ComponentType, VMapDimension > Superclass
Definition: otbSOMMap.h:59
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::SOMMap::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbSOMMap.h:61
otb::SOMMap::Self
SOMMap Self
Definition: otbSOMMap.h:58
otb::SOMMap::RegionType
Superclass::RegionType RegionType
Definition: otbSOMMap.h:81
otb::SOMMap::DirectionType
Superclass::DirectionType DirectionType
Definition: otbSOMMap.h:80
otb::VectorImage::PointType
Superclass::PointType PointType
Definition: otbVectorImage.h:121
otbSOMMap.hxx
otb::SOMMap::DistancePointerType
DistanceType::Pointer DistancePointerType
Definition: otbSOMMap.h:75
otb::SOMMap::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbSOMMap.h:60
otb::SOMMap::SpacingType
Superclass::SpacingType SpacingType
Definition: otbSOMMap.h:82
otb::VectorImage::IndexType
Superclass::IndexType IndexType
Definition: otbVectorImage.h:101
otb::SOMMap::DistanceType
TDistance DistanceType
Definition: otbSOMMap.h:74
otb::SOMMap
This class represent a Self Organizing Map.
Definition: otbSOMMap.h:53
otb::SOMMap::NeuronType
TNeuron NeuronType
Definition: otbSOMMap.h:64
otb::VectorImage::DirectionType
Superclass::DirectionType DirectionType
Definition: otbVectorImage.h:110
otb::VectorImage
Creation of an "otb" vector image which contains metadata.
Definition: otbVectorImage.h:45