OTB  9.0.0
Orfeo Toolbox
otbListSampleToListSampleFilter.hxx
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 otbListSampleToListSample_hxx
22 #define otbListSampleToListSample_hxx
23 
25 #include "itkProgressReporter.h"
26 
27 namespace otb
28 {
29 namespace Statistics
30 {
31 
32 template <class TInputSampleList, class TOutputSampleList>
34 {
35  this->SetNumberOfRequiredInputs(1);
36 }
37 
38 template <class TInputSampleList, class TOutputSampleList>
40 {
41  // Process object is not const-correct so the const_cast is required here
42  this->itk::ProcessObject::SetNthInput(0, const_cast<InputSampleListType*>(inputPtr));
43 }
44 
45 template <class TInputSampleList, class TOutputSampleList>
48 {
49  if (this->GetNumberOfInputs() < 1)
50  {
51  return nullptr;
52  }
53 
54  return static_cast<const InputSampleListType*>(this->itk::ProcessObject::GetInput(0));
55 }
56 
57 template <class TInputSampleList, class TOutputSampleList>
59 {
60  // Call superclass implementation
61  Superclass::PrintSelf(os, indent);
62 }
63 
64 } // End namespace Statistics
65 } // End namespace otb
66 
67 #endif
otb::Statistics::ListSampleToListSampleFilter::PrintSelf
void PrintSelf(std::ostream &os, itk::Indent indent) const override
Definition: otbListSampleToListSampleFilter.hxx:58
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::Statistics::ListSampleToListSampleFilter::ListSampleToListSampleFilter
ListSampleToListSampleFilter()
Definition: otbListSampleToListSampleFilter.hxx:33
otbListSampleToListSampleFilter.h
otb::Statistics::ListSampleToListSampleFilter::SetInput
void SetInput(const InputSampleListType *inputPtr)
Definition: otbListSampleToListSampleFilter.hxx:39
otb::Statistics::ListSampleToListSampleFilter< TInputSampleList, TInputSampleList >::InputSampleListType
TInputSampleList InputSampleListType
Definition: otbListSampleToListSampleFilter.h:56
otb::Statistics::ListSampleToListSampleFilter::GetInput
const InputSampleListType * GetInput() const
Definition: otbListSampleToListSampleFilter.hxx:47