VTK
vtkVolumeTextureMapper2D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkVolumeTextureMapper2D.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
33 #ifndef vtkVolumeTextureMapper2D_h
34 #define vtkVolumeTextureMapper2D_h
35 
36 #include "vtkRenderingVolumeModule.h" // For export macro
37 #include "vtkVolumeTextureMapper.h"
38 
39 #if !defined(VTK_LEGACY_REMOVE)
40 class VTKRENDERINGVOLUME_EXPORT vtkVolumeTextureMapper2D : public vtkVolumeTextureMapper
41 {
42 public:
44  void PrintSelf( ostream& os, vtkIndent indent );
45 
46  static vtkVolumeTextureMapper2D *New();
47 
49 
56  vtkSetVector2Macro( TargetTextureSize, int );
57  vtkGetVector2Macro( TargetTextureSize, int );
59 
61 
68  vtkSetMacro( MaximumNumberOfPlanes, int );
69  vtkGetMacro( MaximumNumberOfPlanes, int );
71 
73 
79  vtkSetMacro( MaximumStorageSize, int );
80  vtkGetMacro( MaximumStorageSize, int );
82 
88  virtual void Render(vtkRenderer *, vtkVolume *) {}
89 
90  virtual void RenderQuads( int vtkNotUsed(count),
91  float *vtkNotUsed(v), float *vtkNotUsed(t),
92  unsigned char *vtkNotUsed(texture),
93  int vtkNotUsed(size)[2],
94  int vtkNotUsed(reverseFlag)) {}
95 
100  int GetInternalSkipFactor() {return this->InternalSkipFactor;};
101 
102  int *GetAxisTextureSize() {return &(this->AxisTextureSize[0][0]);};
103 
104  int GetSaveTextures() {return this->SaveTextures;};
105 
106  unsigned char *GetTexture() {return this->Texture;};
107 
108 protected:
111 
113  {this->InitializeRender( ren, vol, -1 );}
114 
115  void InitializeRender( vtkRenderer *ren, vtkVolume *vol, int majorDirection );
116 
117  void GenerateTexturesAndRenderQuads( vtkRenderer *ren, vtkVolume *vol );
118 
120  int TargetTextureSize[2];
121 
125 
126  unsigned char *Texture;
130 
131  int AxisTextureSize[3][3];
132  void ComputeAxisTextureSize( int axis, int *size );
133 
134  void RenderSavedTexture();
135 
136 private:
137  vtkVolumeTextureMapper2D(const vtkVolumeTextureMapper2D&) VTK_DELETE_FUNCTION;
138  void operator=(const vtkVolumeTextureMapper2D&) VTK_DELETE_FUNCTION;
139 };
140 
141 #endif // VTK_LEGACY_REMOVE
142 #endif
143 
144 
vtkVolumeTextureMapper2D::MaximumNumberOfPlanes
int MaximumNumberOfPlanes
Definition: vtkVolumeTextureMapper2D.h:122
vtkVolumeTextureMapper2D::GetTexture
unsigned char * GetTexture()
Definition: vtkVolumeTextureMapper2D.h:106
vtkVolumeTextureMapper2D::TextureSize
int TextureSize
Definition: vtkVolumeTextureMapper2D.h:127
vtkVolume
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:50
vtkVolumeTextureMapper2D::Texture
unsigned char * Texture
Definition: vtkVolumeTextureMapper2D.h:126
vtkVolumeTextureMapper2D::InternalSkipFactor
int InternalSkipFactor
Definition: vtkVolumeTextureMapper2D.h:123
vtkVolumeTextureMapper2D::GetInternalSkipFactor
int GetInternalSkipFactor()
Made public only for access from the templated method.
Definition: vtkVolumeTextureMapper2D.h:100
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:35
vtkVolumeTextureMapper2D::TextureMTime
vtkTimeStamp TextureMTime
Definition: vtkVolumeTextureMapper2D.h:129
vtkVolumeTextureMapper::InitializeRender
void InitializeRender(vtkRenderer *ren, vtkVolume *vol)
vtkVolumeTextureMapper2D::GetAxisTextureSize
int * GetAxisTextureSize()
Definition: vtkVolumeTextureMapper2D.h:102
vtkVolumeTextureMapper2D::MajorDirection
int MajorDirection
Definition: vtkVolumeTextureMapper2D.h:119
vtkVolumeTextureMapper2D::InitializeRender
void InitializeRender(vtkRenderer *ren, vtkVolume *vol)
Definition: vtkVolumeTextureMapper2D.h:112
vtkVolumeTextureMapper2D::Render
virtual void Render(vtkRenderer *, vtkVolume *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
Definition: vtkVolumeTextureMapper2D.h:88
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkVolumeTextureMapper2D
Abstract class for a volume mapper.
Definition: vtkVolumeTextureMapper2D.h:40
vtkX3D::size
@ size
Definition: vtkX3D.h:253
vtkVolumeTextureMapper
Abstract class for a volume mapper.
Definition: vtkVolumeTextureMapper.h:39
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:63
vtkVolumeTextureMapper::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkVolumeTextureMapper2D::RenderQuads
virtual void RenderQuads(int vtkNotUsed(count), float *vtkNotUsed(v), float *vtkNotUsed(t), unsigned char *vtkNotUsed(texture), int vtkNotUsed(size)[2], int vtkNotUsed(reverseFlag))
Definition: vtkVolumeTextureMapper2D.h:90
vtkVolumeTextureMapper2D::MaximumStorageSize
int MaximumStorageSize
Definition: vtkVolumeTextureMapper2D.h:124
vtkVolumeTextureMapper2D::GetSaveTextures
int GetSaveTextures()
Definition: vtkVolumeTextureMapper2D.h:104
vtkVolumeTextureMapper.h
vtkVolumeTextureMapper2D::SaveTextures
int SaveTextures
Definition: vtkVolumeTextureMapper2D.h:128