OTB  9.0.0
Orfeo Toolbox
otbImageToProfileFilter.h
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 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 
98  itkGetObjectMacro(Filter, FilterType);
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
otb::ImageToProfileFilter::m_OutputIndex
unsigned int m_OutputIndex
Definition: otbImageToProfileFilter.h:135
otbImageToImageListFilter.h
otb::ImageListSource
Base class for all the filters producing an otbImageList.
Definition: otbImageListSource.h:40
otb::ImageToProfileFilter::OutputImageListPointerType
Superclass::OutputImageListPointerType OutputImageListPointerType
Definition: otbImageToProfileFilter.h:69
otb::ImageToProfileFilter::m_Filter
FilterPointerType m_Filter
Definition: otbImageToProfileFilter.h:123
otb::ImageToProfileFilter::m_ProfileSize
unsigned int m_ProfileSize
Definition: otbImageToProfileFilter.h:126
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::ImageToProfileFilter::ParameterType
TParameter ParameterType
Definition: otbImageToProfileFilter.h:65
otbImageToProfileFilter.hxx
otb::ImageToProfileFilter
Base class to produce a profile of the response of a given filter for a range of parameter.
Definition: otbImageToProfileFilter.h:47
otb::ImageToProfileFilter::InputImageType
TInputImage InputImageType
Definition: otbImageToProfileFilter.h:60
otb::Wrapper::Tags::Filter
static const std::string Filter
Definition: otbWrapperTags.h:39
otb::ImageToProfileFilter::FilterPointerType
FilterType::Pointer FilterPointerType
Definition: otbImageToProfileFilter.h:67
otb::ImageToProfileFilter::OutputImageType
TOutputImage OutputImageType
Definition: otbImageToProfileFilter.h:64
otb::ImageToProfileFilter::Superclass
ImageToImageListFilter< TInputImage, TOutputImage > Superclass
Definition: otbImageToProfileFilter.h:52
otb::ImageToProfileFilter::FilterType
TFilter FilterType
Definition: otbImageToProfileFilter.h:66
otb::ImageToProfileFilter::m_Step
ParameterType m_Step
Definition: otbImageToProfileFilter.h:132
otb::ImageToProfileFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbImageToProfileFilter.h:54
otb::ImageToProfileFilter::OutputImageListType
Superclass::OutputImageListType OutputImageListType
Definition: otbImageToProfileFilter.h:68
otb::ImageToProfileFilter::Self
ImageToProfileFilter Self
Definition: otbImageToProfileFilter.h:51
otb::ImageToProfileFilter::InputImagePointerType
Superclass::InputImagePointer InputImagePointerType
Definition: otbImageToProfileFilter.h:70
otb::ImageToProfileFilter::m_InitialValue
ParameterType m_InitialValue
Definition: otbImageToProfileFilter.h:129
otb::ImageToProfileFilter::SetProfileParameter
virtual void SetProfileParameter(ParameterType)
Definition: otbImageToProfileFilter.h:93
otb::ImageToImageListFilter
Base class for all the filters taking an image input to produce an image list.
Definition: otbImageToImageListFilter.h:39
otb::ImageToProfileFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbImageToProfileFilter.h:53