OTB  9.0.0
Orfeo Toolbox
otbWaveletHighPassOperator.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 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 otbWaveletHighPassOperator_h
23 #define otbWaveletHighPassOperator_h
24 
25 #include "otbWaveletOperatorBase.h"
26 
27 namespace otb
28 {
29 
43 template <Wavelet::Wavelet TMotherWaveletOperator, Wavelet::WaveletDirection TDirectionOfTransformation, class TPixel, unsigned int VDimension,
44  class TAllocator = itk::NeighborhoodAllocator<TPixel>>
45 class ITK_EXPORT WaveletHighPassOperator : public WaveletOperatorBase<TMotherWaveletOperator, TPixel, VDimension, TAllocator>
46 {
47 public:
48 
52 
54 
55  typedef typename Superclass::SizeType SizeType;
56  static const Wavelet::WaveletDirection DirectionOfTransformation = TDirectionOfTransformation;
57 
58 protected:
59  void PrintSelf(std::ostream& os, itk::Indent i) const override
60  {
61  os << i << "WaveletHighPassOperator {this=" << this << "}" << std::endl;
62  Superclass::PrintSelf(os, i.GetNextIndent());
63  }
64 
70  typedef typename Superclass::PixelType PixelType;
71 
76  {
77  CoefficientVector coeff;
78  if (DirectionOfTransformation == Wavelet::FORWARD)
79  {
80  this->m_WaveletGenerator->GetHighPassCoefficientVector(coeff);
81  }
82  if (DirectionOfTransformation == Wavelet::INVERSE)
83  {
84  this->m_WaveletGenerator->GetLowPassCoefficientVector(coeff);
85  Superclass::GenerateInverseHighPassFilterFromLowPassFilter(coeff);
86  }
88 
89  Superclass::UpSamplingCoefficients(coeff);
90  return coeff;
91  }
92 }; // end of class
93 
94 } // end of namespace otb
95 
96 #endif
otb::Wavelet::INVERSE
@ INVERSE
Definition: otbWaveletOperatorBase.h:39
otb::WaveletHighPassOperator::PixelType
Superclass::PixelType PixelType
Definition: otbWaveletHighPassOperator.h:70
otbWaveletOperatorBase.h
otb::WaveletHighPassOperator::CoefficientVector
Superclass::CoefficientVector CoefficientVector
Definition: otbWaveletHighPassOperator.h:69
otb::WaveletOperatorBase::PixelType
Superclass::PixelType PixelType
Definition: otbWaveletOperatorBase.h:154
otb::WaveletHighPassOperator::Superclass
WaveletOperatorBase< TMotherWaveletOperator, TPixel, VDimension, TAllocator > Superclass
Definition: otbWaveletHighPassOperator.h:51
otb::Wavelet::Wavelet
Wavelet
Definition: otbWaveletGenerator.h:35
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::WaveletOperatorBase::SizeType
Superclass::SizeType SizeType
Definition: otbWaveletOperatorBase.h:84
otb::WaveletHighPassOperator::Self
WaveletHighPassOperator Self
Definition: otbWaveletHighPassOperator.h:50
otb::WaveletHighPassOperator::GenerateCoefficients
CoefficientVector GenerateCoefficients() override
Definition: otbWaveletHighPassOperator.h:75
otb::Wavelet::WaveletDirection
WaveletDirection
Definition: otbWaveletOperatorBase.h:36
otb::WaveletOperatorBase
A NeighborhoodOperator wavelet base class.
Definition: otbWaveletOperatorBase.h:76
otb::WaveletHighPassOperator
Specific implementation of the mother wavelet part of wavelet transformator.
Definition: otbWaveletHighPassOperator.h:45
otb::Wavelet::FORWARD
@ FORWARD
Definition: otbWaveletOperatorBase.h:38
otb::WaveletHighPassOperator::PrintSelf
void PrintSelf(std::ostream &os, itk::Indent i) const override
Definition: otbWaveletHighPassOperator.h:59
otb::WaveletOperatorBase::CoefficientVector
Superclass::CoefficientVector CoefficientVector
Definition: otbWaveletOperatorBase.h:153
otb::WaveletHighPassOperator::SizeType
Superclass::SizeType SizeType
Definition: otbWaveletHighPassOperator.h:53