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