OTB  10.0.0
Orfeo Toolbox
otbImageToProfileFilter.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 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 : public ImageToImageListFilter<TInputImage, TOutputImage>
48 {
49 public:
53  typedef itk::SmartPointer<Self> Pointer;
54  typedef itk::SmartPointer<const Self> ConstPointer;
55 
57  itkNewMacro(Self);
58 
61 
63  typedef TInputImage InputImageType;
64  typedef TOutputImage OutputImageType;
65  typedef TParameter ParameterType;
66  typedef TFilter FilterType;
67  typedef typename FilterType::Pointer FilterPointerType;
68  typedef typename Superclass::OutputImageListType OutputImageListType;
69  typedef typename Superclass::OutputImageListPointerType OutputImageListPointerType;
70  typedef typename Superclass::InputImagePointer InputImagePointerType;
71 
73  itkSetMacro(InitialValue, ParameterType);
74  itkGetMacro(InitialValue, ParameterType);
75 
77  itkSetMacro(ProfileSize, unsigned int);
78  itkGetMacro(ProfileSize, unsigned int);
79 
81  itkSetMacro(Step, ParameterType);
82  itkGetMacro(Step, ParameterType);
83 
85  itkSetMacro(OutputIndex, unsigned int);
86  itkGetMacro(OutputIndex, unsigned int);
88 
89 protected:
93  virtual void SetProfileParameter(ParameterType /*param*/)
94  {
95  }
96 
99 
101  void GenerateData(void) override;
102 
104  void GenerateOutputInformation(void) override;
105 
107  void GenerateInputRequestedRegion(void) override;
108 
111 
113  ~ImageToProfileFilter() override = default;
114 
116  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
117 
118 private:
119  ImageToProfileFilter(const Self&) = delete;
120  void operator=(const Self&) = delete;
121 
124 
126  unsigned int m_ProfileSize;
127 
130 
133 
135  unsigned int m_OutputIndex;
136 };
137 } // End namespace otb
138 #ifndef OTB_MANUAL_INSTANTIATION
140 #endif
141 
142 #endif
Base class for all the filters producing an otbImageList.
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.
itk::SmartPointer< Self > Pointer
void PrintSelf(std::ostream &os, itk::Indent indent) const override
FilterType::Pointer FilterPointerType
void GenerateOutputInformation(void) override
itk::SmartPointer< const Self > ConstPointer
itkGetObjectMacro(Filter, FilterType)
void operator=(const Self &)=delete
Superclass::OutputImageListType OutputImageListType
virtual void SetProfileParameter(ParameterType)
ImageToProfileFilter(const Self &)=delete
ImageToImageListFilter< TInputImage, TOutputImage > Superclass
Superclass::InputImagePointer InputImagePointerType
void GenerateInputRequestedRegion(void) override
Superclass::OutputImageListPointerType OutputImageListPointerType
void GenerateData(void) override
~ImageToProfileFilter() override=default
static const std::string Filter
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.