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