VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkDiscretizableColorTransferFunction.h 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 =========================================================================*/ 00026 #ifndef __vtkDiscretizableColorTransferFunction_h 00027 #define __vtkDiscretizableColorTransferFunction_h 00028 00029 #include "vtkColorTransferFunction.h" 00030 00031 class vtkLookupTable; 00032 class vtkColorTransferFunction; 00033 00034 class VTK_FILTERING_EXPORT vtkDiscretizableColorTransferFunction : public vtkColorTransferFunction 00035 { 00036 public: 00037 static vtkDiscretizableColorTransferFunction* New(); 00038 vtkTypeMacro(vtkDiscretizableColorTransferFunction, vtkColorTransferFunction); 00039 void PrintSelf(ostream& os, vtkIndent indent); 00040 00044 virtual void Build(); 00045 00047 00051 vtkSetMacro(Discretize, int); 00052 vtkGetMacro(Discretize, int); 00053 vtkBooleanMacro(Discretize, int); 00055 00057 00059 virtual void SetUseLogScale(int useLogScale); 00060 vtkGetMacro(UseLogScale, int); 00062 00064 00067 void SetNumberOfValues(vtkIdType number); 00068 vtkGetMacro(NumberOfValues, vtkIdType); 00070 00073 virtual unsigned char *MapValue(double v); 00074 00077 virtual void GetColor(double v, double rgb[3]); 00078 00080 00089 virtual vtkUnsignedCharArray *MapScalars(vtkDataArray *scalars, int colorMode, 00090 int component); 00092 00094 double* GetRGBPoints(); 00095 00100 virtual void SetAlpha(double alpha); 00101 00102 00104 00106 virtual int UsingLogScale() 00107 { return this->UseLogScale; } 00109 00110 protected: 00111 vtkDiscretizableColorTransferFunction(); 00112 ~vtkDiscretizableColorTransferFunction(); 00113 00114 int Discretize; 00115 int UseLogScale; 00116 00117 vtkIdType NumberOfValues; 00118 vtkLookupTable* LookupTable; 00119 00120 vtkTimeStamp BuildTime; 00121 private: 00122 vtkDiscretizableColorTransferFunction(const vtkDiscretizableColorTransferFunction&); // Not implemented. 00123 void operator=(const vtkDiscretizableColorTransferFunction&); // Not implemented. 00124 00125 // Pointer used by GetRGBPoints(). 00126 double* Data; 00127 }; 00128 00129 #endif 00130