00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00029 #ifndef __vtkDiscretizableColorTransferFunction_h
00030 #define __vtkDiscretizableColorTransferFunction_h
00031
00032 #include "vtkColorTransferFunction.h"
00033
00034 class vtkLookupTable;
00035 class vtkColorTransferFunction;
00036
00037 class VTK_FILTERING_EXPORT vtkDiscretizableColorTransferFunction : public vtkColorTransferFunction
00038 {
00039 public:
00040 static vtkDiscretizableColorTransferFunction* New();
00041 vtkTypeMacro(vtkDiscretizableColorTransferFunction, vtkColorTransferFunction);
00042 void PrintSelf(ostream& os, vtkIndent indent);
00043
00047 virtual void Build();
00048
00050
00054 vtkSetMacro(Discretize, int);
00055 vtkGetMacro(Discretize, int);
00056 vtkBooleanMacro(Discretize, int);
00058
00060
00062 virtual void SetUseLogScale(int useLogScale);
00063 vtkGetMacro(UseLogScale, int);
00065
00067
00070 void SetNumberOfValues(vtkIdType number);
00071 vtkGetMacro(NumberOfValues, vtkIdType);
00073
00076 virtual unsigned char *MapValue(double v);
00077
00080 virtual void GetColor(double v, double rgb[3]);
00081
00083
00092 virtual vtkUnsignedCharArray *MapScalars(vtkDataArray *scalars, int colorMode,
00093 int component);
00095
00097 double* GetRGBPoints();
00098
00103 virtual void SetAlpha(double alpha);
00104
00105
00107
00110 virtual void SetNanColor(double r, double g, double b);
00111 virtual void SetNanColor(double rgb[3]) {
00112 this->SetNanColor(rgb[0], rgb[1], rgb[2]);
00113 }
00115
00116
00118
00120 virtual int UsingLogScale()
00121 { return this->UseLogScale; }
00123
00125 virtual vtkIdType GetNumberOfAvailableColors();
00126
00127 protected:
00128 vtkDiscretizableColorTransferFunction();
00129 ~vtkDiscretizableColorTransferFunction();
00130
00131 int Discretize;
00132 int UseLogScale;
00133
00134 vtkIdType NumberOfValues;
00135 vtkLookupTable* LookupTable;
00136
00137 vtkTimeStamp BuildTime;
00138 private:
00139 vtkDiscretizableColorTransferFunction(const vtkDiscretizableColorTransferFunction&);
00140 void operator=(const vtkDiscretizableColorTransferFunction&);
00141
00142
00143 double* Data;
00144 };
00145
00146 #endif
00147