OTB  10.0.0
Orfeo Toolbox
otbBoxAndWhiskerImageFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2024 Centre National d'Etudes Spatiales (CNES)
3  * Copyright (C) 2007-2012 Institut Mines Telecom / Telecom Bretagne
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 otbBoxAndWhiskerImageFilter_h
23 #define otbBoxAndWhiskerImageFilter_h
24 
25 #include "itkMacro.h"
26 #include "itkUnaryFunctorImageFilter.h"
27 
28 namespace otb
29 {
30 
49 template <class TInputImage>
50 class ITK_EXPORT BoxAndWhiskerImageFilter : public itk::InPlaceImageFilter<TInputImage>
51 {
52 public:
55  typedef typename itk::InPlaceImageFilter<TInputImage> Superclass;
56  typedef itk::SmartPointer<Self> Pointer;
57  typedef itk::SmartPointer<const Self> ConstPointer;
58 
60  itkNewMacro(Self);
61 
63  itkTypeMacro(BoxAndWhiskerImageFilter, InPlaceImageFilter);
64 
66  typedef typename Superclass::OutputImageType OutputImageType;
67  typedef typename Superclass::OutputImagePointer OutputImagePointer;
68  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
69  typedef typename Superclass::OutputImagePixelType OutputImagePixelType;
70 
71  typedef typename Superclass::InputImageType InputImageType;
72  typedef typename Superclass::InputImagePointer InputImagePointer;
73  typedef typename Superclass::InputImageConstPointer InputImageConstPointer;
74  typedef typename Superclass::InputImageRegionType InputImageRegionType;
75  typedef typename Superclass::InputImagePixelType InputImagePixelType;
76 
77  typedef typename InputImageType::PixelType PixelType;
78  typedef typename InputImageType::InternalPixelType ValueType;
79  typedef typename InputImageType::SizeType SizeType;
80  typedef typename InputImageType::RegionType RegionType;
81 
83  itkStaticConstMacro(InputImageDimension, unsigned int, InputImageType::ImageDimension);
84  itkStaticConstMacro(OutputImageDimension, unsigned int, OutputImageType::ImageDimension);
86 
88  itkSetMacro(Radius, SizeType);
89  itkGetConstReferenceMacro(Radius, SizeType);
91 
93  itkGetConstMacro(Beta, double);
94  itkSetMacro(Beta, double);
95  itkGetConstMacro(NumberFound, unsigned int);
97 
98 protected:
101  {
102  }
103 
105  void DynamicThreadedGenerateData(const OutputImageRegionType& outputRegionForThread) override;
106  void GenerateOutputInformation() override;
107  void AllocateOutputs() override;
109 
111  PixelType PerformBoxAndWhiskerDetection(const PixelType& pixel);
112 
113 private:
115  void operator=(const Self&); // not implemented
116 
118  double m_Beta;
119  long int m_NumberFound;
120 
121 }; // end of class BoxAndWhiskerImageFilter
122 
123 } // end of namespace otb
124 
125 #ifndef OTB_MANUAL_INSTANTIATION
127 #endif
128 
129 #endif
This class performs the detection of outlier with the Box and Whisker technique.
Superclass::OutputImageRegionType OutputImageRegionType
void operator=(const Self &)
Superclass::OutputImagePixelType OutputImagePixelType
Superclass::InputImageRegionType InputImageRegionType
Superclass::InputImagePointer InputImagePointer
BoxAndWhiskerImageFilter(const Self &)
Superclass::OutputImageType OutputImageType
Superclass::InputImageType InputImageType
InputImageType::InternalPixelType ValueType
Superclass::OutputImagePointer OutputImagePointer
InputImageType::RegionType RegionType
itk::SmartPointer< const Self > ConstPointer
itk::InPlaceImageFilter< TInputImage > Superclass
Superclass::InputImageConstPointer InputImageConstPointer
Superclass::InputImagePixelType InputImagePixelType
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.