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

dox/Rendering/vtkVolumeTextureMapper.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkVolumeTextureMapper.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 =========================================================================*/ 00030 #ifndef __vtkVolumeTextureMapper_h 00031 #define __vtkVolumeTextureMapper_h 00032 00033 #include "vtkVolumeMapper.h" 00034 00035 class vtkEncodedGradientEstimator; 00036 class vtkEncodedGradientShader; 00037 class vtkRenderWindow; 00038 class vtkRenderer; 00039 class vtkVolume; 00040 00041 class VTK_RENDERING_EXPORT vtkVolumeTextureMapper : public vtkVolumeMapper 00042 { 00043 public: 00044 vtkTypeRevisionMacro(vtkVolumeTextureMapper,vtkVolumeMapper); 00045 void PrintSelf( ostream& os, vtkIndent indent ); 00046 00048 virtual void Update(); 00049 00051 00052 virtual void SetGradientEstimator( vtkEncodedGradientEstimator *gradest ); 00053 vtkGetObjectMacro( GradientEstimator, vtkEncodedGradientEstimator ); 00055 00057 00058 vtkGetObjectMacro( GradientShader, vtkEncodedGradientShader ); 00060 00061 //BTX 00063 00065 float *GetGradientOpacityArray(){return this->GradientOpacityArray;}; 00066 unsigned char *GetRGBAArray(){return this->RGBAArray;}; 00067 float *GetRedDiffuseShadingTable(){return this->RedDiffuseShadingTable;}; 00068 float *GetGreenDiffuseShadingTable(){return this->GreenDiffuseShadingTable;}; 00069 float *GetBlueDiffuseShadingTable(){return this->BlueDiffuseShadingTable;}; 00070 float *GetRedSpecularShadingTable(){return this->RedSpecularShadingTable;}; 00071 float *GetGreenSpecularShadingTable(){return this->GreenSpecularShadingTable;}; 00072 float *GetBlueSpecularShadingTable(){return this->BlueSpecularShadingTable;}; 00073 unsigned short *GetEncodedNormals(){return this->EncodedNormals;}; 00074 unsigned char *GetGradientMagnitudes(){return this->GradientMagnitudes;}; 00075 vtkGetMacro( Shade, int ); 00076 vtkGetObjectMacro( RenderWindow, vtkRenderWindow ); 00077 vtkGetVectorMacro( DataOrigin, float, 3 ); 00078 vtkGetVectorMacro( DataSpacing, float, 3 ); 00080 00083 virtual void Render(vtkRenderer *ren, vtkVolume *vol)=0; 00084 00086 00088 virtual float GetGradientMagnitudeScale(); 00089 virtual float GetGradientMagnitudeBias(); 00090 virtual float GetGradientMagnitudeScale(int) 00091 { return this->GetGradientMagnitudeScale(); }; 00092 virtual float GetGradientMagnitudeBias(int) 00093 { return this->GetGradientMagnitudeBias(); }; 00095 00096 //ETX 00097 00098 00099 00100 protected: 00101 vtkVolumeTextureMapper(); 00102 ~vtkVolumeTextureMapper(); 00103 00104 void InitializeRender( vtkRenderer *ren, vtkVolume *vol ); 00105 00106 // Objects / variables needed for shading / gradient magnitude opacity 00107 vtkEncodedGradientEstimator *GradientEstimator; 00108 vtkEncodedGradientShader *GradientShader; 00109 int Shade; 00110 00111 float *GradientOpacityArray; 00112 unsigned char *RGBAArray; 00113 int ArraySize; 00114 00115 float *RedDiffuseShadingTable; 00116 float *GreenDiffuseShadingTable; 00117 float *BlueDiffuseShadingTable; 00118 float *RedSpecularShadingTable; 00119 float *GreenSpecularShadingTable; 00120 float *BlueSpecularShadingTable; 00121 00122 float DataOrigin[3]; 00123 float DataSpacing[3]; 00124 00125 unsigned short *EncodedNormals; 00126 unsigned char *GradientMagnitudes; 00127 00128 float SampleDistance; 00129 00130 vtkRenderWindow *RenderWindow; 00131 private: 00132 vtkVolumeTextureMapper(const vtkVolumeTextureMapper&); // Not implemented. 00133 void operator=(const vtkVolumeTextureMapper&); // Not implemented. 00134 }; 00135 00136 00137 #endif 00138 00139