Orfeo Toolbox  3.16
otbListSampleToBalancedListSampleFilter.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 
13  This software is distributed WITHOUT ANY WARRANTY; without even
14  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  PURPOSE. See the above copyright notices for more information.
16 
17 =========================================================================*/
18 #ifndef __otbListSampleToBalancedListSampleFilter_h
19 #define __otbListSampleToBalancedListSampleFilter_h
20 
23 #include "itkDataObjectDecorator.h"
24 #include "otbMacro.h"
25 
26 namespace otb {
27 namespace Statistics {
28 
41 template < class TInputSampleList,
42  class TLabelSampleList,
43  class TOutputSampleList = TInputSampleList >
45  public otb::Statistics::ListSampleToListSampleFilter<TInputSampleList,
46  TOutputSampleList>
47 {
48 public:
52  <TInputSampleList, TOutputSampleList> Superclass;
55 
58 
60  itkNewMacro(Self);
61 
63  typedef TInputSampleList InputSampleListType;
64  typedef typename InputSampleListType::Pointer InputSampleListPointer;
65  typedef typename InputSampleListType::ConstPointer InputSampleListConstPointer;
66  typedef typename InputSampleListType::MeasurementVectorType InputMeasurementVectorType;
67  typedef typename InputMeasurementVectorType::ValueType InputValueType;
68 
70  typedef TLabelSampleList LabelSampleListType;
71  typedef typename LabelSampleListType::Pointer LabelSampleListPointer;
72  typedef typename LabelSampleListType::ConstPointer LabelSampleListConstPointer;
73  typedef typename LabelSampleListType::MeasurementVectorType LabelMeasurementVectorType;
74  typedef typename LabelMeasurementVectorType::ValueType LabelValueType;
76 
78  typedef TOutputSampleList OutputSampleListType;
79  typedef typename OutputSampleListType::Pointer OutputSampleListPointer;
80  typedef typename OutputSampleListType::ConstPointer OutputSampleListConstPointer;
81  typedef typename OutputSampleListType::MeasurementVectorType OutputMeasurementVectorType;
82  typedef typename OutputMeasurementVectorType::ValueType OutputValueType;
83 
86 
90 
95 
97  void SetInputLabel( const LabelSampleListType * label );
98  void SetInputLabel( const LabelSampleListObjectType * labelPtr );
99 
101  const LabelSampleListType * GetLabelSampleList() const;
102 
104  const LabelSampleListObjectType * GetInputLabel() const;
105 
107  LabelSampleListType * GetOutputLabelSampleList();
108 
110  LabelSampleListObjectType * GetOutputLabel();
111 
113  otbSetObjectMemberMacro(AddGaussianNoiseFilter, Mean, double);
114  otbGetObjectMemberConstMacro(AddGaussianNoiseFilter, Mean, double);
115 
117  otbSetObjectMemberMacro(AddGaussianNoiseFilter, Variance, double);
118  otbGetObjectMemberConstMacro(AddGaussianNoiseFilter, Variance, double);
119 
124  itkSetMacro(BalancingFactor, unsigned int);
125  itkGetMacro(BalancingFactor, unsigned int);
126 
127 protected:
129  virtual void GenerateData();
130 
135  void ComputeMaxSampleFrequency();
136 
138  DataObjectPointer MakeOutput(unsigned int idx);
139 
142  void PrintSelf(std::ostream& os, itk::Indent indent) const;
143 
144 private:
145  ListSampleToBalancedListSampleFilter(const Self&); //purposely not implemented
146  void operator=(const Self&); //purposely not implemented
147 
149  std::vector<unsigned int> m_MultiplicativeCoefficient;
150  unsigned int m_BalancingFactor;
151 
152 }; // end of class ListSampleToBalancedListSampleFilter
153 
154 } // end of namespace Statistics
155 } // end of namespace otb
156 
157 #ifndef OTB_MANUAL_INSTANTIATION
159 #endif
160 
161 #endif

Generated at Sun May 19 2013 00:36:22 for Orfeo Toolbox with doxygen 1.8.3.1