OTB  9.0.0
Orfeo Toolbox
otbWaveletLowPassOperator.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 otbWaveletLowPassOperator_h
23 #define otbWaveletLowPassOperator_h
24 
25 #include "otbWaveletOperatorBase.h"
26 
27 namespace otb
28 {
29 
42 template <Wavelet::Wavelet TMotherWaveletOperator, Wavelet::WaveletDirection TDirectionOfTransformation, class TPixel, unsigned int VDimension,
43  class TAllocator = itk::NeighborhoodAllocator<TPixel>>
44 class ITK_EXPORT WaveletLowPassOperator : public WaveletOperatorBase<TMotherWaveletOperator, TPixel, VDimension, TAllocator>
45 {
46 public:
47 
51 
53 
54  typedef typename Superclass::SizeType SizeType;
55  static const Wavelet::WaveletDirection DirectionOfTransformation = TDirectionOfTransformation;
56 
57 protected:
58  void PrintSelf(std::ostream& os, itk::Indent i) const override
59  {
60  os << i << "WaveletLowPassOperator {this=" << this << "}" << std::endl;
61  Superclass::PrintSelf(os, i.GetNextIndent());
62  }
63 
69  typedef typename Superclass::PixelType PixelType;
70 
75  {
76  CoefficientVector coeff;
77  if (DirectionOfTransformation == Wavelet::FORWARD)
78  {
79  this->m_WaveletGenerator->GetLowPassCoefficientVector(coeff);
80  }
81  if (DirectionOfTransformation == Wavelet::INVERSE)
82  {
83  this->m_WaveletGenerator->GetHighPassCoefficientVector(coeff);
84  Superclass::GenerateInverseLowPassFilterFromHighPassFilter(coeff);
85  }
87 
88  Superclass::UpSamplingCoefficients(coeff);
89  return coeff;
90  }
91 }; // end of class
92 
93 } // end of namespace otb
94 
95 #endif
otb::Wavelet::INVERSE
@ INVERSE
Definition: otbWaveletOperatorBase.h:39
otb::WaveletLowPassOperator::Self
WaveletLowPassOperator Self
Definition: otbWaveletLowPassOperator.h:49
otbWaveletOperatorBase.h
otb::WaveletLowPassOperator::CoefficientVector
Superclass::CoefficientVector CoefficientVector
Definition: otbWaveletLowPassOperator.h:68
otb::WaveletLowPassOperator::SizeType
Superclass::SizeType SizeType
Definition: otbWaveletLowPassOperator.h:52
otb::WaveletLowPassOperator::PrintSelf
void PrintSelf(std::ostream &os, itk::Indent i) const override
Definition: otbWaveletLowPassOperator.h:58
otb::WaveletOperatorBase::PixelType
Superclass::PixelType PixelType
Definition: otbWaveletOperatorBase.h:154
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::Wavelet::WaveletDirection
WaveletDirection
Definition: otbWaveletOperatorBase.h:36
otb::WaveletLowPassOperator
Specific implementation of scale part of wavelet transformator.
Definition: otbWaveletLowPassOperator.h:44
otb::WaveletLowPassOperator::GenerateCoefficients
CoefficientVector GenerateCoefficients() override
Definition: otbWaveletLowPassOperator.h:74
otb::WaveletLowPassOperator::PixelType
Superclass::PixelType PixelType
Definition: otbWaveletLowPassOperator.h:69
otb::WaveletOperatorBase
A NeighborhoodOperator wavelet base class.
Definition: otbWaveletOperatorBase.h:76
otb::Wavelet::FORWARD
@ FORWARD
Definition: otbWaveletOperatorBase.h:38
otb::WaveletLowPassOperator::Superclass
WaveletOperatorBase< TMotherWaveletOperator, TPixel, VDimension, TAllocator > Superclass
Definition: otbWaveletLowPassOperator.h:50
otb::WaveletOperatorBase::CoefficientVector
Superclass::CoefficientVector CoefficientVector
Definition: otbWaveletOperatorBase.h:153