00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision$ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 00019 #include "mitkLookupTableProperty.h" 00020 00021 mitk::LookupTableProperty::LookupTableProperty() 00022 { 00023 } 00024 00025 mitk::LookupTableProperty::LookupTableProperty(const mitk::LookupTable::Pointer lut) 00026 { 00027 this->SetLookupTable(lut); 00028 } 00029 00030 //mitk::LookupTableProperty::LookupTableProperty(const mitk::LookupTable &aLookupTable) 00031 //{ 00032 // SetLookupTable(aLookupTable); 00033 //} 00034 00035 mitk::LookupTableProperty::~LookupTableProperty() 00036 { 00037 } 00038 00039 bool mitk::LookupTableProperty::operator==(const BaseProperty& property) const 00040 { 00041 const Self *other = dynamic_cast<const Self*>(&property); 00042 00043 if(other==NULL) return false; 00044 00045 return *(other->m_LookupTable.GetPointer())==*(m_LookupTable.GetPointer()); 00046 00047 } 00048 00049 void mitk::LookupTableProperty::SetLookupTable(const mitk::LookupTable::Pointer aLookupTable) 00050 { 00051 // MITK_INFO << "setting LUT property ... " << std::endl; 00052 00053 if((m_LookupTable != aLookupTable) || (*m_LookupTable != *aLookupTable)) 00054 { 00055 m_LookupTable = aLookupTable; 00056 Modified(); 00057 } 00058 00059 // MITK_INFO << "setting LUT property OK! " << std::endl; 00060 }