go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkGPUUnaryFunctorImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
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 * http://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/*=========================================================================
19 *
20 * Copyright Insight Software Consortium
21 *
22 * Licensed under the Apache License, Version 2.0 (the "License");
23 * you may not use this file except in compliance with the License.
24 * You may obtain a copy of the License at
25 *
26 * http://www.apache.org/licenses/LICENSE-2.0.txt
27 *
28 * Unless required by applicable law or agreed to in writing, software
29 * distributed under the License is distributed on an "AS IS" BASIS,
30 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31 * See the License for the specific language governing permissions and
32 * limitations under the License.
33 *
34 *=========================================================================*/
35#ifndef __itkGPUUnaryFunctorImageFilter_h
36#define __itkGPUUnaryFunctorImageFilter_h
37
38#include "itkGPUFunctorBase.h"
40#include "itkUnaryFunctorImageFilter.h"
41
42namespace itk
43{
59template< typename TInputImage, typename TOutputImage, typename TFunction, typename TParentImageFilter
60 = InPlaceImageFilter< TInputImage, TOutputImage > >
61class ITKOpenCL_EXPORT GPUUnaryFunctorImageFilter : public GPUInPlaceImageFilter< TInputImage, TOutputImage,
62 TParentImageFilter >
63{
64public:
65
68 typedef TParentImageFilter CPUSuperclass;
71 typedef SmartPointer< const Self > ConstPointer;
72
74 itkNewMacro( Self );
75
78
80 typedef TFunction FunctorType;
81
82 typedef TInputImage InputImageType;
83 typedef typename InputImageType::ConstPointer InputImagePointer;
84 typedef typename InputImageType::RegionType InputImageRegionType;
85 typedef typename InputImageType::PixelType InputImagePixelType;
86
87 typedef TOutputImage OutputImageType;
88 typedef typename OutputImageType::Pointer OutputImagePointer;
89 typedef typename OutputImageType::RegionType OutputImageRegionType;
90 typedef typename OutputImageType::PixelType OutputImagePixelType;
91
93 itkStaticConstMacro( InputImageDimension, unsigned int,
94 TInputImage::ImageDimension );
95 itkStaticConstMacro( OutputImageDimension, unsigned int,
96 TOutputImage::ImageDimension );
97
99 {
100 return m_Functor;
101 }
102
103
104 const FunctorType & GetFunctor() const
105 {
106 return m_Functor;
107 }
108
109
111 void SetFunctor( const FunctorType & functor )
112 {
113 if( m_Functor != functor )
114 {
115 m_Functor = functor;
116 this->Modified();
117 }
118 }
119
120
121protected:
122
124
126
128
129 virtual void GPUGenerateData();
130
134
135private:
136
137 GPUUnaryFunctorImageFilter( const Self & ); // purposely not implemented
138 void operator=( const Self & ); // purposely not implemented
139
141};
142
143} // end of namespace itk
144
145#ifndef ITK_MANUAL_INSTANTIATION
146#include "itkGPUUnaryFunctorImageFilter.hxx"
147#endif
148
149#endif
Base class for GPU filters that take an image as input and overwrite that image as the output.
Implements pixel-wise generic operation on one image using the GPU.
void SetFunctor(const FunctorType &functor)
itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension)
GPUInPlaceImageFilter< TInputImage, TOutputImage > GPUSuperclass
OutputImageType::RegionType OutputImageRegionType
InputImageType::ConstPointer InputImagePointer
InputImageType::RegionType InputImageRegionType
virtual void GenerateOutputInformation()
GPUUnaryFunctorImageFilter(const Self &)
itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension)
OutputImageType::PixelType OutputImagePixelType
void operator=(const Self &)
#define ITKOpenCL_EXPORT


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo