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 vtkLookupTable;
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
00127 vtkImageData *GetInput();
00128
00129
00131
00132 void SetLookupTable(vtkLookupTable *);
00133 vtkGetObjectMacro(LookupTable,vtkLookupTable);
00135
00137
00138 vtkGetObjectMacro(MappedScalars,vtkUnsignedCharArray);
00140
00142 unsigned char *MapScalarsToColors (vtkDataArray *scalars);
00143
00144 protected:
00145 vtkTexture();
00146 ~vtkTexture();
00147
00148 int Repeat;
00149 int Interpolate;
00150 int Quality;
00151 int MapColorScalarsThroughLookupTable;
00152 vtkLookupTable *LookupTable;
00153 vtkUnsignedCharArray *MappedScalars;
00154
00155
00156 int SelfAdjustingTableRange;
00157 private:
00158 vtkTexture(const vtkTexture&);
00159 void operator=(const vtkTexture&);
00160 };
00161
00162 #endif