go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkGPUCastImageFilterFactory.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 #ifndef __itkGPUCastImageFilterFactory_h
19 #define __itkGPUCastImageFilterFactory_h
20 
22 #include "itkGPUCastImageFilter.h"
23 
24 namespace itk
25 {
36 template< typename TTypeListIn, typename TTypeListOut, typename NDimensions >
38  public GPUObjectFactoryBase< NDimensions >
39 {
40 public:
41 
45  typedef SmartPointer< const Self > ConstPointer;
46 
48  const char * GetDescription() const { return "A Factory for GPUCastImageFilter"; }
49 
51  itkFactorylessNewMacro( Self );
52 
55 
57  static void RegisterOneFactory();
58 
60  template< typename TTypeIn, typename TTypeOut, unsigned int VImageDimension >
61  void operator()( void )
62  {
63  // Image typedefs
64  typedef Image< TTypeIn, VImageDimension > InputImageType;
65  typedef Image< TTypeOut, VImageDimension > OutputImageType;
66  typedef GPUImage< TTypeIn, VImageDimension > GPUInputImageType;
67  typedef GPUImage< TTypeOut, VImageDimension > GPUOutputImageType;
68 
69  // Override default
70  this->RegisterOverride(
71  typeid( CastImageFilter< InputImageType, OutputImageType > ).name(),
73  "GPU CastImageFilter override default",
74  true,
75  CreateObjectFunction< GPUCastImageFilter< InputImageType, OutputImageType > >::New()
76  );
77 
78  // Override when itkGPUImage is first template argument
79  this->RegisterOverride(
80  typeid( CastImageFilter< GPUInputImageType, OutputImageType > ).name(),
82  "GPU CastImageFilter override GPUImage first",
83  true,
85  );
86 
87  // Override when itkGPUImage is second template argument
88  this->RegisterOverride(
89  typeid( CastImageFilter< InputImageType, GPUOutputImageType > ).name(),
91  "GPU CastImageFilter override GPUImage second",
92  true,
94  );
95 
96  // Override when itkGPUImage is first and second template arguments
97  this->RegisterOverride(
98  typeid( CastImageFilter< GPUInputImageType, GPUOutputImageType > ).name(),
100  "GPU CastImageFilter override GPUImage first and second",
101  true,
103  );
104  }
105 
106 
107 protected:
108 
111 
113  virtual void Register1D();
114 
116  virtual void Register2D();
117 
119  virtual void Register3D();
120 
121 private:
122 
123  GPUCastImageFilterFactory2( const Self & ); // purposely not implemented
124  void operator=( const Self & ); // purposely not implemented
125 
126 };
127 
128 } // end namespace itk
129 
130 #ifndef ITK_MANUAL_INSTANTIATION
131 #include "itkGPUCastImageFilterFactory.hxx"
132 #endif
133 
134 #endif // end #ifndef __itkGPUCastImageFilterFactory_h
GPUObjectFactoryBase< NDimensions > Superclass
GPU version of CastImageFilter.
Templated n-dimensional image class for the GPU.
Definition: itkGPUImage.h:63
Base class for all GPU factory classes.
void operator=(const Self &)
Object Factory implementation for GPUCastImageFilter.


Generated on 04-09-2015 for elastix by doxygen 1.8.9.1 elastix logo