OTB  9.0.0
Orfeo Toolbox
otbShiftScaleVectorImageFilter.hxx
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1999-2011 Insight Software Consortium
3  * Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
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 otbShiftScaleVectorImageFilter_hxx
23 #define otbShiftScaleVectorImageFilter_hxx
24 
26 
27 namespace otb
28 {
32 template <class TInputImage, class TOutputImage>
34 {
35  this->Superclass::GenerateOutputInformation();
36  this->GetOutput()->SetNumberOfComponentsPerPixel(this->GetInput()->GetNumberOfComponentsPerPixel());
37 }
38 
42 template <class TInputImage, class TOutputImage>
44 {
45  if (this->GetInput())
46  {
47  typename TInputImage::Pointer input = const_cast<TInputImage*>(this->GetInput());
48  typename TInputImage::RegionType inputRegion;
49  this->CallCopyOutputRegionToInputRegion(inputRegion, this->GetOutput()->GetRequestedRegion());
50  input->SetRequestedRegion(inputRegion);
51  }
52 }
53 
57 template <class TInputImage, class TOutputImage>
59 {
60  // set up the functor values
61  this->GetFunctor().SetScaleValues(m_Scale);
62  this->GetFunctor().SetShiftValues(m_Shift);
63 }
65 
66 } // end namespace otb
67 #endif
otb::ShiftScaleVectorImageFilter::GenerateOutputInformation
void GenerateOutputInformation(void) override
Definition: otbShiftScaleVectorImageFilter.hxx:33
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::ShiftScaleVectorImageFilter::GenerateInputRequestedRegion
void GenerateInputRequestedRegion(void) override
Definition: otbShiftScaleVectorImageFilter.hxx:43
otbShiftScaleVectorImageFilter.h
otb::ShiftScaleVectorImageFilter::BeforeThreadedGenerateData
void BeforeThreadedGenerateData(void) override
Definition: otbShiftScaleVectorImageFilter.hxx:58