OTB  6.7.0
Orfeo Toolbox
otbImageToProfileFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2019 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 otbImageToProfileFilter_h
22 #define otbImageToProfileFilter_h
23 
25 
26 namespace otb
27 {
46 template <class TInputImage, class TOutputImage, class TFilter, class TParameter = unsigned int>
47 class ITK_EXPORT ImageToProfileFilter
48  : public ImageToImageListFilter<TInputImage, TOutputImage>
49 {
50 public:
56 
58  itkNewMacro(Self);
59 
62 
64  typedef TInputImage InputImageType;
65  typedef TOutputImage OutputImageType;
66  typedef TParameter ParameterType;
67  typedef TFilter FilterType;
68  typedef typename FilterType::Pointer FilterPointerType;
69  typedef typename Superclass::OutputImageListType OutputImageListType;
70  typedef typename Superclass::OutputImageListPointerType OutputImageListPointerType;
71  typedef typename Superclass::InputImagePointer InputImagePointerType;
72 
74  itkSetMacro(InitialValue, ParameterType);
75  itkGetMacro(InitialValue, ParameterType);
76 
78  itkSetMacro(ProfileSize, unsigned int);
79  itkGetMacro(ProfileSize, unsigned int);
80 
82  itkSetMacro(Step, ParameterType);
83  itkGetMacro(Step, ParameterType);
84 
86  itkSetMacro(OutputIndex, unsigned int);
87  itkGetMacro(OutputIndex, unsigned int);
89 
90 protected:
94  virtual void SetProfileParameter(ParameterType /*param*/) {}
95 
97  itkGetObjectMacro(Filter, FilterType);
98 
100  void GenerateData(void) override;
101 
103  void GenerateOutputInformation(void) override;
104 
106  void GenerateInputRequestedRegion(void) override;
107 
110 
112  ~ImageToProfileFilter() override {}
113 
115  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
116 
117 private:
118  ImageToProfileFilter(const Self &) = delete;
119  void operator =(const Self&) = delete;
120 
123 
125  unsigned int m_ProfileSize;
126 
129 
132 
134  unsigned int m_OutputIndex;
135 
136 };
137 } // End namespace otb
138 #ifndef OTB_MANUAL_INSTANTIATION
140 #endif
141 
142 #endif
FilterType::Pointer FilterPointerType
itk::SmartPointer< const Self > ConstPointer
itk::SmartPointer< Self > Pointer
virtual void SetProfileParameter(ParameterType)
static const std::string Filter
Superclass::OutputImageListType OutputImageListType
Superclass::OutputImageListPointerType OutputImageListPointerType
Base class for all the filters taking an image input to produce an image list.
Base class to produce a profile of the response of a given filter for a range of parameter.
Superclass::InputImagePointer InputImagePointerType
ImageToImageListFilter< TInputImage, TOutputImage > Superclass