Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
Home
Manual
API Reference
Download
Bugzilla
Groups
Namespace List
Class List
File List
Examples
File List
File Members
mitkEnumerationSubclassesSerializer.cpp
Go to the documentation of this file.
1
/*===================================================================
2
3
The Medical Imaging Interaction Toolkit (MITK)
4
5
Copyright (c) German Cancer Research Center,
6
Division of Medical and Biological Informatics.
7
All rights reserved.
8
9
This software is distributed WITHOUT ANY WARRANTY; without
10
even the implied warranty of MERCHANTABILITY or FITNESS FOR
11
A PARTICULAR PURPOSE.
12
13
See LICENSE.txt or http://www.mitk.org for details.
14
15
===================================================================*/
16
17
#ifndef mitkEnumerationSubclassesSerializer_h_included
18
#define mitkEnumerationSubclassesSerializer_h_included
19
20
#include "
mitkEnumerationPropertySerializer.h
"
21
22
#include "
mitkModalityProperty.h
"
23
#include "
mitkPlaneOrientationProperty.h
"
24
#include "
mitkPointSetShapeProperty.h
"
25
#include "
mitkRenderingModeProperty.h
"
26
#include "
mitkShaderProperty.h
"
27
#include "
mitkVtkInterpolationProperty.h
"
28
#include "
mitkVtkRepresentationProperty.h
"
29
#include "
mitkVtkResliceInterpolationProperty.h
"
30
#include "
mitkVtkScalarModeProperty.h
"
31
#include "
mitkVtkVolumeRenderingProperty.h
"
32
33
#define MITK_REGISTER_ENUM_SUB_SERIALIZER(classname) \
34
\
35
namespace mitk \
36
\
37
{ \
38
\
39
class classname##Serializer \
40
: public EnumerationPropertySerializer\
41
{public : \
42
\
43
mitkClassMacro(classname##Serializer, EnumerationPropertySerializer) itkFactorylessNewMacro(Self) \
44
itkCloneMacro(Self) \
45
\
46
virtual BaseProperty::Pointer Deserialize(TiXmlElement * element) override{if (!element) return NULL; \
47
const char *sa(element->Attribute("value")); \
48
\
49
std::string s(sa ? sa : ""); \
50
classname::Pointer property = classname::New(); \
51
property->SetValue(s); \
52
\
53
return property.GetPointer(); \
54
} \
55
\
56
protected: \
57
classname##Serializer() {} \
58
virtual ~classname##Serializer() {} \
59
\
60
} \
61
; \
62
\
63
} \
64
\
65
MITK_REGISTER_SERIALIZER(classname##Serializer);
66
67
MITK_REGISTER_ENUM_SUB_SERIALIZER
(PlaneOrientationProperty);
68
MITK_REGISTER_ENUM_SUB_SERIALIZER
(ShaderProperty);
69
MITK_REGISTER_ENUM_SUB_SERIALIZER
(VtkInterpolationProperty);
70
MITK_REGISTER_ENUM_SUB_SERIALIZER
(VtkRepresentationProperty);
71
MITK_REGISTER_ENUM_SUB_SERIALIZER
(VtkResliceInterpolationProperty);
72
MITK_REGISTER_ENUM_SUB_SERIALIZER
(VtkScalarModeProperty);
73
MITK_REGISTER_ENUM_SUB_SERIALIZER
(VtkVolumeRenderingProperty);
74
MITK_REGISTER_ENUM_SUB_SERIALIZER
(ModalityProperty);
75
MITK_REGISTER_ENUM_SUB_SERIALIZER
(RenderingModeProperty);
76
MITK_REGISTER_ENUM_SUB_SERIALIZER
(PointSetShapeProperty);
77
78
#endif
mitkVtkRepresentationProperty.h
mitkPlaneOrientationProperty.h
mitkModalityProperty.h
mitkVtkInterpolationProperty.h
mitkVtkVolumeRenderingProperty.h
MITK_REGISTER_ENUM_SUB_SERIALIZER
#define MITK_REGISTER_ENUM_SUB_SERIALIZER(classname)
Definition:
mitkEnumerationSubclassesSerializer.cpp:33
mitkRenderingModeProperty.h
mitkPointSetShapeProperty.h
mitkVtkScalarModeProperty.h
mitkEnumerationPropertySerializer.h
mitkVtkResliceInterpolationProperty.h
mitkShaderProperty.h
git
MITK
Modules
SceneSerializationBase
src
mitkEnumerationSubclassesSerializer.cpp
Generated on Fri Feb 3 2017 20:51:57 for Medical Imaging Interaction Toolkit by
1.8.9.1