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 #ifndef MITKMITKLABELEDIMAGELOOKUPTABLE_H 00019 #define MITKMITKLABELEDIMAGELOOKUPTABLE_H 00020 00021 #include "mitkLookupTable.h" 00022 #include "MitkExtExports.h" 00023 #include "mitkLevelWindow.h" 00024 #include <iostream> 00025 #include <string> 00026 00027 namespace mitk 00028 { 00029 00039 class MitkExt_EXPORT LabeledImageLookupTable : public LookupTable 00040 { 00041 public: 00045 mitkClassMacro(LabeledImageLookupTable, LookupTable); 00046 00050 itkNewMacro(Self); 00051 00056 typedef unsigned char LabelType; 00057 00066 virtual void SetColorForLabel( const LabelType& label, const vtkFloatingPointType& r, const vtkFloatingPointType& g, const vtkFloatingPointType& b, const vtkFloatingPointType a = 1.0 ); 00067 00074 virtual vtkFloatingPointType* GetColorForLabel(const LabelType& label); 00075 00082 mitk::LevelWindow GetLevelWindow(){return m_LevelWindow;} 00083 00084 protected: 00088 LabeledImageLookupTable(); 00089 00093 virtual ~LabeledImageLookupTable(); 00094 00099 virtual void GenerateRandomColor( vtkFloatingPointType& r, vtkFloatingPointType& g, vtkFloatingPointType& b); 00104 virtual vtkFloatingPointType GenerateRandomNumber(); 00105 00106 00107 mitk::LevelWindow m_LevelWindow; 00108 }; 00109 00110 } 00111 00112 #endif