Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkVtkVolumeRenderingProperty.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 {
22  this->AddRenderingTypes();
23  this->SetValue(static_cast<IdType>(VTK_RAY_CAST_COMPOSITE_FUNCTION));
24 }
25 
27 {
28  this->AddRenderingTypes();
29  if (IsValidEnumerationValue(value))
30  {
31  this->SetValue(value);
32  }
33  else
34  MITK_INFO << "Warning: invalid rendering configuration" << std::endl;
35 }
36 
38 {
39  this->AddRenderingTypes();
40  if (IsValidEnumerationValue(value))
41  {
42  this->SetValue(value);
43  }
44  else
45  MITK_INFO << "Warning: invalid rendering configuration" << std::endl;
46 }
47 
49 {
50  return static_cast<int>(this->GetValueAsId());
51 }
52 
54 {
55  this->SetValue(static_cast<IdType>(VTK_VOLUME_RAY_CAST_MIP_FUNCTION));
56 }
57 
59 {
60  this->SetValue(static_cast<IdType>(VTK_RAY_CAST_COMPOSITE_FUNCTION));
61 }
62 
64 {
65  AddEnum("MIP", static_cast<IdType>(VTK_VOLUME_RAY_CAST_MIP_FUNCTION));
66  AddEnum("COMPOSITE", static_cast<IdType>(VTK_RAY_CAST_COMPOSITE_FUNCTION));
67 }
68 
69 bool mitk::VtkVolumeRenderingProperty::AddEnum(const std::string &name, const IdType &id)
70 {
71  return Superclass::AddEnum(name, id);
72 }
73 
74 itk::LightObject::Pointer mitk::VtkVolumeRenderingProperty::InternalClone() const
75 {
76  itk::LightObject::Pointer result(new Self(*this));
77  result->UnRegister();
78  return result;
79 }
virtual bool SetValue(const std::string &name)
itk::SmartPointer< Self > Pointer
#define MITK_INFO
Definition: mitkLogMacros.h:22
virtual bool AddEnum(const std::string &name, const IdType &id) override
#define VTK_VOLUME_RAY_CAST_MIP_FUNCTION
#define VTK_RAY_CAST_COMPOSITE_FUNCTION