OTB  10.0.0
Orfeo Toolbox
otbCloudEstimatorFilter.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 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
Filter to help with the cloud detection.
void operator=(const Self &)=delete
InputImageType::PixelType InputPixelType
OutputImageType::PixelType OutputPixelType
InputImageType::Pointer InputImagePointer
CloudEstimatorFilter(const Self &)=delete
itk::UnaryFunctorImageFilter< TInputImage, TOutputImage, TFunction > Superclass
itk::SmartPointer< Self > Pointer
OutputImageType::Pointer OutputImagePointer
itk::SmartPointer< const Self > ConstPointer
OutputImageType::RegionType OutputImageRegionType
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.