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 
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:50
int GetInternalSkipFactor()
Made public only for access from the templated method.
record modification and/or execution time
Definition: vtkTimeStamp.h:35
Abstract class for a volume mapper.
abstract specification for renderers
Definition: vtkRenderer.h:63
void InitializeRender(vtkRenderer *ren, vtkVolume *vol)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void InitializeRender(vtkRenderer *ren, vtkVolume *vol)
a simple class to control print indentation
Definition: vtkIndent.h:39
Abstract class for a volume mapper.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
virtual void RenderQuads(int vtkNotUsed(count), float *vtkNotUsed(v), float *vtkNotUsed(t), unsigned char *vtkNotUsed(texture), int vtkNotUsed(size)[2], int vtkNotUsed(reverseFlag))
static vtkAlgorithm * New()
virtual void Render(vtkRenderer *, vtkVolume *)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...