OTB  7.2.0
Orfeo Toolbox
otbImageListToImageListApplyFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2020 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 otbImageListToImageListApplyFilter_h
22 #define otbImageListToImageListApplyFilter_h
23 
25 
26 namespace otb
27 {
46 template <class TInputImageList, class TOutputImageList, class TFilter>
47 class ITK_EXPORT ImageListToImageListApplyFilter : public ImageListToImageListFilter<typename TInputImageList::ImageType, typename TOutputImageList::ImageType>
48 {
49 public:
53  typedef itk::SmartPointer<Self> Pointer;
54  typedef itk::SmartPointer<const Self> ConstPointer;
55 
57  itkNewMacro(Self);
58 
61 
63  typedef TInputImageList InputImageListType;
64  typedef typename InputImageListType::Pointer InputImageListPointerType;
65  typedef typename InputImageListType::ImageType InputImageType;
66  typedef TOutputImageList OutputImageListType;
67  typedef typename OutputImageListType::Pointer OutputImageListPointerType;
68  typedef typename OutputImageListType::ImageType OutputImageType;
69  typedef TFilter FilterType;
70  typedef typename FilterType::Pointer FilterPointerType;
71 
73  itkSetObjectMacro(Filter, FilterType);
74  itkGetObjectMacro(Filter, FilterType);
76 
77  itkGetMacro(OutputIndex, unsigned int);
78  itkSetMacro(OutputIndex, unsigned int);
79 
82  void GenerateOutputInformation(void) override;
83 
85  void GenerateInputRequestedRegion(void) override;
86 
87 protected:
89  void GenerateData(void) override;
90 
93 
96  {
97  }
98 
100  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
101 
102 private:
103  ImageListToImageListApplyFilter(const Self&) = delete;
104  void operator=(const Self&) = delete;
105 
107  FilterPointerType m_Filter;
108 
110  unsigned int m_OutputIndex;
111 };
112 } // End namespace otb
113 #ifndef OTB_MANUAL_INSTANTIATION
115 #endif
116 
117 #endif
Base class for all the filters taking an image list as input to produce an image list.
static const std::string Filter
ImageListToImageListFilter< typename TInputImageList::ImageType, typename TOutputImageList::ImageType > Superclass
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
This filter applies the filter given as template to the input image list.