Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkRegVisStyleProperty.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 (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
14
#include "
mitkRegVisStyleProperty.h
"
15
16
17
mitk::RegVisStyleProperty::RegVisStyleProperty
( )
18
{
19
AddTypes
();
20
SetValue
( 0 );
21
}
22
23
24
mitk::RegVisStyleProperty::RegVisStyleProperty
(
const
IdType
& value )
25
{
26
AddTypes
();
27
if
(
IsValidEnumerationValue
( value ) )
28
{
29
SetValue
( value ) ;
30
}
31
else
32
{
33
SetValue
( 0 );
34
}
35
}
36
37
mitk::RegVisStyleProperty::RegVisStyleProperty
(
const
std::string& value )
38
{
39
AddTypes
();
40
if
(
IsValidEnumerationValue
( value ) )
41
{
42
SetValue
( value );
43
}
44
else
45
{
46
SetValue
( 0 );
47
}
48
}
49
50
void
mitk::RegVisStyleProperty::AddTypes
()
51
{
52
AddEnum
(
"Grid"
, static_cast<IdType>( 0 ) );
53
AddEnum
(
"Glyph"
, static_cast<IdType>( 1 ) );
54
AddEnum
(
"Points"
, static_cast<IdType>( 2 ) );
55
}
56
57
58
bool
mitk::RegVisStyleProperty::AddEnum
(
const
std::string& name,
const
IdType
&
id
)
59
{
60
return
Superclass::AddEnum( name,
id
);
61
}
mitk::EnumerationProperty::SetValue
virtual bool SetValue(const std::string &name)
Definition:
mitkEnumerationProperty.cpp:43
mitk::RegVisStyleProperty::AddTypes
void AddTypes()
Definition:
mitkRegVisStyleProperty.cpp:50
mitk::EnumerationProperty::IdType
unsigned int IdType
Definition:
mitkEnumerationProperty.h:48
mitk::RegVisStyleProperty::RegVisStyleProperty
RegVisStyleProperty()
Definition:
mitkRegVisStyleProperty.cpp:17
mitkRegVisStyleProperty.h
mitk::RegVisStyleProperty::AddEnum
bool AddEnum(const std::string &name, const IdType &id) override
Definition:
mitkRegVisStyleProperty.cpp:58
mitk::EnumerationProperty::IsValidEnumerationValue
virtual bool IsValidEnumerationValue(const IdType &id) const
Definition:
mitkEnumerationProperty.cpp:138
Source
Modules
MatchPointRegistration
Rendering
mitkRegVisStyleProperty.cpp
Generated on Thu Mar 12 2020 10:24:02 for Medical Imaging Interaction Toolkit by
1.8.13