Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkIsoDoseLevelSetProperty.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 
17 
19 
20 
22 {
23 }
24 
26  : BaseProperty(other)
27  , m_IsoLevelSet(other.m_IsoLevelSet)
28 {
29 }
30 
32 {
33 }
34 
36 {
37 }
38 
39 bool mitk::IsoDoseLevelSetProperty::IsEqual(const BaseProperty& property) const
40 {
41  return this->m_IsoLevelSet == static_cast<const Self&>(property).m_IsoLevelSet;
42 }
43 
44 bool mitk::IsoDoseLevelSetProperty::Assign(const BaseProperty& property)
45 {
46  this->m_IsoLevelSet = static_cast<const Self&>(property).m_IsoLevelSet;
47  return true;
48 }
49 
51 {
52  return m_IsoLevelSet;
53 }
54 
56 {
57  return GetIsoDoseLevelSet();
58 }
59 
61 {
62  return m_IsoLevelSet;
63 }
64 
66 {
67  return GetIsoDoseLevelSet();
68 }
69 
70 
72 {
73  if(m_IsoLevelSet != levelSet)
74  {
75  m_IsoLevelSet = levelSet;
76  Modified();
77  }
78 }
79 
81 {
82  SetIsoDoseLevelSet(levelSet);
83 }
84 
86 {
87  std::stringstream myStr;
88 
89  myStr << "IsoDoseLevels: ";
90 
91  if (m_IsoLevelSet.IsNotNull())
92  {
93  myStr << m_IsoLevelSet->Size() << std::endl;
94 
95  for (IsoDoseLevelSet::ConstIterator pos = m_IsoLevelSet->Begin(); pos != m_IsoLevelSet->End(); ++pos)
96  {
97  myStr << " " << 100*(pos->GetDoseValue()) << "% : ("<<pos->GetColor()<< "); iso line: " << pos->GetVisibleIsoLine() << "; color wash: "<<pos->GetVisibleColorWash() << std::endl;
98  }
99  }
100  return myStr.str();
101 }
102 
103 itk::LightObject::Pointer mitk::IsoDoseLevelSetProperty::InternalClone() const
104 {
105  itk::LightObject::Pointer result(new Self(*this));
106  return result;
107 }
itk::SmartPointer< Self > Pointer
Stores values needed for the representation/visualization of dose iso levels.
const IsoDoseLevelSet * GetValue() const
void SetValue(IsoDoseLevelSet *levelSet)
Property class for dose iso level sets.
virtual std::string GetValueAsString() const override
Abstract base class for properties.
void SetIsoDoseLevelSet(IsoDoseLevelSet *levelSet)
const IsoDoseLevelSet * GetIsoDoseLevelSet() const