vtkVolumeTextureMapper2D.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00041 #ifndef __vtkVolumeTextureMapper2D_h
00042 #define __vtkVolumeTextureMapper2D_h
00043
00044 #include "vtkVolumeTextureMapper.h"
00045
00046 class VTK_RENDERING_EXPORT vtkVolumeTextureMapper2D : public vtkVolumeTextureMapper
00047 {
00048 public:
00049 vtkTypeRevisionMacro(vtkVolumeTextureMapper2D,vtkVolumeTextureMapper);
00050 void PrintSelf( ostream& os, vtkIndent indent );
00051
00052 static vtkVolumeTextureMapper2D *New();
00053
00055
00060 vtkSetVector2Macro( TargetTextureSize, int );
00061 vtkGetVector2Macro( TargetTextureSize, int );
00063
00065
00070 vtkSetMacro( MaximumNumberOfPlanes, int );
00071 vtkGetMacro( MaximumNumberOfPlanes, int );
00073
00075
00079 vtkSetMacro( MaximumStorageSize, int );
00080 vtkGetMacro( MaximumStorageSize, int );
00082
00083
00084
00087 virtual void Render(vtkRenderer *, vtkVolume *) {};
00088
00089 virtual void RenderQuads( int vtkNotUsed(count),
00090 float *vtkNotUsed(v), float *vtkNotUsed(t),
00091 unsigned char *vtkNotUsed(texture),
00092 int vtkNotUsed(size)[2],
00093 int vtkNotUsed(reverseFlag)) {};
00094
00097 int GetInternalSkipFactor() {return this->InternalSkipFactor;};
00098
00099 int *GetAxisTextureSize() {return &(this->AxisTextureSize[0][0]);};
00100
00101 int GetSaveTextures() {return this->SaveTextures;};
00102
00103 unsigned char *GetTexture() {return this->Texture;};
00104
00105
00106
00107
00108 protected:
00109 vtkVolumeTextureMapper2D();
00110 ~vtkVolumeTextureMapper2D();
00111
00112 void InitializeRender( vtkRenderer *ren, vtkVolume *vol )
00113 {this->InitializeRender( ren, vol, -1 );}
00114
00115 void InitializeRender( vtkRenderer *ren, vtkVolume *vol, int majorDirection );
00116
00117 void GenerateTexturesAndRenderQuads( vtkRenderer *ren, vtkVolume *vol );
00118
00119 int MajorDirection;
00120 int TargetTextureSize[2];
00121
00122 int MaximumNumberOfPlanes;
00123 int InternalSkipFactor;
00124 int MaximumStorageSize;
00125
00126 unsigned char *Texture;
00127 int TextureSize;
00128 int SaveTextures;
00129 vtkTimeStamp TextureMTime;
00130
00131 int AxisTextureSize[3][3];
00132 void ComputeAxisTextureSize( int axis, int *size );
00133
00134 void RenderSavedTexture();
00135
00136 private:
00137 vtkVolumeTextureMapper2D(const vtkVolumeTextureMapper2D&);
00138 void operator=(const vtkVolumeTextureMapper2D&);
00139 };
00140
00141
00142 #endif
00143
00144