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

vtkVolumeTextureMapper2D.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkVolumeTextureMapper2D.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 =========================================================================*/
00031 #ifndef __vtkVolumeTextureMapper2D_h
00032 #define __vtkVolumeTextureMapper2D_h
00033 
00034 #include "vtkVolumeTextureMapper.h"
00035 
00036 class VTK_VOLUMERENDERING_EXPORT vtkVolumeTextureMapper2D : public vtkVolumeTextureMapper
00037 {
00038 public:
00039   vtkTypeRevisionMacro(vtkVolumeTextureMapper2D,vtkVolumeTextureMapper);
00040   void PrintSelf( ostream& os, vtkIndent indent );
00041 
00042   static vtkVolumeTextureMapper2D *New();
00043   
00045 
00050   vtkSetVector2Macro( TargetTextureSize, int );
00051   vtkGetVector2Macro( TargetTextureSize, int );
00053   
00055 
00060   vtkSetMacro( MaximumNumberOfPlanes, int );
00061   vtkGetMacro( MaximumNumberOfPlanes, int );
00063 
00065 
00069   vtkSetMacro( MaximumStorageSize, int );
00070   vtkGetMacro( MaximumStorageSize, int );
00072   
00073 //BTX
00074 
00077   virtual void Render(vtkRenderer *, vtkVolume *) {};
00078 
00079   virtual void RenderQuads( int vtkNotUsed(count),
00080                             float *vtkNotUsed(v), float *vtkNotUsed(t),
00081                             unsigned char *vtkNotUsed(texture),
00082                             int vtkNotUsed(size)[2],
00083                             int vtkNotUsed(reverseFlag)) {};
00084 
00087   int GetInternalSkipFactor() {return this->InternalSkipFactor;};
00088   
00089   int *GetAxisTextureSize() {return &(this->AxisTextureSize[0][0]);};
00090 
00091   int GetSaveTextures() {return this->SaveTextures;};
00092 
00093   unsigned char *GetTexture() {return this->Texture;};
00094   
00095 //ETX
00096 
00097 
00098 protected:
00099   vtkVolumeTextureMapper2D();
00100   ~vtkVolumeTextureMapper2D();
00101 
00102   void InitializeRender( vtkRenderer *ren, vtkVolume *vol )
00103     {this->InitializeRender( ren, vol, -1 );}
00104   
00105   void InitializeRender( vtkRenderer *ren, vtkVolume *vol, int majorDirection );
00106 
00107   void GenerateTexturesAndRenderQuads( vtkRenderer *ren, vtkVolume *vol );
00108 
00109   int  MajorDirection;
00110   int  TargetTextureSize[2];
00111 
00112   int  MaximumNumberOfPlanes;
00113   int  InternalSkipFactor;
00114   int  MaximumStorageSize;
00115   
00116   unsigned char  *Texture;
00117   int             TextureSize;
00118   int             SaveTextures;
00119   vtkTimeStamp    TextureMTime;
00120   
00121   int             AxisTextureSize[3][3];
00122   void            ComputeAxisTextureSize( int axis, int *size );
00123   
00124   void           RenderSavedTexture();
00125   
00126 private:
00127   vtkVolumeTextureMapper2D(const vtkVolumeTextureMapper2D&);  // Not implemented.
00128   void operator=(const vtkVolumeTextureMapper2D&);  // Not implemented.
00129 };
00130 
00131 
00132 #endif
00133 
00134 

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