Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
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 (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 
14 #include <vtkProperty.h>
15 
17 {
20 }
21 
23  : mitk::EnumerationProperty(other)
24 {
25 }
26 
28 {
30  if (IsValidEnumerationValue(value))
31  {
32  SetValue(value);
33  }
34  else
35  {
37  }
38 }
39 
41 {
43  if (IsValidEnumerationValue(value))
44  {
45  SetValue(value);
46  }
47  else
48  {
50  }
51 }
52 
54 {
56 }
57 
59 {
61 }
62 
64 {
66 }
67 
69 {
70  // SetValue( WIREFRAME_SURFACE );
71 }
72 
74 {
75  AddEnum("Points", POINTS);
76  AddEnum("Wireframe", WIREFRAME);
77  AddEnum("Surface", SURFACE);
78  // AddEnum( "WireframeSurface", WIREFRAME_SURFACE );
79 }
80 
81 bool mitk::GridRepresentationProperty::AddEnum(const std::string &name, const IdType &id)
82 {
83  return Superclass::AddEnum(name, id);
84 }
85 
86 itk::LightObject::Pointer mitk::GridRepresentationProperty::InternalClone() const
87 {
88  itk::LightObject::Pointer result(new Self(*this));
89  result->UnRegister();
90  return result;
91 }
virtual bool SetValue(const std::string &name)
DataCollection - Class to facilitate loading/accessing structured data.
bool AddEnum(const std::string &name, const IdType &id) override
virtual bool IsValidEnumerationValue(const IdType &id) const