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 
42 namespace itk
43 {
59 template< typename TInputImage, typename TOutputImage, typename TFunction, typename TParentImageFilter
60  = InPlaceImageFilter< TInputImage, TOutputImage > >
61 class ITKOpenCL_EXPORT GPUUnaryFunctorImageFilter : public GPUInPlaceImageFilter< TInputImage, TOutputImage,
62  TParentImageFilter >
63 {
64 public:
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 
121 protected:
122 
124 
126 
128 
129  virtual void GPUGenerateData();
130 
134 
135 private:
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
itk::GPUUnaryFunctorImageFilter::m_Functor
FunctorType m_Functor
Definition: itkGPUUnaryFunctorImageFilter.h:140
itk::Functor::GPUCast< TInputImage::PixelType, TOutputImage::PixelType >
itk::GPUUnaryFunctorImageFilter::CPUSuperclass
TParentImageFilter CPUSuperclass
Definition: itkGPUUnaryFunctorImageFilter.h:68
itk::GPUUnaryFunctorImageFilter::~GPUUnaryFunctorImageFilter
virtual ~GPUUnaryFunctorImageFilter()
Definition: itkGPUUnaryFunctorImageFilter.h:125
itk::GPUUnaryFunctorImageFilter::GetFunctor
const FunctorType & GetFunctor() const
Definition: itkGPUUnaryFunctorImageFilter.h:104
SmartPointer< Self >
itk::GPUUnaryFunctorImageFilter::OutputImagePixelType
OutputImageType::PixelType OutputImagePixelType
Definition: itkGPUUnaryFunctorImageFilter.h:90
itk::GPUInPlaceImageFilter
Base class for GPU filters that take an image as input and overwrite that image as the output.
Definition: itkGPUInPlaceImageFilter.h:63
ITKOpenCL_EXPORT
#define ITKOpenCL_EXPORT
Definition: itkOpenCLExport.h:31
itk::GPUUnaryFunctorImageFilter::FunctorType
TFunction FunctorType
Definition: itkGPUUnaryFunctorImageFilter.h:77
itk::GPUUnaryFunctorImageFilter::GetFunctor
FunctorType & GetFunctor()
Definition: itkGPUUnaryFunctorImageFilter.h:98
itk::GPUUnaryFunctorImageFilter::Pointer
SmartPointer< Self > Pointer
Definition: itkGPUUnaryFunctorImageFilter.h:70
itk::GPUUnaryFunctorImageFilter::GenerateOutputInformation
virtual void GenerateOutputInformation()
itk::GPUUnaryFunctorImageFilter::InputImageType
TInputImage InputImageType
Definition: itkGPUUnaryFunctorImageFilter.h:82
itk::GPUUnaryFunctorImageFilter::InputImagePointer
InputImageType::ConstPointer InputImagePointer
Definition: itkGPUUnaryFunctorImageFilter.h:83
itk::GPUUnaryFunctorImageFilter::OutputImageType
TOutputImage OutputImageType
Definition: itkGPUUnaryFunctorImageFilter.h:87
itk::GPUUnaryFunctorImageFilter::GPUSuperclass
GPUInPlaceImageFilter< TInputImage, TOutputImage > GPUSuperclass
Definition: itkGPUUnaryFunctorImageFilter.h:69
itk::GPUUnaryFunctorImageFilter::m_UnaryFunctorImageFilterGPUKernelHandle
int m_UnaryFunctorImageFilterGPUKernelHandle
Definition: itkGPUUnaryFunctorImageFilter.h:133
itk::GPUUnaryFunctorImageFilter::InputImageRegionType
InputImageType::RegionType InputImageRegionType
Definition: itkGPUUnaryFunctorImageFilter.h:84
itk::GPUUnaryFunctorImageFilter::ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkGPUUnaryFunctorImageFilter.h:71
itk::GPUUnaryFunctorImageFilter::OutputImageRegionType
OutputImageType::RegionType OutputImageRegionType
Definition: itkGPUUnaryFunctorImageFilter.h:89
itk::GPUUnaryFunctorImageFilter
Implements pixel-wise generic operation on one image using the GPU.
Definition: itkGPUUnaryFunctorImageFilter.h:63
itk::GPUImageToImageFilter
class to abstract the behaviour of the GPU filters.
Definition: itkGPUImageToImageFilter.h:65
itk::GPUUnaryFunctorImageFilter::GPUGenerateData
virtual void GPUGenerateData()
itk::GPUUnaryFunctorImageFilter::GPUUnaryFunctorImageFilter
GPUUnaryFunctorImageFilter(const Self &)
itkGPUFunctorBase.h
itk::GPUUnaryFunctorImageFilter::itkStaticConstMacro
itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension)
itk::GPUUnaryFunctorImageFilter::operator=
void operator=(const Self &)
itk::GPUUnaryFunctorImageFilter::Self
GPUUnaryFunctorImageFilter Self
Definition: itkGPUUnaryFunctorImageFilter.h:67
itk::GPUUnaryFunctorImageFilter::InputImagePixelType
InputImageType::PixelType InputImagePixelType
Definition: itkGPUUnaryFunctorImageFilter.h:85
itk
Definition: itkAdvancedImageToImageMetric.h:40
itk::GPUUnaryFunctorImageFilter::itkStaticConstMacro
itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension)
itk::GPUUnaryFunctorImageFilter::OutputImagePointer
OutputImageType::Pointer OutputImagePointer
Definition: itkGPUUnaryFunctorImageFilter.h:88
itk::GPUUnaryFunctorImageFilter::GPUUnaryFunctorImageFilter
GPUUnaryFunctorImageFilter()
Definition: itkGPUUnaryFunctorImageFilter.h:123
itk::GPUUnaryFunctorImageFilter::SetFunctor
void SetFunctor(const FunctorType &functor)
Definition: itkGPUUnaryFunctorImageFilter.h:111
itkGPUInPlaceImageFilter.h


Generated on OURCE_DATE_EPOCH for elastix by doxygen 1.8.18 elastix logo