Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkRegVisColorStyleProperty.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 "
mitkRegVisColorStyleProperty.h
"
15
16
17
mitk::RegVisColorStyleProperty::RegVisColorStyleProperty
( )
18
{
19
AddTypes
();
20
SetValue
( 0 );
21
}
22
23
24
mitk::RegVisColorStyleProperty::RegVisColorStyleProperty
(
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::RegVisColorStyleProperty::RegVisColorStyleProperty
(
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::RegVisColorStyleProperty::AddTypes
()
51
{
52
AddEnum
(
"UniColor"
, static_cast<IdType>( 0 ) );
53
AddEnum
(
"VectorMagnitude"
, static_cast<IdType>( 1 ) );
54
}
55
56
57
bool
mitk::RegVisColorStyleProperty::AddEnum
(
const
std::string& name,
const
IdType
&
id
)
58
{
59
return
Superclass::AddEnum( name,
id
);
60
}
mitk::EnumerationProperty::SetValue
virtual bool SetValue(const std::string &name)
Definition:
mitkEnumerationProperty.cpp:43
mitkRegVisColorStyleProperty.h
mitk::EnumerationProperty::IdType
unsigned int IdType
Definition:
mitkEnumerationProperty.h:48
mitk::RegVisColorStyleProperty::AddEnum
bool AddEnum(const std::string &name, const IdType &id) override
Definition:
mitkRegVisColorStyleProperty.cpp:57
mitk::RegVisColorStyleProperty::RegVisColorStyleProperty
RegVisColorStyleProperty()
Definition:
mitkRegVisColorStyleProperty.cpp:17
mitk::RegVisColorStyleProperty::AddTypes
void AddTypes()
Definition:
mitkRegVisColorStyleProperty.cpp:50
mitk::EnumerationProperty::IsValidEnumerationValue
virtual bool IsValidEnumerationValue(const IdType &id) const
Definition:
mitkEnumerationProperty.cpp:138
Source
Modules
MatchPointRegistration
Rendering
mitkRegVisColorStyleProperty.cpp
Generated on Thu Mar 12 2020 10:24:02 for Medical Imaging Interaction Toolkit by
1.8.13