OTB  9.0.0
Orfeo Toolbox
otbCloudEstimatorFilter.hxx
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 otbCloudEstimatorFilter_hxx
22 #define otbCloudEstimatorFilter_hxx
23 
25 
26 namespace otb
27 {
28 
32 template <class TInputImage, class TOutputImage, class TFunction>
34 {
35 }
36 
40 template <class TInputImage, class TOutputImage, class TFunction>
41 void CloudEstimatorFilter<TInputImage, TOutputImage, TFunction>::PrintSelf(std::ostream& os, itk::Indent indent) const
42 {
43  this->Superclass::PrintSelf(os, indent);
44 }
45 
49 template <class TInputImage, class TOutputImage, class TFunction>
51 {
52  unsigned int ReferencePixelNumberOfBands = 0;
53  ReferencePixelNumberOfBands = this->GetReferencePixel().GetSize();
55 
56  if (ReferencePixelNumberOfBands != this->GetInput()->GetNumberOfComponentsPerPixel())
57  {
58  itkExceptionMacro("The number of bands of the reference pixel is different from the number of bands of the input image. ");
59  }
60 }
61 
65 template <class TInputImage, class TOutputImage, class TFunction>
67 {
68  this->GetFunctor().SetVariance(var);
69  this->Modified();
70 }
72 
76 template <class TInputImage, class TOutputImage, class TFunction>
78 {
79  return this->GetFunctor().GetVariance();
80 }
81 
85 template <class TInputImage, class TOutputImage, class TFunction>
87 {
88  this->GetFunctor().SetReferencePixel(ref);
89  this->Modified();
90 }
92 
96 template <class TInputImage, class TOutputImage, class TFunction>
99 {
100  return this->GetFunctor().GetReferencePixel();
101 }
102 }
104 
105 #endif
otb::var
Definition: otbParserXPlugins.h:282
otb::CloudEstimatorFilter::BeforeThreadedGenerateData
void BeforeThreadedGenerateData() override
Definition: otbCloudEstimatorFilter.hxx:50
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::CloudEstimatorFilter::SetVariance
void SetVariance(double var)
Definition: otbCloudEstimatorFilter.hxx:66
otb::CloudEstimatorFilter::PrintSelf
void PrintSelf(std::ostream &os, itk::Indent indent) const override
Definition: otbCloudEstimatorFilter.hxx:41
otbCloudEstimatorFilter.h
otb::CloudEstimatorFilter::InputPixelType
InputImageType::PixelType InputPixelType
Definition: otbCloudEstimatorFilter.h:60
otb::CloudEstimatorFilter::GetVariance
double GetVariance() const
Definition: otbCloudEstimatorFilter.hxx:77
otb::CloudEstimatorFilter::SetReferencePixel
void SetReferencePixel(InputPixelType ref)
Definition: otbCloudEstimatorFilter.hxx:86
otb::CloudEstimatorFilter::GetReferencePixel
InputPixelType GetReferencePixel() const
Definition: otbCloudEstimatorFilter.hxx:98
otb::CloudEstimatorFilter::CloudEstimatorFilter
CloudEstimatorFilter()
Definition: otbCloudEstimatorFilter.hxx:33