Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkWindowLevelLookupTable.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkWindowLevelLookupTable.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00035 #ifndef __vtkWindowLevelLookupTable_h
00036 #define __vtkWindowLevelLookupTable_h
00037 
00038 #include "vtkLookupTable.h"
00039 
00040 class VTK_COMMON_EXPORT vtkWindowLevelLookupTable : public vtkLookupTable
00041 {
00042 public:
00043   static vtkWindowLevelLookupTable *New();
00044   vtkTypeRevisionMacro(vtkWindowLevelLookupTable,vtkLookupTable);
00045   void PrintSelf(ostream& os, vtkIndent indent);
00046 
00049   void Build();
00050 
00052 
00054   void SetWindow(double window) {
00055     if (window < 1e-5) { window = 1e-5; }
00056     this->Window = window;
00057     this->SetTableRange(this->Level - this->Window/2.0,
00058                         this->Level + this->Window/2.0); };
00059   vtkGetMacro(Window,double);
00061 
00063 
00065   void SetLevel(double level) {
00066     this->Level = level;
00067     this->SetTableRange(this->Level - this->Window/2.0,
00068                         this->Level + this->Window/2.0); };
00069   vtkGetMacro(Level,double);
00071 
00073 
00075   void SetInverseVideo(int iv);
00076   vtkGetMacro(InverseVideo,int);
00077   vtkBooleanMacro(InverseVideo,int);
00079 
00081 
00084   vtkSetVector4Macro(MinimumTableValue,double);
00085   vtkGetVector4Macro(MinimumTableValue,double);
00087 
00089 
00092   vtkSetVector4Macro(MaximumTableValue,double);
00093   vtkGetVector4Macro(MaximumTableValue,double);
00095 
00097 
00099   VTK_LEGACY(void SetMinimumColor(int r, int g, int b, int a));
00100   VTK_LEGACY(void SetMinimumColor(const unsigned char rgba[4]));
00101   VTK_LEGACY(void GetMinimumColor(unsigned char rgba[4]));
00102   VTK_LEGACY(unsigned char *GetMinimumColor());
00104 
00106 
00108   VTK_LEGACY(void SetMaximumColor(int r, int g, int b, int a));
00109   VTK_LEGACY(void SetMaximumColor(const unsigned char rgba[4]));
00110   VTK_LEGACY(void GetMaximumColor(unsigned char rgba[4]));
00111   VTK_LEGACY(unsigned char *GetMaximumColor());
00113 
00114 protected:
00115   vtkWindowLevelLookupTable(int sze=256, int ext=256);
00116   ~vtkWindowLevelLookupTable() {};
00117 
00118   double Window;
00119   double Level;
00120   int InverseVideo;
00121   double MaximumTableValue[4];
00122   double MinimumTableValue[4];
00123 private:
00124   vtkWindowLevelLookupTable(const vtkWindowLevelLookupTable&);  // Not implemented.
00125   void operator=(const vtkWindowLevelLookupTable&);  // Not implemented.
00126 };
00127 
00128 #endif
00129 
00130 

Generated on Mon Jan 21 23:07:18 2008 for VTK by  doxygen 1.4.3-20050530