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 "vtkVolumeTextureMapper.h"
35 
37 {
38 public:
40  void PrintSelf( ostream& os, vtkIndent indent );
41 
42  static vtkVolumeTextureMapper2D *New();
43 
45 
50  vtkSetVector2Macro( TargetTextureSize, int );
51  vtkGetVector2Macro( TargetTextureSize, int );
53 
55 
60  vtkSetMacro( MaximumNumberOfPlanes, int );
61  vtkGetMacro( MaximumNumberOfPlanes, int );
63 
65 
69  vtkSetMacro( MaximumStorageSize, int );
70  vtkGetMacro( MaximumStorageSize, int );
72 
73 //BTX
74 
77  virtual void Render(vtkRenderer *, vtkVolume *) {};
78 
79  virtual void RenderQuads( int vtkNotUsed(count),
80  float *vtkNotUsed(v), float *vtkNotUsed(t),
81  unsigned char *vtkNotUsed(texture),
82  int vtkNotUsed(size)[2],
83  int vtkNotUsed(reverseFlag)) {};
84 
87  int GetInternalSkipFactor() {return this->InternalSkipFactor;};
88 
89  int *GetAxisTextureSize() {return &(this->AxisTextureSize[0][0]);};
90 
91  int GetSaveTextures() {return this->SaveTextures;};
92 
93  unsigned char *GetTexture() {return this->Texture;};
94 
95 //ETX
96 
97 
98 protected:
101 
103  {this->InitializeRender( ren, vol, -1 );}
104 
105  void InitializeRender( vtkRenderer *ren, vtkVolume *vol, int majorDirection );
106 
107  void GenerateTexturesAndRenderQuads( vtkRenderer *ren, vtkVolume *vol );
108 
110  int TargetTextureSize[2];
111 
115 
116  unsigned char *Texture;
120 
121  int AxisTextureSize[3][3];
122  void ComputeAxisTextureSize( int axis, int *size );
123 
124  void RenderSavedTexture();
125 
126 private:
127  vtkVolumeTextureMapper2D(const vtkVolumeTextureMapper2D&); // Not implemented.
128  void operator=(const vtkVolumeTextureMapper2D&); // Not implemented.
129 };
130 
131 
132 #endif
133 
134 
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:48
record modification and/or execution time
Definition: vtkTimeStamp.h:33
#define VTK_VOLUMERENDERING_EXPORT
Abstract class for a volume mapper.
abstract specification for renderers
Definition: vtkRenderer.h:69
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:37
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 *)