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 =========================================================================*/
27 #ifndef vtkVolumeTextureMapper2D_h
28 #define vtkVolumeTextureMapper2D_h
29 
30 #include "vtkRenderingVolumeModule.h" // For export macro
31 #include "vtkVolumeTextureMapper.h"
32 
33 #if !defined(VTK_LEGACY_REMOVE)
34 class VTKRENDERINGVOLUME_EXPORT vtkVolumeTextureMapper2D : public vtkVolumeTextureMapper
35 {
36 public:
38  void PrintSelf( ostream& os, vtkIndent indent) VTK_OVERRIDE;
39 
40  static vtkVolumeTextureMapper2D *New();
41 
43 
50  vtkSetVector2Macro( TargetTextureSize, int );
51  vtkGetVector2Macro( TargetTextureSize, int );
53 
55 
62  vtkSetMacro( MaximumNumberOfPlanes, int );
63  vtkGetMacro( MaximumNumberOfPlanes, int );
65 
67 
73  vtkSetMacro( MaximumStorageSize, int );
74  vtkGetMacro( MaximumStorageSize, int );
76 
82  void Render(vtkRenderer *, vtkVolume *) VTK_OVERRIDE {}
83 
84  virtual void RenderQuads( int vtkNotUsed(count),
85  float *vtkNotUsed(v), float *vtkNotUsed(t),
86  unsigned char *vtkNotUsed(texture),
87  int vtkNotUsed(size)[2],
88  int vtkNotUsed(reverseFlag)) {}
89 
94  int GetInternalSkipFactor() {return this->InternalSkipFactor;};
95 
96  int *GetAxisTextureSize() {return &(this->AxisTextureSize[0][0]);};
97 
98  int GetSaveTextures() {return this->SaveTextures;};
99 
100  unsigned char *GetTexture() {return this->Texture;};
101 
102 protected:
104  ~vtkVolumeTextureMapper2D() VTK_OVERRIDE;
105 
107  {this->InitializeRender( ren, vol, -1 );}
108 
109  void InitializeRender( vtkRenderer *ren, vtkVolume *vol, int majorDirection );
110 
111  void GenerateTexturesAndRenderQuads( vtkRenderer *ren, vtkVolume *vol );
112 
114  int TargetTextureSize[2];
115 
119 
120  unsigned char *Texture;
124 
125  int AxisTextureSize[3][3];
126  void ComputeAxisTextureSize( int axis, int *size );
127 
128  void RenderSavedTexture();
129 
130 private:
131  vtkVolumeTextureMapper2D(const vtkVolumeTextureMapper2D&) VTK_DELETE_FUNCTION;
132  void operator=(const vtkVolumeTextureMapper2D&) VTK_DELETE_FUNCTION;
133 };
134 
135 #endif // VTK_LEGACY_REMOVE
136 #endif
137 
138 
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:44
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int GetInternalSkipFactor()
Made public only for access from the templated method.
record modification and/or execution time
Definition: vtkTimeStamp.h:32
Abstract class for a volume mapper.
abstract specification for renderers
Definition: vtkRenderer.h:57
void InitializeRender(vtkRenderer *ren, vtkVolume *vol)
void InitializeRender(vtkRenderer *ren, vtkVolume *vol)
a simple class to control print indentation
Definition: vtkIndent.h:33
Abstract class for a volume mapper.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void Render(vtkRenderer *, vtkVolume *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
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()