Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkGridRepresentationProperty.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 
18 #include <vtkProperty.h>
19 
21 {
24 }
25 
27  : mitk::EnumerationProperty(other)
28 {
29 }
30 
32 {
33  AddRepresentationTypes();
34  if (IsValidEnumerationValue(value))
35  {
36  SetValue(value);
37  }
38  else
39  {
40  SetValue(WIREFRAME);
41  }
42 }
43 
45 {
46  AddRepresentationTypes();
47  if (IsValidEnumerationValue(value))
48  {
49  SetValue(value);
50  }
51  else
52  {
53  SetValue(WIREFRAME);
54  }
55 }
56 
58 {
59  SetValue(POINTS);
60 }
61 
63 {
64  SetValue(WIREFRAME);
65 }
66 
68 {
69  SetValue(SURFACE);
70 }
71 
73 {
74  // SetValue( WIREFRAME_SURFACE );
75 }
76 
78 {
79  AddEnum("Points", POINTS);
80  AddEnum("Wireframe", WIREFRAME);
81  AddEnum("Surface", SURFACE);
82  // AddEnum( "WireframeSurface", WIREFRAME_SURFACE );
83 }
84 
85 bool mitk::GridRepresentationProperty::AddEnum(const std::string &name, const IdType &id)
86 {
87  return Superclass::AddEnum(name, id);
88 }
89 
90 itk::LightObject::Pointer mitk::GridRepresentationProperty::InternalClone() const
91 {
92  itk::LightObject::Pointer result(new Self(*this));
93  result->UnRegister();
94  return result;
95 }
virtual bool SetValue(const std::string &name)
itk::SmartPointer< Self > Pointer
DataCollection - Class to facilitate loading/accessing structured data.
virtual bool AddEnum(const std::string &name, const IdType &id) override