Medical Imaging Interaction Toolkit  2016.11.0
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,
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 
19 
20 
22 {
23  AddTypes();
24  SetValue( 0 );
25 }
26 
27 
29 {
30  AddTypes();
31  if ( IsValidEnumerationValue( value ) )
32  {
33  SetValue( value ) ;
34  }
35  else
36  {
37  SetValue( 0 );
38  }
39 }
40 
42 {
43  AddTypes();
44  if ( IsValidEnumerationValue( value ) )
45  {
46  SetValue( value );
47  }
48  else
49  {
50  SetValue( 0 );
51  }
52 }
53 
55 {
56  AddEnum( "UniColor", static_cast<IdType>( 0 ) );
57  AddEnum( "VectorMagnitude", static_cast<IdType>( 1 ) );
58 }
59 
60 
61 bool mitk::RegVisColorStyleProperty::AddEnum( const std::string& name, const IdType& id )
62 {
63  return Superclass::AddEnum( name, id );
64 }
virtual bool SetValue(const std::string &name)
virtual bool AddEnum(const std::string &name, const IdType &id)