Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkLookupTableProperty.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 
20 {
22  this->SetLookupTable(lut);
23 }
24 
26  : mitk::BaseProperty(other), m_LookupTable(other.m_LookupTable)
27 {
28 }
29 
31 {
32  this->SetLookupTable(lut);
33 }
34 
35 bool mitk::LookupTableProperty::IsEqual(const BaseProperty &property) const
36 {
37  return *(this->m_LookupTable) == *(static_cast<const Self &>(property).m_LookupTable);
38 }
39 
40 bool mitk::LookupTableProperty::Assign(const BaseProperty &property)
41 {
42  this->m_LookupTable = static_cast<const Self &>(property).m_LookupTable;
43  return true;
44 }
45 
47 {
48  std::stringstream ss;
49  ss << m_LookupTable;
50  return ss.str();
51 }
52 
54 {
55  return m_LookupTable;
56 }
57 
59 {
60  if ((m_LookupTable != aLookupTable) || (*m_LookupTable != *aLookupTable))
61  {
62  m_LookupTable = aLookupTable;
63  Modified();
64  }
65 }
66 
68 {
69  SetLookupTable(value);
70 }
71 
72 itk::LightObject::Pointer mitk::LookupTableProperty::InternalClone() const
73 {
74  itk::LightObject::Pointer result(new Self(*this));
75  result->UnRegister();
76  return result;
77 }
void SetValue(const ValueType &)
itk::SmartPointer< Self > Pointer
DataCollection - Class to facilitate loading/accessing structured data.
void SetLookupTable(const mitk::LookupTable::Pointer aLookupTable)
Abstract base class for properties.
The LookupTableProperty class Property to associate mitk::LookupTable to an mitk::DataNode.
static Pointer New()
virtual std::string GetValueAsString() const override