VTK
vtkVolumeTextureMapper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkVolumeTextureMapper.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 =========================================================================*/
26 #ifndef __vtkVolumeTextureMapper_h
27 #define __vtkVolumeTextureMapper_h
28 
29 #include "vtkVolumeMapper.h"
30 
33 class vtkRenderWindow;
34 class vtkRenderer;
35 class vtkVolume;
36 
38 {
39 public:
41  void PrintSelf( ostream& os, vtkIndent indent );
42 
44  virtual void Update();
45 
47 
48  virtual void SetGradientEstimator( vtkEncodedGradientEstimator *gradest );
49  vtkGetObjectMacro( GradientEstimator, vtkEncodedGradientEstimator );
51 
53 
54  vtkGetObjectMacro( GradientShader, vtkEncodedGradientShader );
56 
57 //BTX
59 
61  float *GetGradientOpacityArray(){return this->GradientOpacityArray;};
62  unsigned char *GetRGBAArray(){return this->RGBAArray;};
63  float *GetRedDiffuseShadingTable(){return this->RedDiffuseShadingTable;};
64  float *GetGreenDiffuseShadingTable(){return this->GreenDiffuseShadingTable;};
65  float *GetBlueDiffuseShadingTable(){return this->BlueDiffuseShadingTable;};
66  float *GetRedSpecularShadingTable(){return this->RedSpecularShadingTable;};
67  float *GetGreenSpecularShadingTable(){return this->GreenSpecularShadingTable;};
68  float *GetBlueSpecularShadingTable(){return this->BlueSpecularShadingTable;};
69  unsigned short *GetEncodedNormals(){return this->EncodedNormals;};
70  unsigned char *GetGradientMagnitudes(){return this->GradientMagnitudes;};
71  vtkGetMacro( Shade, int );
72  vtkGetObjectMacro( RenderWindow, vtkRenderWindow );
73  vtkGetVectorMacro( DataOrigin, double, 3 );
74  vtkGetVectorMacro( DataSpacing, double, 3 );
76 
79  virtual void Render(vtkRenderer *ren, vtkVolume *vol)=0;
80 
82 
84  virtual float GetGradientMagnitudeScale();
85  virtual float GetGradientMagnitudeBias();
86  virtual float GetGradientMagnitudeScale(int)
87  { return this->GetGradientMagnitudeScale(); };
88  virtual float GetGradientMagnitudeBias(int)
89  { return this->GetGradientMagnitudeBias(); };
91 
92 //ETX
93 
94 
95 
96 protected:
99 
100  void InitializeRender( vtkRenderer *ren, vtkVolume *vol );
101 
102  virtual void ReportReferences(vtkGarbageCollector*);
103 
104  // Objects / variables needed for shading / gradient magnitude opacity
107  int Shade;
108 
110  unsigned char *RGBAArray;
113 
120 
121  double DataOrigin[3];
122  double DataSpacing[3];
123 
124  unsigned short *EncodedNormals;
125  unsigned char *GradientMagnitudes;
126 
128 
130 private:
131  vtkVolumeTextureMapper(const vtkVolumeTextureMapper&); // Not implemented.
132  void operator=(const vtkVolumeTextureMapper&); // Not implemented.
133 };
134 
135 
136 #endif
137 
138 
unsigned char * GetGradientMagnitudes()
unsigned short * GetEncodedNormals()
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:48
Abstract class for a volume mapper.
void PrintSelf(ostream &os, vtkIndent indent)
virtual float GetGradientMagnitudeBias(int)
#define VTK_VOLUMERENDERING_EXPORT
Abstract class for a volume mapper.
abstract specification for renderers
Definition: vtkRenderer.h:69
vtkEncodedGradientShader * GradientShader
Detect and break reference loops.
virtual void ReportReferences(vtkGarbageCollector *)
virtual float GetGradientMagnitudeScale()
a simple class to control print indentation
Definition: vtkIndent.h:37
Superclass for gradient estimation.
Compute shading tables for encoded normals.
virtual void Render(vtkRenderer *ren, vtkVolume *vol)=0
virtual void Update()
unsigned char * GetRGBAArray()
create a window for renderers to draw into
virtual float GetGradientMagnitudeScale(int)
vtkEncodedGradientEstimator * GradientEstimator
virtual float GetGradientMagnitudeBias()