• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

dox/VolumeRendering/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 =========================================================================*/
00028 #ifndef __vtkVolumeTextureMapper2D_h
00029 #define __vtkVolumeTextureMapper2D_h
00030 
00031 #include "vtkVolumeTextureMapper.h"
00032 
00033 class VTK_VOLUMERENDERING_EXPORT vtkVolumeTextureMapper2D : public vtkVolumeTextureMapper
00034 {
00035 public:
00036   vtkTypeRevisionMacro(vtkVolumeTextureMapper2D,vtkVolumeTextureMapper);
00037   void PrintSelf( ostream& os, vtkIndent indent );
00038 
00039   static vtkVolumeTextureMapper2D *New();
00040   
00042 
00047   vtkSetVector2Macro( TargetTextureSize, int );
00048   vtkGetVector2Macro( TargetTextureSize, int );
00050   
00052 
00057   vtkSetMacro( MaximumNumberOfPlanes, int );
00058   vtkGetMacro( MaximumNumberOfPlanes, int );
00060 
00062 
00066   vtkSetMacro( MaximumStorageSize, int );
00067   vtkGetMacro( MaximumStorageSize, int );
00069   
00070 //BTX
00071 
00074   virtual void Render(vtkRenderer *, vtkVolume *) {};
00075 
00076   virtual void RenderQuads( int vtkNotUsed(count),
00077                             float *vtkNotUsed(v), float *vtkNotUsed(t),
00078                             unsigned char *vtkNotUsed(texture),
00079                             int vtkNotUsed(size)[2],
00080                             int vtkNotUsed(reverseFlag)) {};
00081 
00084   int GetInternalSkipFactor() {return this->InternalSkipFactor;};
00085   
00086   int *GetAxisTextureSize() {return &(this->AxisTextureSize[0][0]);};
00087 
00088   int GetSaveTextures() {return this->SaveTextures;};
00089 
00090   unsigned char *GetTexture() {return this->Texture;};
00091   
00092 //ETX
00093 
00094 
00095 protected:
00096   vtkVolumeTextureMapper2D();
00097   ~vtkVolumeTextureMapper2D();
00098 
00099   void InitializeRender( vtkRenderer *ren, vtkVolume *vol )
00100     {this->InitializeRender( ren, vol, -1 );}
00101   
00102   void InitializeRender( vtkRenderer *ren, vtkVolume *vol, int majorDirection );
00103 
00104   void GenerateTexturesAndRenderQuads( vtkRenderer *ren, vtkVolume *vol );
00105 
00106   int  MajorDirection;
00107   int  TargetTextureSize[2];
00108 
00109   int  MaximumNumberOfPlanes;
00110   int  InternalSkipFactor;
00111   int  MaximumStorageSize;
00112   
00113   unsigned char  *Texture;
00114   int             TextureSize;
00115   int             SaveTextures;
00116   vtkTimeStamp    TextureMTime;
00117   
00118   int             AxisTextureSize[3][3];
00119   void            ComputeAxisTextureSize( int axis, int *size );
00120   
00121   void           RenderSavedTexture();
00122   
00123 private:
00124   vtkVolumeTextureMapper2D(const vtkVolumeTextureMapper2D&);  // Not implemented.
00125   void operator=(const vtkVolumeTextureMapper2D&);  // Not implemented.
00126 };
00127 
00128 
00129 #endif
00130 
00131 

Generated by  doxygen 1.7.1