OTB  9.0.0
Orfeo Toolbox
otbListSampleSource.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef otbListSampleSource_h
22 #define otbListSampleSource_h
23 
24 #include "itkProcessObject.h"
25 #include "itkDataObjectDecorator.h"
26 
27 namespace otb
28 {
29 namespace Statistics
30 {
31 
44 template <class TInputSampleList, class TOutputSampleList = TInputSampleList>
45 class ITK_EXPORT ListSampleSource : public itk::ProcessObject
46 {
47 public:
50  typedef itk::ProcessObject Superclass;
51  typedef itk::SmartPointer<Self> Pointer;
52  typedef itk::SmartPointer<const Self> ConstPointer;
53 
55  itkTypeMacro(ListSampleSource, itk::ProcessObject);
56 
58  itkNewMacro(Self);
59 
61  typedef TOutputSampleList OutputSampleListType;
62  typedef typename OutputSampleListType::Pointer OutputSampleListPointer;
63  typedef typename OutputSampleListType::ConstPointer OutputSampleListConstPointer;
64  typedef typename OutputSampleListType::MeasurementVectorType OutputMeasurementVectorType;
65  typedef typename OutputMeasurementVectorType::ValueType OutputValueType;
66  typedef itk::ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType;
67 
70  typedef itk::DataObject::Pointer DataObjectPointer;
71 
73  OutputSampleListType* GetOutput();
74 
75 protected:
77  DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override;
78  using Superclass::MakeOutput;
79 
81  ~ListSampleSource() override
82  {
83  }
84  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
85 
86 private:
87  ListSampleSource(const Self&) = delete;
88  void operator=(const Self&) = delete;
89 
90 }; // end of class ListSampleSource
91 
92 } // end of namespace Statistics
93 } // end of namespace otb
94 
95 #ifndef OTB_MANUAL_INSTANTIATION
96 #include "otbListSampleSource.hxx"
97 #endif
98 
99 #endif
otb::Statistics::ListSampleSource::~ListSampleSource
~ListSampleSource() override
Definition: otbListSampleSource.h:81
otb::Statistics::ListSampleSource::OutputSampleListType
TOutputSampleList OutputSampleListType
Definition: otbListSampleSource.h:58
otb::Statistics::ListSampleSource
This class is a base class for filters using ListSample as input and returning ListSample.
Definition: otbListSampleSource.h:45
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::Statistics::ListSampleSource::OutputSampleListConstPointer
OutputSampleListType::ConstPointer OutputSampleListConstPointer
Definition: otbListSampleSource.h:63
otb::Statistics::ListSampleSource::OutputMeasurementVectorType
OutputSampleListType::MeasurementVectorType OutputMeasurementVectorType
Definition: otbListSampleSource.h:64
otb::Statistics::ListSampleSource::Self
ListSampleSource Self
Definition: otbListSampleSource.h:49
otb::Statistics::ListSampleSource::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbListSampleSource.h:52
otb::Statistics::ListSampleSource::OutputValueType
OutputMeasurementVectorType::ValueType OutputValueType
Definition: otbListSampleSource.h:65
otb::Statistics::ListSampleSource::OutputSampleListPointer
OutputSampleListType::Pointer OutputSampleListPointer
Definition: otbListSampleSource.h:62
otb::Statistics::ListSampleSource::Superclass
itk::ProcessObject Superclass
Definition: otbListSampleSource.h:50
otb::Statistics::ListSampleSource::DataObjectPointer
itk::DataObject::Pointer DataObjectPointer
Definition: otbListSampleSource.h:70
otbListSampleSource.hxx
otb::Statistics::ListSampleSource::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbListSampleSource.h:51
otb::Statistics::ListSampleSource::DataObjectPointerArraySizeType
itk::ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
Definition: otbListSampleSource.h:66