Medical Imaging Interaction Toolkit
2024.12.00
Medical Imaging Interaction Toolkit
Home
Manual
API Reference
Groups
Namespace List
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
z
Variables
e
f
i
l
m
n
p
r
s
t
Typedefs
a
b
c
d
f
g
i
l
m
n
o
p
q
r
s
t
v
x
Enumerations
Enumerator
a
b
c
d
e
g
h
i
k
l
n
o
p
r
s
t
v
w
z
Class List
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerations
a
b
c
d
e
f
h
i
l
m
n
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Properties
c
m
o
r
s
t
Related Functions
File List
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
m
o
p
q
r
s
t
u
v
Functions
_
e
h
m
o
q
s
u
Variables
Typedefs
Enumerations
Enumerator
Macros
_
a
b
c
d
e
g
i
m
o
p
q
r
s
u
v
Examples
Download
▼
Medical Imaging Interaction Toolkit
►
MITK User Manual
►
Developer Manual
►
MITK Basic Image Processing Mini Apps
Deprecated List
▼
API Reference
►
Groups
►
Namespace List
►
Class List
▼
File List
►
File List
►
File Members
►
Examples
Download
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
mitkSerializerMacros.h
Go to the documentation of this file.
1
/*============================================================================
2
3
The Medical Imaging Interaction Toolkit (MITK)
4
5
Copyright (c) German Cancer Research Center (DKFZ)
6
All rights reserved.
7
8
Use of this source code is governed by a 3-clause BSD license that can be
9
found in the LICENSE file.
10
11
============================================================================*/
12
13
#ifndef mitkSerializerMacros_h
14
#define mitkSerializerMacros_h
15
16
#include <itkObjectFactoryBase.h>
17
#include <itkVersion.h>
18
19
#define MITK_REGISTER_SERIALIZER(classname) \
20
\
21
\
22
namespace mitk \
23
\
24
{ \
25
\
26
class classname##Factory : public ::itk::ObjectFactoryBase \
27
\
28
{ \
29
public: \
30
/* ITK typedefs */
\
31
typedef classname##Factory Self; \
32
typedef itk::ObjectFactoryBase Superclass; \
33
typedef itk::SmartPointer<Self> Pointer; \
34
typedef itk::SmartPointer<const Self> ConstPointer; \
35
\
36
/* Methods from ObjectFactoryBase */
\
37
virtual const char *GetITKSourceVersion() const override { return ITK_SOURCE_VERSION; } \
38
virtual const char *GetDescription() const override { return "Generated factory for " #classname; } \
39
/* Method for class instantiation. */
\
40
itkFactorylessNewMacro(Self); \
41
\
42
/* Run-time type information (and related methods). */
\
43
itkTypeMacro(classname##Factory, itkObjectFactoryBase); \
44
\
45
protected: \
46
classname##Factory() \
47
{ \
48
itk::ObjectFactoryBase::RegisterOverride(#classname, \
49
#classname, \
50
"Generated factory for " #classname, \
51
1, \
52
itk::CreateObjectFunction<classname>::New()); \
53
} \
54
\
55
~classname##Factory() {} \
56
private: \
57
classname##Factory(const Self &);
/* purposely not implemented */
\
58
void operator=(const Self &);
/* purposely not implemented */
\
59
\
60
}; \
61
\
62
class classname##RegistrationMethod \
63
{ \
64
public: \
65
classname##RegistrationMethod() \
66
{ \
67
m_Factory = classname##Factory::New(); \
68
itk::ObjectFactoryBase::RegisterFactory(m_Factory); \
69
} \
70
\
71
~classname##RegistrationMethod() { itk::ObjectFactoryBase::UnRegisterFactory(m_Factory); } \
72
private: \
73
classname##Factory::Pointer m_Factory; \
74
}; \
75
\
76
} \
77
\
78
static mitk::classname##RegistrationMethod somestaticinitializer_##classname;
79
80
#endif
src
MITK
Modules
SceneSerializationBase
include
mitkSerializerMacros.h
Generated on Tue Dec 10 2024 10:35:09 for Medical Imaging Interaction Toolkit by
1.8.17