OTB  5.9.0
Orfeo Toolbox
otbPeriodicSOM.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ORFEO Toolbox
4  Language: C++
5  Date: $Date$
6  Version: $Revision$
7 
8 
9  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
10  See OTBCopyright.txt for details.
11 
12  Copyright (c) Institut Telecom; Telecom bretagne. All rights reserved.
13  See IMTCopyright.txt for details.
14 
15  This software is distributed WITHOUT ANY WARRANTY; without even
16  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
17  PURPOSE. See the above copyright notices for more information.
18 
19 =========================================================================*/
20 
21 #ifndef otbPeriodicSOM_h
22 #define otbPeriodicSOM_h
23 
24 #include "otbSOM.h"
25 
26 namespace otb
27 {
28 
57 template <class TListSample, class TMap,
58  class TSOMLearningBehaviorFunctor = Functor::CzihoSOMLearningBehaviorFunctor,
59  class TSOMNeighborhoodBehaviorFunctor = Functor::CzihoSOMNeighborhoodBehaviorFunctor>
60 class ITK_EXPORT PeriodicSOM
61  : public SOM<TListSample, TMap, TSOMLearningBehaviorFunctor, TSOMNeighborhoodBehaviorFunctor>
62 {
63 public:
64 
66  typedef PeriodicSOM Self;
67  typedef SOM<TListSample, TMap,
68  TSOMLearningBehaviorFunctor,
69  TSOMNeighborhoodBehaviorFunctor> Superclass;
72 
74  itkNewMacro(Self);
75 
77  itkTypeMacro(PeriodicSOM, SOM);
78 
79  typedef TListSample ListSampleType;
80  typedef typename ListSampleType::Pointer ListSamplePointerType;
81  typedef TMap MapType;
82  typedef typename MapType::PixelType NeuronType;
83  typedef typename NeuronType::ValueType ValueType;
84  typedef typename MapType::IndexType IndexType;
85  typedef typename MapType::SizeType SizeType;
86  typedef typename MapType::RegionType RegionType;
87  typedef typename MapType::Pointer MapPointerType;
88 
89 protected:
92 
94  ~PeriodicSOM() ITK_OVERRIDE {}
95 
97  void GenerateOutputInformation() ITK_OVERRIDE
98  {
99  Superclass::GenerateOutputInformation ();
100  }
101 
103  void AllocateOutputs() ITK_OVERRIDE
104  {
105  Superclass::AllocateOutputs();
106  }
107 
109  void GenerateData(void) ITK_OVERRIDE
110  {
111  Superclass::GenerateData();
112  }
113 
120  void UpdateMap(const NeuronType& sample, double beta, SizeType& radius) ITK_OVERRIDE;
121 
125  void Step(unsigned int currentIteration) ITK_OVERRIDE
126  {
127  Superclass::Step(currentIteration);
128  }
129 
131  void PrintSelf(std::ostream& os, itk::Indent indent) const ITK_OVERRIDE
132  {
133  Superclass::PrintSelf(os, indent);
134  }
135 
136 private:
137  PeriodicSOM(const Self &); // purposely not implemented
138  void operator =(const Self&); // purposely not implemented
139 
140 }; // end of class
141 
142 } // end of namespace otb
143 
144 #ifndef OTB_MANUAL_INSTANTIATION
145 #include "otbPeriodicSOM.txx"
146 #endif
147 
148 #endif
itk::Size< Monteverdi_DIMENSION > SizeType
Definition: mvdTypes.h:144
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:140
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:59
void AllocateOutputs() ITK_OVERRIDE