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"
40
41namespace itk
42{
62template< typename TInputImage, typename TOutputImage, typename TParentImageFilter
63 = ImageToImageFilter< TInputImage, TOutputImage > >
64class ITKOpenCL_EXPORT GPUImageToImageFilter : public TParentImageFilter
65{
66public:
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 SetNumberOfWorkUnits( ThreadIdType _arg );
107
108protected:
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
122private:
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
class to abstract the behaviour of the GPU filters.
itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension)
itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension)
void operator=(const Self &)
InputImageType::PixelType InputImagePixelType
OpenCLKernelManager::Pointer m_GPUKernelManager
Superclass::DataObjectIdentifierType DataObjectIdentifierType
InputImageType::RegionType InputImageRegionType
InputImageType::ConstPointer InputImageConstPointer
GPUImageToImageFilter(const Self &)
virtual void GraftOutput(DataObject *graft)
virtual void GenerateData()
virtual void GraftOutput(const DataObjectIdentifierType &key, DataObject *graft)
virtual void PrintSelf(std::ostream &os, Indent indent) const
Superclass::OutputImageRegionType OutputImageRegionType
InputImageType::Pointer InputImagePointer
virtual void SetNumberOfWorkUnits(ThreadIdType _arg)
Superclass::OutputImagePixelType OutputImagePixelType
SmartPointer< const Self > ConstPointer
#define ITKOpenCL_EXPORT


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo