ITK  6.0.0
Insight Toolkit
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 * https://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
22
23namespace itk
24{
25
33{
34public:
35 ITK_DISALLOW_COPY_AND_MOVE(GPUGradientAnisotropicDiffusionImageFilterFactory);
36
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 }
56 itkFactorylessNewMacro(Self);
57
60
62 static void
64 {
66
68 }
69
70private:
71#define GradientAnisotropicDiffusionImageFilterTypeMacro(ipt, opt, dm) \
72 { \
73 using InputImageType = itk::Image<ipt, dm>; \
74 using OutputImageType = itk::Image<opt, dm>; \
75 this->RegisterOverride( \
76 typeid(itk::GradientAnisotropicDiffusionImageFilter<InputImageType, OutputImageType>).name(), \
77 typeid(itk::GPUGradientAnisotropicDiffusionImageFilter<InputImageType, OutputImageType>).name(), \
78 "GPU GradientAnisotropicDiffusionImageFilter Override", \
79 true, \
80 itk::CreateObjectFunction<GPUGradientAnisotropicDiffusionImageFilter<InputImageType, OutputImageType>>::New()); \
81 }
82
84 {
85 if (IsGPUAvailable())
86 {
93
100
107 }
108 }
109};
110
111} // namespace itk
112
113#endif
Light weight base class for most itk classes.
Create instances of classes using an object factory.
static bool RegisterFactory(ObjectFactoryBase *, InsertionPositionEnum where=InsertionPositionEnum::INSERT_AT_BACK, vcl_size_t position=0)
#define GradientAnisotropicDiffusionImageFilterTypeMacro(ipt, opt, dm)
#define ITK_SOURCE_VERSION
Definition: itkVersion.h:39
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
bool IsGPUAvailable()