OTB  6.1.0
Orfeo Toolbox
otbPeriodicSOM.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2017 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,
60  class TSOMLearningBehaviorFunctor = Functor::CzihoSOMLearningBehaviorFunctor,
61  class TSOMNeighborhoodBehaviorFunctor = Functor::CzihoSOMNeighborhoodBehaviorFunctor>
62 class ITK_EXPORT PeriodicSOM
63  : public SOM<TListSample, TMap, TSOMLearningBehaviorFunctor, TSOMNeighborhoodBehaviorFunctor>
64 {
65 public:
66 
68  typedef PeriodicSOM Self;
69  typedef SOM<TListSample, TMap,
70  TSOMLearningBehaviorFunctor,
71  TSOMNeighborhoodBehaviorFunctor> Superclass;
74 
76  itkNewMacro(Self);
77 
79  itkTypeMacro(PeriodicSOM, SOM);
80 
81  typedef TListSample ListSampleType;
82  typedef typename ListSampleType::Pointer ListSamplePointerType;
83  typedef TMap MapType;
84  typedef typename MapType::PixelType NeuronType;
85  typedef typename NeuronType::ValueType ValueType;
86  typedef typename MapType::IndexType IndexType;
87  typedef typename MapType::SizeType SizeType;
88  typedef typename MapType::RegionType RegionType;
89  typedef typename MapType::Pointer MapPointerType;
90 
91 protected:
94 
96  ~PeriodicSOM() ITK_OVERRIDE {}
97 
99  void GenerateOutputInformation() ITK_OVERRIDE
100  {
101  Superclass::GenerateOutputInformation ();
102  }
103 
105  void AllocateOutputs() ITK_OVERRIDE
106  {
107  Superclass::AllocateOutputs();
108  }
109 
111  void GenerateData(void) ITK_OVERRIDE
112  {
113  Superclass::GenerateData();
114  }
115 
122  void UpdateMap(const NeuronType& sample, double beta, SizeType& radius) ITK_OVERRIDE;
123 
127  void Step(unsigned int currentIteration) ITK_OVERRIDE
128  {
129  Superclass::Step(currentIteration);
130  }
131 
133  void PrintSelf(std::ostream& os, itk::Indent indent) const ITK_OVERRIDE
134  {
135  Superclass::PrintSelf(os, indent);
136  }
137 
138 private:
139  PeriodicSOM(const Self &); // purposely not implemented
140  void operator =(const Self&); // purposely not implemented
141 
142 }; // end of class
143 
144 } // end of namespace otb
145 
146 #ifndef OTB_MANUAL_INSTANTIATION
147 #include "otbPeriodicSOM.txx"
148 #endif
149 
150 #endif
itk::Size< Monteverdi_DIMENSION > SizeType
Definition: mvdTypes.h:146
NeuronType::ValueType ValueType
MapType::IndexType IndexType
void GenerateData(void) ITK_OVERRIDE
MapType::RegionType RegionType
MapType::PixelType NeuronType
void GenerateOutputInformation() ITK_OVERRIDE
void Step(unsigned int currentIteration) ITK_OVERRIDE
MapType::SizeType SizeType
itk::Index< Monteverdi_DIMENSION > IndexType
Definition: mvdTypes.h:142
SOM< TListSample, TMap, TSOMLearningBehaviorFunctor, TSOMNeighborhoodBehaviorFunctor > Superclass
TListSample ListSampleType
void PrintSelf(std::ostream &os, itk::Indent indent) const ITK_OVERRIDE
itk::SmartPointer< const Self > ConstPointer
itk::SmartPointer< Self > Pointer
~PeriodicSOM() ITK_OVERRIDE
ListSampleType::Pointer ListSamplePointerType
This class is responsible for the learning of a self organizing map when considered as a torus...
MapType::Pointer MapPointerType
PeriodicSOM Self
This class is responsible for the learning of a self organizing map from a set of vector represented ...
Definition: otbSOM.h:61
void AllocateOutputs() ITK_OVERRIDE