OTB  10.0.0
Orfeo Toolbox
otbListSampleSource.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2024 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
This class is a base class for filters using ListSample as input and returning ListSample.
ListSampleSource(const Self &)=delete
OutputMeasurementVectorType::ValueType OutputValueType
void operator=(const Self &)=delete
itk::SmartPointer< Self > Pointer
OutputSampleListType::Pointer OutputSampleListPointer
OutputSampleListType::MeasurementVectorType OutputMeasurementVectorType
itk::ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
OutputSampleListType::ConstPointer OutputSampleListConstPointer
itk::SmartPointer< const Self > ConstPointer
itk::DataObject::Pointer DataObjectPointer
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.