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

vtkTexture.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkTexture.h,v $
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 =========================================================================*/
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 //BTX
00127   vtkImageData *GetInput();
00128 //ETX
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   // this is to duplicated the previous behavior of SelfCreatedLookUpTable
00156   int SelfAdjustingTableRange;
00157 private:
00158   vtkTexture(const vtkTexture&);  // Not implemented.
00159   void operator=(const vtkTexture&);  // Not implemented.
00160 };
00161 
00162 #endif

Generated on Mon Jan 21 23:07:36 2008 for VTK by  doxygen 1.4.3-20050530