OTB  9.0.0
Orfeo Toolbox
otbSOMWithMissingValue.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 #ifndef otbSOMWithMissingValue_h
23 #define otbSOMWithMissingValue_h
24 
25 #include "otbPeriodicSOM.h"
26 
27 namespace otb
28 {
47 template <class TListSample, class TMap, class TSOMLearningBehaviorFunctor = Functor::CzihoSOMLearningBehaviorFunctor,
48  class TSOMNeighborhoodBehaviorFunctor = Functor::CzihoSOMNeighborhoodBehaviorFunctor>
49 class ITK_EXPORT SOMWithMissingValue : public PeriodicSOM<TListSample, TMap, TSOMLearningBehaviorFunctor, TSOMNeighborhoodBehaviorFunctor>
50 {
51 public:
52 
56  typedef itk::SmartPointer<Self> Pointer;
57  typedef itk::SmartPointer<const Self> ConstPointer;
58 
59  typedef TListSample ListSampleType;
60  typedef typename ListSampleType::Pointer ListSamplePointerType;
61 
62  typedef TMap MapType;
63  typedef typename MapType::PixelType NeuronType;
64  typedef typename NeuronType::ValueType ValueType;
65  typedef typename MapType::IndexType IndexType;
66  typedef typename MapType::SizeType SizeType;
67  typedef typename MapType::RegionType RegionType;
68  typedef typename MapType::Pointer MapPointerType;
69  typedef typename MapType::DistanceType DistanceType;
70  typedef typename MapType::DistancePointerType DistancePointerType;
71 
73  itkNewMacro(Self);
74 
76  itkTypeMacro(SOMWithMissingValue, PeriodicSOM);
77 
78 protected:
81 
83  ~SOMWithMissingValue() override;
84 
86  void GenerateOutputInformation() override
87  {
88  Superclass::GenerateOutputInformation();
89  }
90 
92  void AllocateOutputs() override
93  {
94  Superclass::AllocateOutputs();
95  }
96 
98  void GenerateData(void) override
99  {
100  Superclass::GenerateData();
101  }
102 
106  void UpdateMap(const NeuronType& sample, double beta, SizeType& radius) override;
107 
109  void Step(unsigned int currentIteration) override
110  {
111  Superclass::Step(currentIteration);
112  }
113 
115  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
116 
117 
118 private:
119  SOMWithMissingValue(const Self&) = delete;
120  void operator=(const Self&) = delete;
121 
122 }; // end of class
123 
124 } // end of namespace otb
125 
126 #ifndef OTB_MANUAL_INSTANTIATION
128 #endif
129 
130 #endif
otb::SOMWithMissingValue::DistancePointerType
MapType::DistancePointerType DistancePointerType
Definition: otbSOMWithMissingValue.h:70
otb::SOMWithMissingValue::Self
SOMWithMissingValue Self
Definition: otbSOMWithMissingValue.h:54
otb::SOMWithMissingValue::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbSOMWithMissingValue.h:57
otb::SOMWithMissingValue::GenerateData
void GenerateData(void) override
Definition: otbSOMWithMissingValue.h:98
otb::SOMWithMissingValue::RegionType
MapType::RegionType RegionType
Definition: otbSOMWithMissingValue.h:67
otb::SOMWithMissingValue::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbSOMWithMissingValue.h:56
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::SOMWithMissingValue::SizeType
MapType::SizeType SizeType
Definition: otbSOMWithMissingValue.h:66
otb::SOMWithMissingValue::ListSampleType
TListSample ListSampleType
Definition: otbSOMWithMissingValue.h:59
otb::SOMWithMissingValue::AllocateOutputs
void AllocateOutputs() override
Definition: otbSOMWithMissingValue.h:92
otb::SOMWithMissingValue::ValueType
NeuronType::ValueType ValueType
Definition: otbSOMWithMissingValue.h:64
otb::SOMWithMissingValue
This class implements SOM training with missing value.
Definition: otbSOMWithMissingValue.h:49
otb::SOMWithMissingValue::Step
void Step(unsigned int currentIteration) override
Definition: otbSOMWithMissingValue.h:109
otb::SOMWithMissingValue::DistanceType
MapType::DistanceType DistanceType
Definition: otbSOMWithMissingValue.h:69
otb::SOMWithMissingValue::GenerateOutputInformation
void GenerateOutputInformation() override
Definition: otbSOMWithMissingValue.h:86
otb::SOMWithMissingValue::MapPointerType
MapType::Pointer MapPointerType
Definition: otbSOMWithMissingValue.h:68
otb::SOMWithMissingValue::NeuronType
MapType::PixelType NeuronType
Definition: otbSOMWithMissingValue.h:63
otbPeriodicSOM.h
otb::SOMWithMissingValue::MapType
TMap MapType
Definition: otbSOMWithMissingValue.h:62
otbSOMWithMissingValue.hxx
otb::SOMWithMissingValue::Superclass
PeriodicSOM< TListSample, TMap, TSOMLearningBehaviorFunctor, TSOMNeighborhoodBehaviorFunctor > Superclass
Definition: otbSOMWithMissingValue.h:55
otb::PeriodicSOM
This class is responsible for the learning of a self organizing map when considered as a torus.
Definition: otbPeriodicSOM.h:61
otb::SOMWithMissingValue::ListSamplePointerType
ListSampleType::Pointer ListSamplePointerType
Definition: otbSOMWithMissingValue.h:60
otb::SOMWithMissingValue::IndexType
MapType::IndexType IndexType
Definition: otbSOMWithMissingValue.h:65