Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
Medical Imaging Interaction Toolkit
mitkGridVolumeMapperProperty.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 {
19  SetValue(PT);
20 }
21 
23 {
25  if (IsValidEnumerationValue(value))
26  {
27  SetValue(value);
28  }
29  else
30  {
31  SetValue(PT);
32  }
33 }
34 
36 {
38  if (IsValidEnumerationValue(value))
39  {
40  SetValue(value);
41  }
42  else
43  {
44  SetValue(PT);
45  }
46 }
47 
49 {
50  SetValue(PT);
51 }
52 
54 {
56 }
57 
59 {
61 }
62 
64 {
65  AddEnum("Ray Cast", RAYCAST);
66  AddEnum("Projected Tetrahedra", PT);
67  AddEnum("ZSweep", ZSWEEP);
68 }
69 
70 bool mitk::GridVolumeMapperProperty::AddEnum(const std::string &name, const IdType &id)
71 {
72  return Superclass::AddEnum(name, id);
73 }
74 
75 itk::LightObject::Pointer mitk::GridVolumeMapperProperty::InternalClone() const
76 {
77  itk::LightObject::Pointer result(new Self(*this));
78  result->UnRegister();
79  return result;
80 }
virtual bool SetValue(const std::string &name)
bool AddEnum(const std::string &name, const IdType &id) override
virtual bool IsValidEnumerationValue(const IdType &id) const