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

dox/Rendering/vtkTexture.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkTexture.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00054 #ifndef __vtkTexture_h 00055 #define __vtkTexture_h 00056 00057 #include "vtkProcessObject.h" 00058 00059 class vtkImageData; 00060 class vtkLookupTable; 00061 class vtkRenderer; 00062 class vtkUnsignedCharArray; 00063 class vtkWindow; 00064 class vtkDataArray; 00065 00066 #define VTK_TEXTURE_QUALITY_DEFAULT 0 00067 #define VTK_TEXTURE_QUALITY_16BIT 16 00068 #define VTK_TEXTURE_QUALITY_32BIT 32 00069 00070 class VTK_RENDERING_EXPORT vtkTexture : public vtkProcessObject 00071 { 00072 public: 00073 static vtkTexture *New(); 00074 vtkTypeRevisionMacro(vtkTexture,vtkProcessObject); 00075 void PrintSelf(ostream& os, vtkIndent indent); 00076 00080 virtual void Render(vtkRenderer *ren); 00081 00085 virtual void ReleaseGraphicsResources(vtkWindow *) {}; 00086 00090 virtual void Load(vtkRenderer *) {}; 00091 00093 00095 vtkGetMacro(Repeat,int); 00096 vtkSetMacro(Repeat,int); 00097 vtkBooleanMacro(Repeat,int); 00099 00101 00102 vtkGetMacro(Interpolate,int); 00103 vtkSetMacro(Interpolate,int); 00104 vtkBooleanMacro(Interpolate,int); 00106 00108 00110 vtkSetMacro(Quality,int); 00111 vtkGetMacro(Quality,int); 00112 void SetQualityToDefault() {this->SetQuality(VTK_TEXTURE_QUALITY_DEFAULT);}; 00113 void SetQualityTo16Bit() {this->SetQuality(VTK_TEXTURE_QUALITY_16BIT);}; 00114 void SetQualityTo32Bit() {this->SetQuality(VTK_TEXTURE_QUALITY_32BIT);}; 00116 00118 00124 vtkGetMacro(MapColorScalarsThroughLookupTable,int); 00125 vtkSetMacro(MapColorScalarsThroughLookupTable,int); 00126 vtkBooleanMacro(MapColorScalarsThroughLookupTable,int); 00128 00130 00131 void SetInput( vtkImageData *input ); 00132 vtkImageData *GetInput(); 00134 00136 00137 void SetLookupTable(vtkLookupTable *); 00138 vtkGetObjectMacro(LookupTable,vtkLookupTable); 00140 00142 00143 vtkGetObjectMacro(MappedScalars,vtkUnsignedCharArray); 00145 00147 unsigned char *MapScalarsToColors (vtkDataArray *scalars); 00148 00149 protected: 00150 vtkTexture(); 00151 ~vtkTexture(); 00152 00153 int Repeat; 00154 int Interpolate; 00155 int Quality; 00156 int MapColorScalarsThroughLookupTable; 00157 vtkLookupTable *LookupTable; 00158 vtkUnsignedCharArray *MappedScalars; 00159 00160 // this is to duplicated the previous behavior of SelfCreatedLookUpTable 00161 int SelfAdjustingTableRange; 00162 private: 00163 vtkTexture(const vtkTexture&); // Not implemented. 00164 void operator=(const vtkTexture&); // Not implemented. 00165 }; 00166 00167 #endif