Orfeo Toolbox  4.0
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 
55 template <class TListSample, class TMap,
56  class TSOMLearningBehaviorFunctor = Functor::CzihoSOMLearningBehaviorFunctor,
57  class TSOMNeighborhoodBehaviorFunctor = Functor::CzihoSOMNeighborhoodBehaviorFunctor>
58 class ITK_EXPORT PeriodicSOM
59  : public SOM<TListSample, TMap, TSOMLearningBehaviorFunctor, TSOMNeighborhoodBehaviorFunctor>
60 {
61 public:
63  typedef PeriodicSOM Self;
64  typedef SOM<TListSample, TMap,
65  TSOMLearningBehaviorFunctor,
66  TSOMNeighborhoodBehaviorFunctor> Superclass;
69 
71  itkNewMacro(Self);
72 
74  itkTypeMacro(PeriodicSOM, SOM);
75 
76  typedef TListSample ListSampleType;
77  typedef typename ListSampleType::Pointer ListSamplePointerType;
78  typedef TMap MapType;
79  typedef typename MapType::PixelType NeuronType;
80  typedef typename NeuronType::ValueType ValueType;
81  typedef typename MapType::IndexType IndexType;
82  typedef typename MapType::SizeType SizeType;
83  typedef typename MapType::RegionType RegionType;
84  typedef typename MapType::Pointer MapPointerType;
85 
86 protected:
90  virtual ~PeriodicSOM() {}
92  virtual void GenerateOutputInformation()
93  {
94  Superclass::GenerateOutputInformation ();
95  }
97  virtual void AllocateOutputs()
98  {
99  Superclass::AllocateOutputs();
100  }
102  virtual void GenerateData(void)
103  {
104  Superclass::GenerateData();
105  }
112  virtual void UpdateMap(const NeuronType& sample, double beta, SizeType& radius);
116  virtual void Step(unsigned int currentIteration)
117  {
118  Superclass::Step(currentIteration);
119  }
121  void PrintSelf(std::ostream& os, itk::Indent indent) const
122  {
123  Superclass::PrintSelf(os, indent);
124  }
125 
126 private:
127  PeriodicSOM(const Self &); // purposely not implemented
128  void operator =(const Self&); // purposely not implemented
129 
130 }; // end of class
131 
132 } // end of namespace otb
133 
134 #ifndef OTB_MANUAL_INSTANTIATION
135 #include "otbPeriodicSOM.txx"
136 #endif
137 
138 #endif

Generated at Sat Mar 8 2014 16:12:36 for Orfeo Toolbox with doxygen 1.8.3.1