OTB  9.0.0
Orfeo Toolbox
otbPeriodicSOM.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 
23 #ifndef otbPeriodicSOM_h
24 #define otbPeriodicSOM_h
25 
26 #include "otbSOM.h"
27 
28 namespace otb
29 {
30 
59 template <class TListSample, class TMap, class TSOMLearningBehaviorFunctor = Functor::CzihoSOMLearningBehaviorFunctor,
60  class TSOMNeighborhoodBehaviorFunctor = Functor::CzihoSOMNeighborhoodBehaviorFunctor>
61 class ITK_EXPORT PeriodicSOM : public SOM<TListSample, TMap, TSOMLearningBehaviorFunctor, TSOMNeighborhoodBehaviorFunctor>
62 {
63 public:
64 
66  typedef PeriodicSOM Self;
68  typedef itk::SmartPointer<Self> Pointer;
69  typedef itk::SmartPointer<const Self> ConstPointer;
70 
72  itkNewMacro(Self);
73 
75  itkTypeMacro(PeriodicSOM, SOM);
76 
77  typedef TListSample ListSampleType;
78  typedef typename ListSampleType::Pointer ListSamplePointerType;
79  typedef TMap MapType;
80  typedef typename MapType::PixelType NeuronType;
81  typedef typename NeuronType::ValueType ValueType;
82  typedef typename MapType::IndexType IndexType;
83  typedef typename MapType::SizeType SizeType;
84  typedef typename MapType::RegionType RegionType;
85  typedef typename MapType::Pointer MapPointerType;
86 
87 protected:
90  {
91  }
92 
94  ~PeriodicSOM() override
95  {
96  }
97 
99  void GenerateOutputInformation() override
100  {
101  Superclass::GenerateOutputInformation();
102  }
103 
105  void AllocateOutputs() override
106  {
107  Superclass::AllocateOutputs();
108  }
109 
111  void GenerateData(void) override
112  {
113  Superclass::GenerateData();
114  }
115 
122  void UpdateMap(const NeuronType& sample, double beta, SizeType& radius) override;
123 
127  void Step(unsigned int currentIteration) override
128  {
129  Superclass::Step(currentIteration);
130  }
131 
133  void PrintSelf(std::ostream& os, itk::Indent indent) const override
134  {
135  Superclass::PrintSelf(os, indent);
136  }
137 
138 private:
139  PeriodicSOM(const Self&) = delete;
140  void operator=(const Self&) = delete;
141 
142 }; // end of class
143 
144 } // end of namespace otb
145 
146 #ifndef OTB_MANUAL_INSTANTIATION
147 #include "otbPeriodicSOM.hxx"
148 #endif
149 
150 #endif
otb::SOM
This class is responsible for the learning of a self organizing map from a set of vector represented ...
Definition: otbSOM.h:60
otb::PeriodicSOM::Step
void Step(unsigned int currentIteration) override
Definition: otbPeriodicSOM.h:127
otb::PeriodicSOM::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbPeriodicSOM.h:69
otb::PeriodicSOM::NeuronType
MapType::PixelType NeuronType
Definition: otbPeriodicSOM.h:80
otb::PeriodicSOM::GenerateData
void GenerateData(void) override
Definition: otbPeriodicSOM.h:111
otb::PeriodicSOM::AllocateOutputs
void AllocateOutputs() override
Definition: otbPeriodicSOM.h:105
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::PeriodicSOM::Self
PeriodicSOM Self
Definition: otbPeriodicSOM.h:66
otb::PeriodicSOM::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbPeriodicSOM.h:68
otb::PeriodicSOM::ListSamplePointerType
ListSampleType::Pointer ListSamplePointerType
Definition: otbPeriodicSOM.h:78
otbPeriodicSOM.hxx
otb::PeriodicSOM::MapType
TMap MapType
Definition: otbPeriodicSOM.h:79
otb::PeriodicSOM::ValueType
NeuronType::ValueType ValueType
Definition: otbPeriodicSOM.h:81
otb::PeriodicSOM::RegionType
MapType::RegionType RegionType
Definition: otbPeriodicSOM.h:84
otb::PeriodicSOM::MapPointerType
MapType::Pointer MapPointerType
Definition: otbPeriodicSOM.h:85
otb::PeriodicSOM::ListSampleType
TListSample ListSampleType
Definition: otbPeriodicSOM.h:75
otbSOM.h
otb::PeriodicSOM::PrintSelf
void PrintSelf(std::ostream &os, itk::Indent indent) const override
Definition: otbPeriodicSOM.h:133
otb::PeriodicSOM::GenerateOutputInformation
void GenerateOutputInformation() override
Definition: otbPeriodicSOM.h:99
otb::PeriodicSOM::~PeriodicSOM
~PeriodicSOM() override
Definition: otbPeriodicSOM.h:94
otb::PeriodicSOM::SizeType
MapType::SizeType SizeType
Definition: otbPeriodicSOM.h:83
otb::PeriodicSOM::PeriodicSOM
PeriodicSOM()
Definition: otbPeriodicSOM.h:89
otb::PeriodicSOM
This class is responsible for the learning of a self organizing map when considered as a torus.
Definition: otbPeriodicSOM.h:61
otb::PeriodicSOM::IndexType
MapType::IndexType IndexType
Definition: otbPeriodicSOM.h:82
otb::PeriodicSOM::Superclass
SOM< TListSample, TMap, TSOMLearningBehaviorFunctor, TSOMNeighborhoodBehaviorFunctor > Superclass
Definition: otbPeriodicSOM.h:67