OTB  5.0.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 ITCopyright.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  virtual ~PeriodicSOM() {}
95 
98  {
99  Superclass::GenerateOutputInformation ();
100  }
101 
103  virtual void AllocateOutputs()
104  {
105  Superclass::AllocateOutputs();
106  }
107 
109  virtual void GenerateData(void)
110  {
111  Superclass::GenerateData();
112  }
113 
120  virtual void UpdateMap(const NeuronType& sample, double beta, SizeType& radius);
121 
125  virtual void Step(unsigned int currentIteration)
126  {
127  Superclass::Step(currentIteration);
128  }
129 
131  void PrintSelf(std::ostream& os, itk::Indent indent) const
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
NeuronType::ValueType ValueType
MapType::IndexType IndexType
MapType::RegionType RegionType
virtual void GenerateData(void)
MapType::PixelType NeuronType
MapType::SizeType SizeType
virtual void AllocateOutputs()
SOM< TListSample, TMap, TSOMLearningBehaviorFunctor, TSOMNeighborhoodBehaviorFunctor > Superclass
TListSample ListSampleType
void PrintSelf(std::ostream &os, itk::Indent indent) const
itk::SmartPointer< const Self > ConstPointer
itk::SmartPointer< Self > Pointer
ListSampleType::Pointer ListSamplePointerType
This class is responsible for the learning of a self organizing map when considered as a torus...
virtual ~PeriodicSOM()
virtual void Step(unsigned int currentIteration)
virtual void GenerateOutputInformation()
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