OTB  9.0.0
Orfeo Toolbox
otbCloudEstimatorFilter.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 otbCloudEstimatorFilter_h
22 #define otbCloudEstimatorFilter_h
23 
25 #include "itkUnaryFunctorImageFilter.h"
26 
27 namespace otb
28 {
40 template <class TInputImage, class TOutputImage,
41  class TFunction = Functor::SpectralAngleFunctor<typename TInputImage::PixelType, typename TOutputImage::PixelType>>
42 class ITK_EXPORT CloudEstimatorFilter : public itk::UnaryFunctorImageFilter<TInputImage, TOutputImage, TFunction>
43 {
44 public:
47  typedef typename itk::UnaryFunctorImageFilter<TInputImage, TOutputImage, TFunction> Superclass;
48  typedef itk::SmartPointer<Self> Pointer;
49  typedef itk::SmartPointer<const Self> ConstPointer;
50 
52  itkNewMacro(Self);
53 
55  itkTypeMacro(CloudEstimatorFilter, UnaryFunctorImageFilter);
56 
58  typedef TInputImage InputImageType;
59  typedef typename InputImageType::Pointer InputImagePointer;
60  typedef typename InputImageType::PixelType InputPixelType;
61  typedef TOutputImage OutputImageType;
62  typedef typename OutputImageType::Pointer OutputImagePointer;
63  typedef typename OutputImageType::RegionType OutputImageRegionType;
64  typedef typename OutputImageType::PixelType OutputPixelType;
65 
67  void SetReferencePixel(InputPixelType ref);
68  InputPixelType GetReferencePixel() const;
69  void SetVariance(double var);
70  double GetVariance() const;
72 
73 protected:
75 
77  {
78  }
79 
80  void BeforeThreadedGenerateData() override;
81 
82  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
83 
84 private:
85  CloudEstimatorFilter(const Self&) = delete;
86  void operator=(const Self&) = delete;
87 };
88 
89 } // end namespace otb
90 
91 #ifndef OTB_MANUAL_INSTANTIATION
93 #endif
94 
95 #endif
otb::CloudEstimatorFilter::Superclass
itk::UnaryFunctorImageFilter< TInputImage, TOutputImage, TFunction > Superclass
Definition: otbCloudEstimatorFilter.h:47
otb::CloudEstimatorFilter::InputImagePointer
InputImageType::Pointer InputImagePointer
Definition: otbCloudEstimatorFilter.h:59
otb::var
Definition: otbParserXPlugins.h:282
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::CloudEstimatorFilter::OutputImageType
TOutputImage OutputImageType
Definition: otbCloudEstimatorFilter.h:61
otbCloudEstimatorFilter.hxx
otb::CloudEstimatorFilter::InputImageType
TInputImage InputImageType
Definition: otbCloudEstimatorFilter.h:55
otb::CloudEstimatorFilter::OutputImageRegionType
OutputImageType::RegionType OutputImageRegionType
Definition: otbCloudEstimatorFilter.h:63
otb::CloudEstimatorFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbCloudEstimatorFilter.h:49
otb::CloudEstimatorFilter::InputPixelType
InputImageType::PixelType InputPixelType
Definition: otbCloudEstimatorFilter.h:60
otb::CloudEstimatorFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbCloudEstimatorFilter.h:48
otbSpectralAngleFunctor.h
otb::CloudEstimatorFilter::Self
CloudEstimatorFilter Self
Definition: otbCloudEstimatorFilter.h:46
otb::CloudEstimatorFilter::~CloudEstimatorFilter
~CloudEstimatorFilter() override
Definition: otbCloudEstimatorFilter.h:76
otb::CloudEstimatorFilter
Filter to help with the cloud detection.
Definition: otbCloudEstimatorFilter.h:42
otb::CloudEstimatorFilter::OutputPixelType
OutputImageType::PixelType OutputPixelType
Definition: otbCloudEstimatorFilter.h:64
otb::CloudEstimatorFilter::OutputImagePointer
OutputImageType::Pointer OutputImagePointer
Definition: otbCloudEstimatorFilter.h:62