Medical Imaging Interaction Toolkit
2024.12.99-d991a09f
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
x
Functions
_
e
h
m
o
q
s
u
Variables
Typedefs
Enumerations
Enumerator
Macros
_
a
b
c
d
e
f
g
i
m
o
p
q
r
s
u
v
x
Examples
Download
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
mitkSegmentationTaskListMacros.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 mitkSegmentationTaskListMacros_h
14
#define mitkSegmentationTaskListMacros_h
15
16
#define mitkSegmentationTaskHasValueMacro(name) \
17
bool Has##name() const { \
18
return m_##name.has_value(); \
19
}
20
21
#define mitkSegmentationTaskGetValueMacro(type, name) \
22
type Get##name() const { \
23
if (m_##name.has_value()) return m_##name.value(); \
24
if (m_Defaults != nullptr && m_Defaults->m_##name.has_value()) return m_Defaults->m_##name.value(); \
25
return type(); \
26
}
27
28
#define mitkSegmentationTaskSetValueMacro(type, name) \
29
void Set##name(const type& value) { \
30
m_##name = value; \
31
}
32
33
#define mitkSegmentationTaskValueMacro(type, name) \
34
public: \
35
mitkSegmentationTaskHasValueMacro(name) \
36
mitkSegmentationTaskGetValueMacro(type, name) \
37
mitkSegmentationTaskSetValueMacro(type, name) \
38
private: \
39
std::optional<type> m_##name;
40
41
#define mitkSegmentationTaskListGetValueMacro(type, name) \
42
type Get##name(size_t index) const { \
43
return index < m_Tasks.size() ? m_Tasks[index].Get##name() : type(); \
44
}
45
46
#define mitkSegmentationTaskListHasValueMacro(name) \
47
bool Has##name(size_t index) const { \
48
return index < m_Tasks.size() && (m_Tasks[index].Has##name() || m_Defaults.Has##name()); \
49
}
50
51
#define mitkSegmentationTaskListSetDefaultMacro(type, name) \
52
void SetDefault##name(const type& value) { \
53
m_Defaults.Set##name(value); \
54
}
55
56
#define mitkSegmentationTaskListValueMacro(type, name) \
57
mitkSegmentationTaskListHasValueMacro(name) \
58
mitkSegmentationTaskListGetValueMacro(type, name) \
59
mitkSegmentationTaskListSetDefaultMacro(type, name)
60
61
#endif
src
MITK
Modules
Segmentation
DataManagement
mitkSegmentationTaskListMacros.h
Generated on Sat Mar 15 2025 02:13:19 for Medical Imaging Interaction Toolkit by
1.8.17