OTB  9.0.0
Orfeo Toolbox
otbRadiometricMomentsImageFilter.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 otbRadiometricMomentsImageFilter_h
22 #define otbRadiometricMomentsImageFilter_h
23 
24 #include "itkImageToImageFilter.h"
26 #include "itkConstNeighborhoodIterator.h"
27 
28 namespace otb
29 {
30 
45 template <class TInputImage, class TOutputImage>
46 class ITK_EXPORT RadiometricMomentsImageFilter : public itk::ImageToImageFilter<TInputImage, TOutputImage>
47 {
48 public:
51  typedef itk::ImageToImageFilter<TInputImage, TOutputImage> Superclass;
52  typedef itk::SmartPointer<Self> Pointer;
53  typedef itk::SmartPointer<const Self> ConstPointer;
54 
56  itkNewMacro(Self);
57 
59  itkTypeMacro(RadiometricMomentsImageFilter, ImageToImageFilter);
60 
62  typedef typename Superclass::InputImageType InputImageType;
63  typedef typename InputImageType::ConstPointer InputImagePointer;
64  typedef typename InputImageType::RegionType InputImageRegionType;
65  typedef typename InputImageType::PixelType InputImagePixelType;
66  typedef typename InputImageType::SizeType InputImageSizeType;
67  typedef typename Superclass::OutputImageType OutputImageType;
68  typedef typename OutputImageType::Pointer OutputImagePointer;
69  typedef typename OutputImageType::RegionType OutputImageRegionType;
70  typedef typename OutputImageType::PixelType OutputImagePixelType;
71  typedef typename OutputImageType::InternalPixelType ScalarType;
72 
74 
75  typedef itk::ProcessObject ProcessObjectType;
76 
78  itkSetMacro(Radius, InputImageSizeType);
79  itkGetMacro(Radius, InputImageSizeType);
81 
83  void SetRadius(unsigned int radius)
84  {
85  m_Radius.Fill(radius);
86  }
87 
88  typedef itk::ConstNeighborhoodIterator<TInputImage> NeighborhoodIteratorType;
89  typedef typename NeighborhoodIteratorType::RadiusType RadiusType;
90  typedef unsigned char RadiusSizeType;
91 
92 protected:
95  {
96  }
97  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId) override;
98  void GenerateInputRequestedRegion(void) override;
99  void GenerateOutputInformation(void) override;
100 
101 private:
102  RadiometricMomentsImageFilter(const Self&) = delete;
103  void operator=(const Self&) = delete;
104 
107 };
108 
109 } // namespace otb
110 
111 #ifndef OTB_MANUAL_INSTANTIATION
113 #endif
114 
115 #endif
otb::RadiometricMomentsImageFilter::InputImagePixelType
InputImageType::PixelType InputImagePixelType
Definition: otbRadiometricMomentsImageFilter.h:65
otb::RadiometricMomentsImageFilter::~RadiometricMomentsImageFilter
~RadiometricMomentsImageFilter() override
Definition: otbRadiometricMomentsImageFilter.h:94
otb::RadiometricMomentsImageFilter::InputImagePointer
InputImageType::ConstPointer InputImagePointer
Definition: otbRadiometricMomentsImageFilter.h:63
otb::RadiometricMomentsImageFilter::InputImageType
Superclass::InputImageType InputImageType
Definition: otbRadiometricMomentsImageFilter.h:59
otb::RadiometricMomentsImageFilter::OutputImagePointer
OutputImageType::Pointer OutputImagePointer
Definition: otbRadiometricMomentsImageFilter.h:68
otb::RadiometricMomentsImageFilter::m_Radius
InputImageSizeType m_Radius
Definition: otbRadiometricMomentsImageFilter.h:105
otb::RadiometricMomentsImageFilter::SetRadius
void SetRadius(unsigned int radius)
Definition: otbRadiometricMomentsImageFilter.h:83
otb::RadiometricMomentsImageFilter::NeighborhoodIteratorType
itk::ConstNeighborhoodIterator< TInputImage > NeighborhoodIteratorType
Definition: otbRadiometricMomentsImageFilter.h:88
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::RadiometricMomentsImageFilter::m_Functor
FunctorType m_Functor
Definition: otbRadiometricMomentsImageFilter.h:106
otb::RadiometricMomentsImageFilter::OutputImageType
Superclass::OutputImageType OutputImageType
Definition: otbRadiometricMomentsImageFilter.h:67
otb::RadiometricMomentsImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbRadiometricMomentsImageFilter.h:52
otb::RadiometricMomentsImageFilter::Superclass
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
Definition: otbRadiometricMomentsImageFilter.h:51
otb::RadiometricMomentsImageFilter::RadiusSizeType
unsigned char RadiusSizeType
Definition: otbRadiometricMomentsImageFilter.h:90
otb::RadiometricMomentsImageFilter::FunctorType
Functor::RadiometricMomentsFunctor< itk::ConstNeighborhoodIterator< InputImageType >, ScalarType > FunctorType
Definition: otbRadiometricMomentsImageFilter.h:73
otb::RadiometricMomentsImageFilter::RadiusType
NeighborhoodIteratorType::RadiusType RadiusType
Definition: otbRadiometricMomentsImageFilter.h:89
otb::RadiometricMomentsImageFilter::OutputImagePixelType
OutputImageType::PixelType OutputImagePixelType
Definition: otbRadiometricMomentsImageFilter.h:70
otbRadiometricMomentsFunctor.h
otb::RadiometricMomentsImageFilter::OutputImageRegionType
OutputImageType::RegionType OutputImageRegionType
Definition: otbRadiometricMomentsImageFilter.h:69
otb::RadiometricMomentsImageFilter::ProcessObjectType
itk::ProcessObject ProcessObjectType
Definition: otbRadiometricMomentsImageFilter.h:75
otb::RadiometricMomentsImageFilter::InputImageRegionType
InputImageType::RegionType InputImageRegionType
Definition: otbRadiometricMomentsImageFilter.h:64
otb::RadiometricMomentsImageFilter::Self
RadiometricMomentsImageFilter Self
Definition: otbRadiometricMomentsImageFilter.h:50
otb::RadiometricMomentsImageFilter::ScalarType
OutputImageType::InternalPixelType ScalarType
Definition: otbRadiometricMomentsImageFilter.h:71
otb::RadiometricMomentsImageFilter
Calculate the radiometric moments.
Definition: otbRadiometricMomentsImageFilter.h:46
otbRadiometricMomentsImageFilter.hxx
otb::Functor::RadiometricMomentsFunctor
Definition: otbRadiometricMomentsFunctor.h:39
otb::RadiometricMomentsImageFilter::InputImageSizeType
InputImageType::SizeType InputImageSizeType
Definition: otbRadiometricMomentsImageFilter.h:66
otb::RadiometricMomentsImageFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbRadiometricMomentsImageFilter.h:53