ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkGPUUnaryFunctorImageFilter.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 itkGPUUnaryFunctorImageFilter_h
19#define itkGPUUnaryFunctorImageFilter_h
20
21#include "itkGPUFunctorBase.h"
24
25namespace itk
26{
35template <typename TInputImage,
36 typename TOutputImage,
37 typename TFunction,
38 typename TParentImageFilter = InPlaceImageFilter<TInputImage, TOutputImage>>
39class ITK_TEMPLATE_EXPORT GPUUnaryFunctorImageFilter
40 : public GPUInPlaceImageFilter<TInputImage, TOutputImage, TParentImageFilter>
41{
42public:
43 ITK_DISALLOW_COPY_AND_MOVE(GPUUnaryFunctorImageFilter);
44
47 using CPUSuperclass = TParentImageFilter;
51
53 itkNewMacro(Self);
54
56 itkOverrideGetNameOfClassMacro(GPUUnaryFunctorImageFilter);
57
59 using FunctorType = TFunction;
60
61 using InputImageType = TInputImage;
62 using InputImagePointer = typename InputImageType::ConstPointer;
63 using InputImageRegionType = typename InputImageType::RegionType;
64 using InputImagePixelType = typename InputImageType::PixelType;
65
66 using OutputImageType = TOutputImage;
67 using OutputImagePointer = typename OutputImageType::Pointer;
68 using OutputImageRegionType = typename OutputImageType::RegionType;
69 using OutputImagePixelType = typename OutputImageType::PixelType;
70
71#if !defined(ITK_WRAPPING_PARSER)
74 {
75 return m_Functor;
76 }
77
78 const FunctorType &
79 GetFunctor() const
80 {
81 return m_Functor;
82 }
83
85 void
86 SetFunctor(const FunctorType & functor)
87 {
88 if (m_Functor != functor)
89 {
90 m_Functor = functor;
91 this->Modified();
92 }
93 }
94#endif // !defined( ITK_WRAPPING_PARSER )
96
97protected:
99 ~GPUUnaryFunctorImageFilter() override = default;
100
101 void
103
104 void
105 GPUGenerateData() override;
106
110
111private:
113};
114
115} // end of namespace itk
116
117#ifndef ITK_MANUAL_INSTANTIATION
118# include "itkGPUUnaryFunctorImageFilter.hxx"
119#endif
120
121#endif
void SetFunctor(const FunctorType &functor)
typename OutputImageType::PixelType OutputImagePixelType
typename InputImageType::RegionType InputImageRegionType
typename InputImageType::ConstPointer InputImagePointer
typename OutputImageType::RegionType OutputImageRegionType
~GPUUnaryFunctorImageFilter() override=default
GPUInPlaceImageFilter< TInputImage, TOutputImage > GPUSuperclass
typename OutputImageType::Pointer OutputImagePointer
void GenerateOutputInformation() override
typename InputImageType::PixelType InputImagePixelType
Base class for filters that take an image as input and overwrite that image as the output.
virtual void Modified() const
Implements transparent reference counting.
Functor::Add2< typename TInputImage1::PixelType, typename TInputImage2::PixelType, typename TOutputImage::PixelType > FunctorType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....