00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00035
#ifndef __vtkVolumeTextureMapper2D_h
00036
#define __vtkVolumeTextureMapper2D_h
00037
00038
#include "vtkVolumeTextureMapper.h"
00039
00040 class VTK_RENDERING_EXPORT vtkVolumeTextureMapper2D :
public vtkVolumeTextureMapper
00041 {
00042
public:
00043 vtkTypeRevisionMacro(vtkVolumeTextureMapper2D,
vtkVolumeTextureMapper);
00044
void PrintSelf( ostream& os,
vtkIndent indent );
00045
00046
static vtkVolumeTextureMapper2D *
New();
00047
00049
00054 vtkSetVector2Macro( TargetTextureSize,
int );
00055 vtkGetVector2Macro( TargetTextureSize,
int );
00057
00059
00064 vtkSetMacro( MaximumNumberOfPlanes,
int );
00065 vtkGetMacro( MaximumNumberOfPlanes,
int );
00067
00069
00073 vtkSetMacro( MaximumStorageSize,
int );
00074 vtkGetMacro( MaximumStorageSize,
int );
00076
00077
00078
00081 virtual void Render(
vtkRenderer *,
vtkVolume *) {};
00082
00083 virtual void RenderQuads(
int vtkNotUsed(count),
00084
float *vtkNotUsed(v),
float *vtkNotUsed(t),
00085
unsigned char *vtkNotUsed(texture),
00086
int vtkNotUsed(size)[2],
00087
int vtkNotUsed(reverseFlag)) {};
00088
00091 int GetInternalSkipFactor() {
return this->InternalSkipFactor;};
00092
00093 int *GetAxisTextureSize() {
return &(this->AxisTextureSize[0][0]);};
00094
00095 int GetSaveTextures() {
return this->SaveTextures;};
00096
00097 unsigned char *GetTexture() {
return this->Texture;};
00098
00099
00100
00101
00102
protected:
00103 vtkVolumeTextureMapper2D();
00104 ~vtkVolumeTextureMapper2D();
00105
00106 void InitializeRender(
vtkRenderer *ren,
vtkVolume *vol )
00107 {this->
InitializeRender( ren, vol, -1 );}
00108
00109
void InitializeRender(
vtkRenderer *ren,
vtkVolume *vol,
int majorDirection );
00110
00111
void GenerateTexturesAndRenderQuads(
vtkRenderer *ren,
vtkVolume *vol );
00112
00113 int MajorDirection;
00114 int TargetTextureSize[2];
00115
00116 int MaximumNumberOfPlanes;
00117 int InternalSkipFactor;
00118 int MaximumStorageSize;
00119
00120 unsigned char *Texture;
00121 int TextureSize;
00122 int SaveTextures;
00123 vtkTimeStamp TextureMTime;
00124
00125 int AxisTextureSize[3][3];
00126
void ComputeAxisTextureSize(
int axis,
int *size );
00127
00128
void RenderSavedTexture();
00129
00130
private:
00131 vtkVolumeTextureMapper2D(
const vtkVolumeTextureMapper2D&);
00132
void operator=(
const vtkVolumeTextureMapper2D&);
00133 };
00134
00135
00136
#endif
00137
00138