ITK  6.0.0
Insight Toolkit
itkAddImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * https://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkAddImageFilter_h
19 #define itkAddImageFilter_h
20 
23 #include "itkNumericTraits.h"
24 
25 namespace itk
26 {
27 
80 template <typename TInputImage1, typename TInputImage2 = TInputImage1, typename TOutputImage = TInputImage1>
81 class ITK_TEMPLATE_EXPORT AddImageFilter : public BinaryGeneratorImageFilter<TInputImage1, TInputImage2, TOutputImage>
84 {
85 public:
86  ITK_DISALLOW_COPY_AND_MOVE(AddImageFilter);
87 
90  using Superclass = BinaryGeneratorImageFilter<TInputImage1, TInputImage2, TOutputImage>;
91 
92 
93  using Pointer = SmartPointer<Self>;
94  using ConstPointer = SmartPointer<const Self>;
95 
96  using FunctorType =
97  Functor::Add2<typename TInputImage1::PixelType, typename TInputImage2::PixelType, typename TOutputImage::PixelType>;
98 
100  itkNewMacro(Self);
101 
103  itkOverrideGetNameOfClassMacro(AddImageFilter);
104 
105 #ifdef ITK_USE_CONCEPT_CHECKING
106  // Begin concept checking
107  itkConceptMacro(Input1Input2OutputAdditiveOperatorsCheck,
108  (Concept::AdditiveOperators<typename TInputImage1::PixelType,
109  typename TInputImage2::PixelType,
110  typename TOutputImage::PixelType>));
111  // End concept checking
112 #endif
113 
114 protected:
116  {
117 #if !defined(ITK_WRAPPING_PARSER)
118  Superclass::SetFunctor(FunctorType());
119 #endif
120  }
121  ~AddImageFilter() override = default;
122 };
123 } // end namespace itk
124 
125 #endif
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkAddImageFilter.h:94
~AddImageFilter
~AddImageFilter() override=default
itkBinaryGeneratorImageFilter.h
itkArithmeticOpsFunctors.h
AddImageFilter
AddImageFilter()
Definition: itkAddImageFilter.h:115
FunctorType
Functor::Add2< typename TInputImage1::PixelType, typename TInputImage2::PixelType, typename TOutputImage::PixelType > FunctorType
Definition: itkAddImageFilter.h:97
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:65
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itkNumericTraits.h
AddImageFilter
Definition: itkAddImageFilter.h:81
Superclass
BinaryGeneratorImageFilter< TInputImage1, TInputImage2, TOutputImage > Superclass
Definition: itkAddImageFilter.h:90