go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkGPUImageToImageFilter.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 __itkGPUImageToImageFilter_h
36 #define __itkGPUImageToImageFilter_h
37 
38 #include "itkImageToImageFilter.h"
39 #include "itkOpenCLKernelManager.h"
40 
41 namespace itk
42 {
62 template< typename TInputImage, typename TOutputImage, typename TParentImageFilter
63  = ImageToImageFilter< TInputImage, TOutputImage > >
64 class ITKOpenCL_EXPORT GPUImageToImageFilter : public TParentImageFilter
65 {
66 public:
67 
70  typedef TParentImageFilter Superclass;
72  typedef SmartPointer< const Self > ConstPointer;
73 
75  itkNewMacro( Self );
76 
78  itkTypeMacro( GPUImageToImageFilter, TParentImageFilter );
79 
81  typedef typename Superclass::DataObjectIdentifierType DataObjectIdentifierType;
82  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
83  typedef typename Superclass::OutputImagePixelType OutputImagePixelType;
84 
86  typedef TInputImage InputImageType;
87  typedef typename InputImageType::Pointer InputImagePointer;
88  typedef typename InputImageType::ConstPointer InputImageConstPointer;
89  typedef typename InputImageType::RegionType InputImageRegionType;
90  typedef typename InputImageType::PixelType InputImagePixelType;
91  typedef TOutputImage OutputImageType;
92 
94  itkStaticConstMacro( InputImageDimension, unsigned int, TInputImage::ImageDimension );
95  itkStaticConstMacro( OutputImageDimension, unsigned int, TOutputImage::ImageDimension );
96 
97  // macro to set if GPU is used
98  itkSetMacro( GPUEnabled, bool );
99  itkGetConstMacro( GPUEnabled, bool );
100  itkBooleanMacro( GPUEnabled );
101 
102  virtual void GraftOutput( DataObject * graft );
103 
104  virtual void GraftOutput( const DataObjectIdentifierType & key, DataObject * graft );
105 
106  virtual void SetNumberOfThreads( ThreadIdType _arg );
107 
108 protected:
109 
112 
113  virtual void PrintSelf( std::ostream & os, Indent indent ) const;
114 
115  virtual void GenerateData();
116 
117  virtual void GPUGenerateData() {}
118 
119  // GPU kernel manager
121 
122 private:
123 
124  GPUImageToImageFilter( const Self & ); // purposely not implemented
125  void operator=( const Self & ); // purposely not implemented
126 
128 };
129 
130 } // end namespace itk
131 
132 #ifndef ITK_MANUAL_INSTANTIATION
133 #include "itkGPUImageToImageFilter.hxx"
134 #endif
135 
136 #endif
itk::GPUImageToImageFilter::GraftOutput
virtual void GraftOutput(DataObject *graft)
itkOpenCLKernelManager.h
SmartPointer< Self >
ITKOpenCL_EXPORT
#define ITKOpenCL_EXPORT
Definition: itkOpenCLExport.h:31
itk::GPUImageToImageFilter::InputImagePixelType
InputImageType::PixelType InputImagePixelType
Definition: itkGPUImageToImageFilter.h:90
itk::GPUImageToImageFilter::InputImageConstPointer
InputImageType::ConstPointer InputImageConstPointer
Definition: itkGPUImageToImageFilter.h:88
itk::GPUImageToImageFilter::InputImageRegionType
InputImageType::RegionType InputImageRegionType
Definition: itkGPUImageToImageFilter.h:89
itk::GPUImageToImageFilter::PrintSelf
virtual void PrintSelf(std::ostream &os, Indent indent) const
itk::GPUImageToImageFilter::GPUImageToImageFilter
GPUImageToImageFilter(const Self &)
itk::GPUImageToImageFilter::m_GPUEnabled
bool m_GPUEnabled
Definition: itkGPUImageToImageFilter.h:127
itk::GPUImageToImageFilter::GPUImageToImageFilter
GPUImageToImageFilter()
itk::GPUImageToImageFilter::m_GPUKernelManager
OpenCLKernelManager::Pointer m_GPUKernelManager
Definition: itkGPUImageToImageFilter.h:120
itk::GPUImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkGPUImageToImageFilter.h:86
itk::GPUImageToImageFilter::OutputImageType
TOutputImage OutputImageType
Definition: itkGPUImageToImageFilter.h:91
itk::GPUImageToImageFilter::operator=
void operator=(const Self &)
itk::GPUImageToImageFilter::itkStaticConstMacro
itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension)
itk::GPUImageToImageFilter::OutputImageRegionType
Superclass::OutputImageRegionType OutputImageRegionType
Definition: itkGPUImageToImageFilter.h:82
itk::GPUImageToImageFilter::~GPUImageToImageFilter
~GPUImageToImageFilter()
Definition: itkGPUImageToImageFilter.h:111
itk::GPUImageToImageFilter::InputImagePointer
InputImageType::Pointer InputImagePointer
Definition: itkGPUImageToImageFilter.h:87
itk::GPUImageToImageFilter::Self
GPUImageToImageFilter Self
Definition: itkGPUImageToImageFilter.h:69
ThreadIdType
itk::GPUImageToImageFilter::GenerateData
virtual void GenerateData()
itk::GPUImageToImageFilter
class to abstract the behaviour of the GPU filters.
Definition: itkGPUImageToImageFilter.h:65
itk::GPUImageToImageFilter::itkStaticConstMacro
itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension)
itk::GPUImageToImageFilter::SetNumberOfThreads
virtual void SetNumberOfThreads(ThreadIdType _arg)
itk
Definition: itkAdvancedImageToImageMetric.h:40
itk::GPUImageToImageFilter::GraftOutput
virtual void GraftOutput(const DataObjectIdentifierType &key, DataObject *graft)
itk::GPUImageToImageFilter::ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkGPUImageToImageFilter.h:72
itk::GPUImageToImageFilter::GPUGenerateData
virtual void GPUGenerateData()
Definition: itkGPUImageToImageFilter.h:117
itk::GPUImageToImageFilter::Superclass
TParentImageFilter Superclass
Definition: itkGPUImageToImageFilter.h:70
itk::GPUImageToImageFilter::DataObjectIdentifierType
Superclass::DataObjectIdentifierType DataObjectIdentifierType
Definition: itkGPUImageToImageFilter.h:78
itk::GPUImageToImageFilter::Pointer
SmartPointer< Self > Pointer
Definition: itkGPUImageToImageFilter.h:71
itk::GPUImageToImageFilter::OutputImagePixelType
Superclass::OutputImagePixelType OutputImagePixelType
Definition: itkGPUImageToImageFilter.h:83


Generated on OURCE_DATE_EPOCH for elastix by doxygen 1.8.18 elastix logo