OTB  9.0.0
Orfeo Toolbox
otbImageToPathListFilter.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 
22 #ifndef otbImageToPathListFilter_hxx
23 #define otbImageToPathListFilter_hxx
24 
26 #include "itkProcessObject.h"
27 
28 namespace otb
29 {
30 
34 template <class TInputImage, class TOutputPath>
36 {
37  // Modify superclass default values, can be overridden by subclasses
38  this->SetNumberOfRequiredInputs(1);
39 }
40 
44 template <class TInputImage, class TOutputPath>
46 {
47  // We have 1 input: an image
48 
49  // Process object is not const-correct so the const_cast is required here
50  this->ProcessObjectType::SetNthInput(0, const_cast<InputImageType*>(image));
51 }
52 
53 template <class TInputImage, class TOutputPath>
55 {
56 
57  if (this->GetNumberOfInputs() < 1)
58  {
59  return nullptr;
60  }
61 
62  return static_cast<const TInputImage*>(this->ProcessObjectType::GetInput(0));
63 }
64 
68 template <class TInputImage, class TOutputPath>
69 void ImageToPathListFilter<TInputImage, TOutputPath>::PrintSelf(std::ostream& os, itk::Indent indent) const
70 {
71  Superclass::PrintSelf(os, indent);
72 }
73 
74 } // end namespace otb
75 
76 #endif
otb::ImageToPathListFilter::ImageToPathListFilter
ImageToPathListFilter()
Definition: otbImageToPathListFilter.hxx:35
otb::ImageToPathListFilter::PrintSelf
void PrintSelf(std::ostream &os, itk::Indent indent) const override
Definition: otbImageToPathListFilter.hxx:69
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::ImageToPathListFilter::InputImageType
TInputImage InputImageType
Definition: otbImageToPathListFilter.h:54
otbImageToPathListFilter.h
otb::ImageToPathListFilter::GetInput
const InputImageType * GetInput(void)
Definition: otbImageToPathListFilter.hxx:54
otb::ImageToPathListFilter::SetInput
virtual void SetInput(const InputImageType *image)
Definition: otbImageToPathListFilter.hxx:45