OTB  9.0.0
Orfeo Toolbox
otbTerraSarBrightnessImageFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1999-2011 Insight Software Consortium
3  * Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
4  *
5  * This file is part of Orfeo Toolbox
6  *
7  * https://www.orfeo-toolbox.org/
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21 
22 #ifndef otbTerraSarBrightnessImageFilter_h
23 #define otbTerraSarBrightnessImageFilter_h
24 
25 #include "itkUnaryFunctorImageFilter.h"
26 #include "itkMetaDataDictionary.h"
27 
29 
30 namespace otb
31 {
66 template <class TInputImage, class TOutputImage>
68  : public itk::UnaryFunctorImageFilter<TInputImage, TOutputImage, typename Functor::TerraSarBrightnessFunctor<
69  typename itk::NumericTraits<typename TInputImage::InternalPixelType>::ValueType,
70  typename itk::NumericTraits<typename TOutputImage::InternalPixelType>::ValueType>>
71 {
72 public:
74  itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
75  itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
77 
79  typedef TInputImage InputImageType;
80  typedef TOutputImage OutputImageType;
81  typedef typename InputImageType::InternalPixelType InputInternalPixelType;
82  typedef typename OutputImageType::InternalPixelType OutputInternalPixelType;
83  typedef typename itk::NumericTraits<InputInternalPixelType>::ValueType InputValueType;
84  typedef typename itk::NumericTraits<OutputInternalPixelType>::ValueType OutputValueType;
86  typedef itk::MetaDataDictionary MetaDataDictionaryType;
87 
90  typedef itk::UnaryFunctorImageFilter<InputImageType, OutputImageType, FunctorType> Superclass;
91  typedef itk::SmartPointer<Self> Pointer;
92  typedef itk::SmartPointer<const Self> ConstPointer;
93 
95  itkNewMacro(Self);
96 
98  itkTypeMacro(TerraSarBrightnessImageFilter, itk::UnaryFunctorImageFilter);
99 
101  void SetCalibrationFactor(double pCalibrationFactor)
102  {
103  this->GetFunctor().SetCalibrationFactor(pCalibrationFactor);
104  this->Modified();
105  }
107 
110  {
111  return this->GetFunctor().GetCalibrationFactor();
112  }
113 
115  void SetResultsInDecibels(bool db)
116  {
117  this->GetFunctor().SetResultsInDecibels(db);
118  this->Modified();
119  }
121 
124  {
125  return this->GetFunctor().GetResultsInDecibels();
126  }
127 
129  void SetDefaultValue(double value)
130  {
131  this->GetFunctor().SetResultsInDecibels(value);
132  this->Modified();
133  }
135 
137  {
138  return this->GetFunctor().SetResultsInDecibels();
139  }
140 
141 protected:
144 
147  {
148  }
149 
151  void BeforeThreadedGenerateData() override;
152 
153 private:
154  TerraSarBrightnessImageFilter(const Self&) = delete;
155  void operator=(const Self&) = delete;
156 };
157 
158 } // end namespace otb
159 
160 #ifndef OTB_MANUAL_INSTANTIATION
162 #endif
163 
164 #endif
otb::TerraSarBrightnessImageFilter::Self
TerraSarBrightnessImageFilter Self
Definition: otbTerraSarBrightnessImageFilter.h:89
otb::TerraSarBrightnessImageFilter::TerraSarBrightnessImageFilter
TerraSarBrightnessImageFilter()
Definition: otbTerraSarBrightnessImageFilter.h:143
otb::TerraSarBrightnessImageFilter::FunctorType
Functor::TerraSarBrightnessFunctor< InputValueType, OutputValueType > FunctorType
Definition: otbTerraSarBrightnessImageFilter.h:85
otb::TerraSarBrightnessImageFilter::~TerraSarBrightnessImageFilter
~TerraSarBrightnessImageFilter() override
Definition: otbTerraSarBrightnessImageFilter.h:146
otbTerraSarBrightnessFunctor.h
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::TerraSarBrightnessImageFilter::Superclass
itk::UnaryFunctorImageFilter< InputImageType, OutputImageType, FunctorType > Superclass
Definition: otbTerraSarBrightnessImageFilter.h:90
otb::TerraSarBrightnessImageFilter::OutputInternalPixelType
OutputImageType::InternalPixelType OutputInternalPixelType
Definition: otbTerraSarBrightnessImageFilter.h:82
otb::TerraSarBrightnessImageFilter::OutputValueType
itk::NumericTraits< OutputInternalPixelType >::ValueType OutputValueType
Definition: otbTerraSarBrightnessImageFilter.h:84
otb::TerraSarBrightnessImageFilter::GetResultsInDecibels
bool GetResultsInDecibels()
Definition: otbTerraSarBrightnessImageFilter.h:123
otb::TerraSarBrightnessImageFilter::GetCalibrationFactor
double GetCalibrationFactor()
Definition: otbTerraSarBrightnessImageFilter.h:109
otb::Functor::TerraSarBrightnessFunctor
Compute beta naught coefficient.
Definition: otbTerraSarBrightnessFunctor.h:52
otb::TerraSarBrightnessImageFilter::SetCalibrationFactor
void SetCalibrationFactor(double pCalibrationFactor)
Definition: otbTerraSarBrightnessImageFilter.h:101
otb::TerraSarBrightnessImageFilter::InputImageType
TInputImage InputImageType
Definition: otbTerraSarBrightnessImageFilter.h:79
otb::TerraSarBrightnessImageFilter
Calculates the brightness of TerraSar sensor images.
Definition: otbTerraSarBrightnessImageFilter.h:67
otb::TerraSarBrightnessImageFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbTerraSarBrightnessImageFilter.h:92
otbTerraSarBrightnessImageFilter.hxx
otb::TerraSarBrightnessImageFilter::MetaDataDictionaryType
itk::MetaDataDictionary MetaDataDictionaryType
Definition: otbTerraSarBrightnessImageFilter.h:86
otb::TerraSarBrightnessImageFilter::InputValueType
itk::NumericTraits< InputInternalPixelType >::ValueType InputValueType
Definition: otbTerraSarBrightnessImageFilter.h:83
otb::TerraSarBrightnessImageFilter::GetDefaultValue
double GetDefaultValue()
Definition: otbTerraSarBrightnessImageFilter.h:136
otb::TerraSarBrightnessImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbTerraSarBrightnessImageFilter.h:91
otb::TerraSarBrightnessImageFilter::SetResultsInDecibels
void SetResultsInDecibels(bool db)
Definition: otbTerraSarBrightnessImageFilter.h:115
otb::TerraSarBrightnessImageFilter::OutputImageType
TOutputImage OutputImageType
Definition: otbTerraSarBrightnessImageFilter.h:80
otb::TerraSarBrightnessImageFilter::InputInternalPixelType
InputImageType::InternalPixelType InputInternalPixelType
Definition: otbTerraSarBrightnessImageFilter.h:81
otb::TerraSarBrightnessImageFilter::SetDefaultValue
void SetDefaultValue(double value)
Definition: otbTerraSarBrightnessImageFilter.h:129