Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Rendering/vtkVolumeTextureMapper2D.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkVolumeTextureMapper2D.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00045 #ifndef __vtkVolumeTextureMapper2D_h
    00046 #define __vtkVolumeTextureMapper2D_h
    00047
    00048 #include "vtkVolumeTextureMapper.h"
    00049
    00050 class VTK_RENDERING_EXPORT vtkVolumeTextureMapper2D : public vtkVolumeTextureMapper
    00051 {
    00052 public:
    00053   vtkTypeRevisionMacro(vtkVolumeTextureMapper2D,vtkVolumeTextureMapper);
    00054   void PrintSelf( ostream& os, vtkIndent indent );
    00055
    00056   static vtkVolumeTextureMapper2D *New();
    00057
    00059
    00064   vtkSetVector2Macro( TargetTextureSize, int );
    00065   vtkGetVector2Macro( TargetTextureSize, int );
    00067
    00069
    00074   vtkSetMacro( MaximumNumberOfPlanes, int );
    00075   vtkGetMacro( MaximumNumberOfPlanes, int );
    00077
    00079
    00083   vtkSetMacro( MaximumStorageSize, int );
    00084   vtkGetMacro( MaximumStorageSize, int );
    00086
    00087 //BTX
    00088
    00091   virtual void Render(vtkRenderer *, vtkVolume *) {};
    00092
    00093   virtual void RenderQuads( int vtkNotUsed(count),
    00094                             float *vtkNotUsed(v), float *vtkNotUsed(t),
    00095                             unsigned char *vtkNotUsed(texture),
    00096                             int vtkNotUsed(size)[2],
    00097                             int vtkNotUsed(reverseFlag)) {};
    00098
    00101   int GetInternalSkipFactor() {return this->InternalSkipFactor;};
    00102
    00103   int *GetAxisTextureSize() {return &(this->AxisTextureSize[0][0]);};
    00104
    00105   int GetSaveTextures() {return this->SaveTextures;};
    00106
    00107   unsigned char *GetTexture() {return this->Texture;};
    00108
    00109 //ETX
    00110
    00111
    00112 protected:
    00113   vtkVolumeTextureMapper2D();
    00114   ~vtkVolumeTextureMapper2D();
    00115
    00116   void InitializeRender( vtkRenderer *ren, vtkVolume *vol )
    00117     {this->InitializeRender( ren, vol, -1 );}
    00118
    00119   void InitializeRender( vtkRenderer *ren, vtkVolume *vol, int majorDirection );
    00120
    00121   void GenerateTexturesAndRenderQuads( vtkRenderer *ren, vtkVolume *vol );
    00122
    00123   int  MajorDirection;
    00124   int  TargetTextureSize[2];
    00125
    00126   int  MaximumNumberOfPlanes;
    00127   int  InternalSkipFactor;
    00128   int  MaximumStorageSize;
    00129
    00130   unsigned char  *Texture;
    00131   int             TextureSize;
    00132   int             SaveTextures;
    00133   vtkTimeStamp    TextureMTime;
    00134
    00135   int             AxisTextureSize[3][3];
    00136   void            ComputeAxisTextureSize( int axis, int *size );
    00137
    00138   void           RenderSavedTexture();
    00139
    00140 private:
    00141   vtkVolumeTextureMapper2D(const vtkVolumeTextureMapper2D&);  // Not implemented.
    00142   void operator=(const vtkVolumeTextureMapper2D&);  // Not implemented.
    00143 };
    00144
    00145
    00146 #endif
    00147
    00148