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

vtkVolumeTextureMapper.h

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

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