OTB  9.0.0
Orfeo Toolbox
otbSpectralAngleDistanceImageFilter.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 otbSpectralAngleDistanceImageFilter_h
22 #define otbSpectralAngleDistanceImageFilter_h
23 
24 #include "itkImageToImageFilter.h"
25 
26 namespace otb
27 {
54 template <class TInputImage, class TOutputImage>
55 class ITK_EXPORT SpectralAngleDistanceImageFilter : public itk::ImageToImageFilter<TInputImage, TOutputImage>
56 {
57 public:
60  typedef itk::ImageToImageFilter<TInputImage, TOutputImage> Superclass;
61  typedef itk::SmartPointer<Self> Pointer;
62  typedef itk::SmartPointer<const Self> ConstPointer;
63 
65  itkNewMacro(Self);
66 
68  itkTypeMacro(SpectralAngleDistanceImageFilter, itk::ImageToImageFilter);
69 
71  typedef TInputImage InputImageType;
72  typedef typename InputImageType::ConstPointer InputImageConstPointerType;
73  typedef typename InputImageType::RegionType InputImageRegionType;
74  typedef typename InputImageType::PixelType InputPixelType;
75  typedef TOutputImage OutputImageType;
76  typedef typename OutputImageType::Pointer OutputImagePointerType;
77  typedef typename OutputImageType::RegionType OutputImageRegionType;
78  typedef typename OutputImageType::PixelType OutputPixelType;
79 
81  itkGetConstReferenceMacro(ReferencePixel, InputPixelType);
82  itkSetMacro(ReferencePixel, InputPixelType);
84 
85 protected:
88 
91  {
92  }
93 
95  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
96 
107  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId) override;
108 
109  void BeforeThreadedGenerateData() override;
110 
111 private:
112  SpectralAngleDistanceImageFilter(const Self&) = delete;
113  void operator=(const Self&) = delete;
114 
117 };
118 } // End namespace otb
119 #ifndef OTB_MANUAL_INSTANTIATION
121 #endif
122 
123 #endif
otb::SpectralAngleDistanceImageFilter::InputImageType
TInputImage InputImageType
Definition: otbSpectralAngleDistanceImageFilter.h:68
otb::SpectralAngleDistanceImageFilter::OutputImageRegionType
OutputImageType::RegionType OutputImageRegionType
Definition: otbSpectralAngleDistanceImageFilter.h:77
otb::SpectralAngleDistanceImageFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbSpectralAngleDistanceImageFilter.h:62
otb::SpectralAngleDistanceImageFilter::m_ReferencePixel
InputPixelType m_ReferencePixel
Definition: otbSpectralAngleDistanceImageFilter.h:116
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::SpectralAngleDistanceImageFilter
This filter implements the computation of the spectral angle distance with respect to a reference pix...
Definition: otbSpectralAngleDistanceImageFilter.h:55
otbSpectralAngleDistanceImageFilter.hxx
otb::SpectralAngleDistanceImageFilter::InputPixelType
InputImageType::PixelType InputPixelType
Definition: otbSpectralAngleDistanceImageFilter.h:74
otb::SpectralAngleDistanceImageFilter::OutputImageType
TOutputImage OutputImageType
Definition: otbSpectralAngleDistanceImageFilter.h:75
otb::SpectralAngleDistanceImageFilter::InputImageConstPointerType
InputImageType::ConstPointer InputImageConstPointerType
Definition: otbSpectralAngleDistanceImageFilter.h:72
otb::SpectralAngleDistanceImageFilter::OutputPixelType
OutputImageType::PixelType OutputPixelType
Definition: otbSpectralAngleDistanceImageFilter.h:78
otb::SpectralAngleDistanceImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbSpectralAngleDistanceImageFilter.h:61
otb::SpectralAngleDistanceImageFilter::OutputImagePointerType
OutputImageType::Pointer OutputImagePointerType
Definition: otbSpectralAngleDistanceImageFilter.h:76
otb::SpectralAngleDistanceImageFilter::Self
SpectralAngleDistanceImageFilter Self
Definition: otbSpectralAngleDistanceImageFilter.h:59
otb::SpectralAngleDistanceImageFilter::~SpectralAngleDistanceImageFilter
~SpectralAngleDistanceImageFilter() override
Definition: otbSpectralAngleDistanceImageFilter.h:90
otb::SpectralAngleDistanceImageFilter::Superclass
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
Definition: otbSpectralAngleDistanceImageFilter.h:60
otb::SpectralAngleDistanceImageFilter::InputImageRegionType
InputImageType::RegionType InputImageRegionType
Definition: otbSpectralAngleDistanceImageFilter.h:73