00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00050 #ifndef __vtkTexture_h
00051 #define __vtkTexture_h
00052
00053 #include "vtkImageAlgorithm.h"
00054
00055 class vtkImageData;
00056 class vtkScalarsToColors;
00057 class vtkRenderer;
00058 class vtkUnsignedCharArray;
00059 class vtkWindow;
00060 class vtkDataArray;
00061
00062 #define VTK_TEXTURE_QUALITY_DEFAULT 0
00063 #define VTK_TEXTURE_QUALITY_16BIT 16
00064 #define VTK_TEXTURE_QUALITY_32BIT 32
00065
00066 class VTK_RENDERING_EXPORT vtkTexture : public vtkImageAlgorithm
00067 {
00068 public:
00069 static vtkTexture *New();
00070 vtkTypeRevisionMacro(vtkTexture,vtkImageAlgorithm);
00071 void PrintSelf(ostream& os, vtkIndent indent);
00072
00076 virtual void Render(vtkRenderer *ren);
00077
00081 virtual void ReleaseGraphicsResources(vtkWindow *) {};
00082
00086 virtual void Load(vtkRenderer *) {};
00087
00089
00091 vtkGetMacro(Repeat,int);
00092 vtkSetMacro(Repeat,int);
00093 vtkBooleanMacro(Repeat,int);
00095
00097
00098 vtkGetMacro(Interpolate,int);
00099 vtkSetMacro(Interpolate,int);
00100 vtkBooleanMacro(Interpolate,int);
00102
00104
00106 vtkSetMacro(Quality,int);
00107 vtkGetMacro(Quality,int);
00108 void SetQualityToDefault() {this->SetQuality(VTK_TEXTURE_QUALITY_DEFAULT);};
00109 void SetQualityTo16Bit() {this->SetQuality(VTK_TEXTURE_QUALITY_16BIT);};
00110 void SetQualityTo32Bit() {this->SetQuality(VTK_TEXTURE_QUALITY_32BIT);};
00112
00114
00120 vtkGetMacro(MapColorScalarsThroughLookupTable,int);
00121 vtkSetMacro(MapColorScalarsThroughLookupTable,int);
00122 vtkBooleanMacro(MapColorScalarsThroughLookupTable,int);
00124
00125
00128 vtkImageData *GetInput();
00129
00130
00132
00133 void SetLookupTable(vtkScalarsToColors *);
00134 vtkGetObjectMacro(LookupTable,vtkScalarsToColors);
00136
00138
00139 vtkGetObjectMacro(MappedScalars,vtkUnsignedCharArray);
00141
00143 unsigned char *MapScalarsToColors (vtkDataArray *scalars);
00144
00145 protected:
00146 vtkTexture();
00147 ~vtkTexture();
00148
00149 int Repeat;
00150 int Interpolate;
00151 int Quality;
00152 int MapColorScalarsThroughLookupTable;
00153 vtkScalarsToColors *LookupTable;
00154 vtkUnsignedCharArray *MappedScalars;
00155
00156
00157 int SelfAdjustingTableRange;
00158 private:
00159 vtkTexture(const vtkTexture&);
00160 void operator=(const vtkTexture&);
00161 };
00162
00163 #endif