OTB  9.0.0
Orfeo Toolbox
otbTernaryFunctorImageFilter.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 otbTernaryFunctorImageFilter_h
22 #define otbTernaryFunctorImageFilter_h
23 
24 #include "itkTernaryFunctorImageFilter.h"
25 
26 namespace otb
27 {
43 template <class TInputImage1, class TInputImage2, class TInputImage3, class TOutputImage, class TFunction>
44 class ITK_EXPORT TernaryFunctorImageFilter : public itk::TernaryFunctorImageFilter<TInputImage1, TInputImage2, TInputImage3, TOutputImage, TFunction>
45 {
46 public:
47 
50  typedef itk::TernaryFunctorImageFilter<TInputImage1, TInputImage2, TInputImage3, TOutputImage, TFunction> Superclass;
51  typedef itk::SmartPointer<Self> Pointer;
52  typedef itk::SmartPointer<const Self> ConstPointer;
53 
55  itkNewMacro(Self);
56 
58  itkTypeMacro(TernaryFunctorImageFilter, itk::TernaryFunctorImageFilter);
59 
60 protected:
63  {
64  }
65 
74  void GenerateOutputInformation() override
75  {
76  Superclass::GenerateOutputInformation();
77  typename Superclass::OutputImagePointer outputPtr = this->GetOutput();
78  outputPtr->SetNumberOfComponentsPerPixel( // propagate vector length info
79  this->GetFunctor().GetOutputSize());
80  }
82 
83 private:
84  TernaryFunctorImageFilter(const Self&) = delete;
85  void operator=(const Self&) = delete;
86 };
87 
88 } // end namespace otb
89 
90 #endif
otb::TernaryFunctorImageFilter::GenerateOutputInformation
void GenerateOutputInformation() override
Definition: otbTernaryFunctorImageFilter.h:74
otb::TernaryFunctorImageFilter::Self
TernaryFunctorImageFilter Self
Definition: otbTernaryFunctorImageFilter.h:49
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::TernaryFunctorImageFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbTernaryFunctorImageFilter.h:52
otb::TernaryFunctorImageFilter::~TernaryFunctorImageFilter
~TernaryFunctorImageFilter() override
Definition: otbTernaryFunctorImageFilter.h:62
otb::TernaryFunctorImageFilter::TernaryFunctorImageFilter
TernaryFunctorImageFilter()
Definition: otbTernaryFunctorImageFilter.h:61
otb::TernaryFunctorImageFilter
Implements pixel-wise generic operation on three images.
Definition: otbTernaryFunctorImageFilter.h:44
otb::TernaryFunctorImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbTernaryFunctorImageFilter.h:51
otb::TernaryFunctorImageFilter::Superclass
itk::TernaryFunctorImageFilter< TInputImage1, TInputImage2, TInputImage3, TOutputImage, TFunction > Superclass
Definition: otbTernaryFunctorImageFilter.h:50