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 =========================================================================*/
31 #ifndef vtkVolumeTextureMapper2D_h
32 #define vtkVolumeTextureMapper2D_h
33 
34 #include "vtkRenderingVolumeModule.h" // For export macro
35 #include "vtkVolumeTextureMapper.h"
36 
38 {
39 public:
41  void PrintSelf( ostream& os, vtkIndent indent );
42 
43  static vtkVolumeTextureMapper2D *New();
44 
46 
51  vtkSetVector2Macro( TargetTextureSize, int );
52  vtkGetVector2Macro( TargetTextureSize, int );
54 
56 
61  vtkSetMacro( MaximumNumberOfPlanes, int );
62  vtkGetMacro( MaximumNumberOfPlanes, int );
64 
66 
70  vtkSetMacro( MaximumStorageSize, int );
71  vtkGetMacro( MaximumStorageSize, int );
73 
74 //BTX
75 
78  virtual void Render(vtkRenderer *, vtkVolume *) {}
79 
80  virtual void RenderQuads( int vtkNotUsed(count),
81  float *vtkNotUsed(v), float *vtkNotUsed(t),
82  unsigned char *vtkNotUsed(texture),
83  int vtkNotUsed(size)[2],
84  int vtkNotUsed(reverseFlag)) {}
85 
88  int GetInternalSkipFactor() {return this->InternalSkipFactor;};
89 
90  int *GetAxisTextureSize() {return &(this->AxisTextureSize[0][0]);};
91 
92  int GetSaveTextures() {return this->SaveTextures;};
93 
94  unsigned char *GetTexture() {return this->Texture;};
95 
96 //ETX
97 
98 
99 protected:
102 
104  {this->InitializeRender( ren, vol, -1 );}
105 
106  void InitializeRender( vtkRenderer *ren, vtkVolume *vol, int majorDirection );
107 
108  void GenerateTexturesAndRenderQuads( vtkRenderer *ren, vtkVolume *vol );
109 
111  int TargetTextureSize[2];
112 
116 
117  unsigned char *Texture;
121 
122  int AxisTextureSize[3][3];
123  void ComputeAxisTextureSize( int axis, int *size );
124 
125  void RenderSavedTexture();
126 
127 private:
128  vtkVolumeTextureMapper2D(const vtkVolumeTextureMapper2D&); // Not implemented.
129  void operator=(const vtkVolumeTextureMapper2D&); // Not implemented.
130 };
131 
132 
133 #endif
134 
135 
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:49
#define VTKRENDERINGVOLUME_EXPORT
record modification and/or execution time
Definition: vtkTimeStamp.h:34
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)
void InitializeRender(vtkRenderer *ren, vtkVolume *vol)
a simple class to control print indentation
Definition: vtkIndent.h:38
Abstract class for a volume mapper.
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 *)