Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkIsoDoseLevelVectorProperty.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_IsoLevelVector(other.m_IsoLevelVector)
28 {
29 }
30 
32 {
33 }
34 
36 {
37 }
38 
39 bool mitk::IsoDoseLevelVectorProperty::IsEqual(const BaseProperty& property) const
40 {
41  return this->m_IsoLevelVector == static_cast<const Self&>(property).m_IsoLevelVector;
42 }
43 
44 bool mitk::IsoDoseLevelVectorProperty::Assign(const BaseProperty& property)
45 {
46  this->m_IsoLevelVector = static_cast<const Self&>(property).m_IsoLevelVector;
47  return true;
48 }
49 
51 {
52  return m_IsoLevelVector;
53 }
54 
56 {
57  return GetIsoDoseLevelVector();
58 }
59 
61 {
62  return m_IsoLevelVector;
63 }
64 
66 {
67  return GetIsoDoseLevelVector();
68 }
69 
70 
72 {
73  if(m_IsoLevelVector != levelVector)
74  {
75  m_IsoLevelVector = levelVector;
76  Modified();
77  }
78 }
79 
81 {
82  SetIsoDoseLevelVector(levelVector);
83 }
84 
86 {
87  std::stringstream myStr;
88 
89  myStr << "IsoDoseLevels: ";
90 
91  if (m_IsoLevelVector.IsNotNull())
92  {
93  myStr << m_IsoLevelVector->Size() << std::endl;
94 
95  for (IsoDoseLevelVector::ConstIterator pos = m_IsoLevelVector->Begin(); pos != m_IsoLevelVector->End(); ++pos)
96  {
97  myStr << " " << 100*(pos->Value()->GetDoseValue()) << "% : ("<<pos->Value()->GetColor()<< "); iso line: " << pos->Value()->GetVisibleIsoLine() << std::endl;
98  }
99  }
100  return myStr.str();
101 }
102 
103 itk::LightObject::Pointer mitk::IsoDoseLevelVectorProperty::InternalClone() const
104 {
105  itk::LightObject::Pointer result(new Self(*this));
106  return result;
107 }
itk::SmartPointer< Self > Pointer
::itk::VectorContainer< unsigned int, mitk::IsoDoseLevel::Pointer > IsoDoseLevelVector
const IsoDoseLevelVector * GetIsoDoseLevelVector() const
virtual std::string GetValueAsString() const override
Abstract base class for properties.
Property class for dose iso level vector.
void SetValue(IsoDoseLevelVector *levelVector)
void SetIsoDoseLevelVector(IsoDoseLevelVector *levelVector)
Simple vector that stores dose iso levels.
const IsoDoseLevelVector * GetValue() const