ITK
5.2.0
Insight Toolkit
ITK
Modules
Filtering
GPUAnisotropicSmoothing
include
itkGPUGradientAnisotropicDiffusionImageFilterFactory.h
Go to the documentation of this file.
1
/*=========================================================================
2
*
3
* Copyright NumFOCUS
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 itkGPUGradientAnisotropicDiffusionImageFilterFactory_h
19
#define itkGPUGradientAnisotropicDiffusionImageFilterFactory_h
20
21
#include "
itkGPUGradientAnisotropicDiffusionImageFilter.h
"
22
23
namespace
itk
24
{
25
32
class
GPUGradientAnisotropicDiffusionImageFilterFactory
:
public
ObjectFactoryBase
33
{
34
public
:
35
ITK_DISALLOW_COPY_AND_MOVE(
GPUGradientAnisotropicDiffusionImageFilterFactory
);
36
37
using
Self
=
GPUGradientAnisotropicDiffusionImageFilterFactory
;
38
using
Superclass
=
ObjectFactoryBase
;
39
using
Pointer
=
SmartPointer<Self>
;
40
using
ConstPointer
=
SmartPointer<const Self>
;
41
43
const
char
*
44
GetITKSourceVersion
()
const override
45
{
46
return
ITK_SOURCE_VERSION
;
47
}
48
const
char
*
49
GetDescription
()
const override
50
{
51
return
"A Factory for GPUGradientAnisotropicDiffusionImageFilter"
;
52
}
54
56
itkFactorylessNewMacro(
Self
);
57
59
itkTypeMacro(
GPUGradientAnisotropicDiffusionImageFilterFactory
,
itk::ObjectFactoryBase
);
60
62
static
void
63
RegisterOneFactory
()
64
{
65
GPUGradientAnisotropicDiffusionImageFilterFactory::Pointer
factory =
66
GPUGradientAnisotropicDiffusionImageFilterFactory::New
();
67
68
itk::ObjectFactoryBase::RegisterFactory
(factory);
69
}
70
71
private
:
72
#define GradientAnisotropicDiffusionImageFilterTypeMacro(ipt, opt, dm) \
73
{ \
74
using InputImageType = itk::Image<ipt, dm>; \
75
using OutputImageType = itk::Image<opt, dm>; \
76
this->RegisterOverride( \
77
typeid(itk::GradientAnisotropicDiffusionImageFilter<InputImageType, OutputImageType>).name(), \
78
typeid(itk::GPUGradientAnisotropicDiffusionImageFilter<InputImageType, OutputImageType>).name(), \
79
"GPU GradientAnisotropicDiffusionImageFilter Override", \
80
true, \
81
itk::CreateObjectFunction<GPUGradientAnisotropicDiffusionImageFilter<InputImageType, OutputImageType>>::New()); \
82
}
83
84
GPUGradientAnisotropicDiffusionImageFilterFactory
()
85
{
86
if
(
IsGPUAvailable
())
87
{
88
GradientAnisotropicDiffusionImageFilterTypeMacro
(
unsigned
char
,
float
, 1);
89
GradientAnisotropicDiffusionImageFilterTypeMacro
(
char
,
float
, 1);
90
GradientAnisotropicDiffusionImageFilterTypeMacro
(
float
,
float
, 1);
91
GradientAnisotropicDiffusionImageFilterTypeMacro
(
int
,
double
, 1);
92
GradientAnisotropicDiffusionImageFilterTypeMacro
(
unsigned
int
,
double
, 1);
93
GradientAnisotropicDiffusionImageFilterTypeMacro
(
double
,
double
, 1);
94
95
GradientAnisotropicDiffusionImageFilterTypeMacro
(
unsigned
char
,
float
, 2);
96
GradientAnisotropicDiffusionImageFilterTypeMacro
(
char
,
float
, 2);
97
GradientAnisotropicDiffusionImageFilterTypeMacro
(
float
,
float
, 2);
98
GradientAnisotropicDiffusionImageFilterTypeMacro
(
int
,
double
, 2);
99
GradientAnisotropicDiffusionImageFilterTypeMacro
(
unsigned
int
,
double
, 2);
100
GradientAnisotropicDiffusionImageFilterTypeMacro
(
double
,
double
, 2);
101
102
GradientAnisotropicDiffusionImageFilterTypeMacro
(
unsigned
char
,
float
, 3);
103
GradientAnisotropicDiffusionImageFilterTypeMacro
(
char
,
float
, 3);
104
GradientAnisotropicDiffusionImageFilterTypeMacro
(
float
,
float
, 3);
105
GradientAnisotropicDiffusionImageFilterTypeMacro
(
int
,
double
, 3);
106
GradientAnisotropicDiffusionImageFilterTypeMacro
(
unsigned
int
,
double
, 3);
107
GradientAnisotropicDiffusionImageFilterTypeMacro
(
double
,
double
, 3);
108
}
109
}
110
};
111
112
}
// namespace itk
113
114
#endif
itk::ObjectFactoryBase
Create instances of classes using an object factory.
Definition:
itkObjectFactoryBase.h:62
itk::GPUGradientAnisotropicDiffusionImageFilterFactory::GetITKSourceVersion
const char * GetITKSourceVersion() const override
Definition:
itkGPUGradientAnisotropicDiffusionImageFilterFactory.h:44
itk::GPUGradientAnisotropicDiffusionImageFilterFactory::RegisterOneFactory
static void RegisterOneFactory()
Definition:
itkGPUGradientAnisotropicDiffusionImageFilterFactory.h:63
itkGPUGradientAnisotropicDiffusionImageFilter.h
itk::SmartPointer< Self >
itk::GPUGradientAnisotropicDiffusionImageFilterFactory::GPUGradientAnisotropicDiffusionImageFilterFactory
GPUGradientAnisotropicDiffusionImageFilterFactory()
Definition:
itkGPUGradientAnisotropicDiffusionImageFilterFactory.h:84
ITK_SOURCE_VERSION
#define ITK_SOURCE_VERSION
Definition:
itkVersion.h:39
itk::LightObject
Light weight base class for most itk classes.
Definition:
itkLightObject.h:59
itk::ObjectFactoryBase::ObjectFactoryBase
ObjectFactoryBase()
itk::GPUGradientAnisotropicDiffusionImageFilterFactory::GetDescription
const char * GetDescription() const override
Definition:
itkGPUGradientAnisotropicDiffusionImageFilterFactory.h:49
itk::GPUGradientAnisotropicDiffusionImageFilterFactory::Self
GPUGradientAnisotropicDiffusionImageFilterFactory Self
Definition:
itkGPUGradientAnisotropicDiffusionImageFilterFactory.h:37
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition:
itkAnnulusOperator.h:24
GradientAnisotropicDiffusionImageFilterTypeMacro
#define GradientAnisotropicDiffusionImageFilterTypeMacro(ipt, opt, dm)
Definition:
itkGPUGradientAnisotropicDiffusionImageFilterFactory.h:72
itk::GPUGradientAnisotropicDiffusionImageFilterFactory
Definition:
itkGPUGradientAnisotropicDiffusionImageFilterFactory.h:32
itk::ObjectFactoryBase::RegisterFactory
static bool RegisterFactory(ObjectFactoryBase *, InsertionPositionEnum where=InsertionPositionEnum::INSERT_AT_BACK, vcl_size_t position=0)
itk::IsGPUAvailable
bool IsGPUAvailable()
itk::GPUGradientAnisotropicDiffusionImageFilterFactory::New
static Pointer New()
Generated on Thu Apr 1 2021 01:45:00 for ITK by
1.8.16