Medical Imaging Interaction Toolkit  2018.4.99-dcb22cd7
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 (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 
16 {
18  this->SetLookupTable(lut);
19 }
20 
23 {
24 }
25 
27 {
28  this->SetLookupTable(lut);
29 }
30 
31 bool mitk::LookupTableProperty::IsEqual(const BaseProperty &property) const
32 {
33  return *(this->m_LookupTable) == *(static_cast<const Self &>(property).m_LookupTable);
34 }
35 
36 bool mitk::LookupTableProperty::Assign(const BaseProperty &property)
37 {
38  this->m_LookupTable = static_cast<const Self &>(property).m_LookupTable;
39  return true;
40 }
41 
43 {
44  std::stringstream ss;
45  ss << m_LookupTable;
46  return ss.str();
47 }
48 
50 {
51  return m_LookupTable;
52 }
53 
55 {
56  if ((m_LookupTable != aLookupTable) || (*m_LookupTable != *aLookupTable))
57  {
58  m_LookupTable = aLookupTable;
59  Modified();
60  }
61 }
62 
64 {
65  SetLookupTable(value);
66 }
67 
68 itk::LightObject::Pointer mitk::LookupTableProperty::InternalClone() const
69 {
70  itk::LightObject::Pointer result(new Self(*this));
71  result->UnRegister();
72  return result;
73 }
void SetValue(const ValueType &)
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()
std::string GetValueAsString() const override
LookupTable::Pointer m_LookupTable