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 "vtkRenderingVolumeModule.h" // For export macro
30 #include "vtkVolumeMapper.h"
31 
34 class vtkRenderWindow;
35 class vtkRenderer;
36 class vtkVolume;
37 
39 {
40 public:
42  void PrintSelf( ostream& os, vtkIndent indent );
43 
45 
46  virtual void Update();
47  virtual void Update(int port);
49 
51 
52  virtual void SetGradientEstimator( vtkEncodedGradientEstimator *gradest );
53  vtkGetObjectMacro( GradientEstimator, vtkEncodedGradientEstimator );
55 
57 
58  vtkGetObjectMacro( GradientShader, vtkEncodedGradientShader );
60 
61 //BTX
63 
65  float *GetGradientOpacityArray(){return this->GradientOpacityArray;};
66  unsigned char *GetRGBAArray(){return this->RGBAArray;};
67  float *GetRedDiffuseShadingTable(){return this->RedDiffuseShadingTable;};
68  float *GetGreenDiffuseShadingTable(){return this->GreenDiffuseShadingTable;};
69  float *GetBlueDiffuseShadingTable(){return this->BlueDiffuseShadingTable;};
70  float *GetRedSpecularShadingTable(){return this->RedSpecularShadingTable;};
71  float *GetGreenSpecularShadingTable(){return this->GreenSpecularShadingTable;};
72  float *GetBlueSpecularShadingTable(){return this->BlueSpecularShadingTable;};
73  unsigned short *GetEncodedNormals(){return this->EncodedNormals;};
74  unsigned char *GetGradientMagnitudes(){return this->GradientMagnitudes;};
75  vtkGetMacro( Shade, int );
76  vtkGetObjectMacro( RenderWindow, vtkRenderWindow );
77  vtkGetVectorMacro( DataOrigin, double, 3 );
78  vtkGetVectorMacro( DataSpacing, double, 3 );
80 
83  virtual void Render(vtkRenderer *ren, vtkVolume *vol)=0;
84 
86 
88  virtual float GetGradientMagnitudeScale();
89  virtual float GetGradientMagnitudeBias();
90  virtual float GetGradientMagnitudeScale(int)
91  { return this->GetGradientMagnitudeScale(); };
92  virtual float GetGradientMagnitudeBias(int)
93  { return this->GetGradientMagnitudeBias(); };
95 
96 //ETX
97 
98 
99 
100 protected:
103 
104  void InitializeRender( vtkRenderer *ren, vtkVolume *vol );
105 
106  virtual void ReportReferences(vtkGarbageCollector*);
107 
108  // Objects / variables needed for shading / gradient magnitude opacity
111  int Shade;
112 
114  unsigned char *RGBAArray;
117 
124 
125  double DataOrigin[3];
126  double DataSpacing[3];
127 
128  unsigned short *EncodedNormals;
129  unsigned char *GradientMagnitudes;
130 
132 
134 private:
135  vtkVolumeTextureMapper(const vtkVolumeTextureMapper&); // Not implemented.
136  void operator=(const vtkVolumeTextureMapper&); // Not implemented.
137 };
138 
139 
140 #endif
141 
142 
unsigned char * GetGradientMagnitudes()
unsigned short * GetEncodedNormals()
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:49
Abstract class for a volume mapper.
void PrintSelf(ostream &os, vtkIndent indent)
virtual float GetGradientMagnitudeBias(int)
#define VTKRENDERINGVOLUME_EXPORT
Abstract class for a volume mapper.
abstract specification for renderers
Definition: vtkRenderer.h:63
vtkEncodedGradientShader * GradientShader
Detect and break reference loops.
virtual void ReportReferences(vtkGarbageCollector *)
virtual float GetGradientMagnitudeScale()
a simple class to control print indentation
Definition: vtkIndent.h:38
Superclass for gradient estimation.
Compute shading tables for encoded normals.
virtual void Render(vtkRenderer *ren, vtkVolume *vol)=0
virtual void Update()
vtkWeakPointer< vtkRenderWindow > RenderWindow
unsigned char * GetRGBAArray()
create a window for renderers to draw into
virtual float GetGradientMagnitudeScale(int)
vtkEncodedGradientEstimator * GradientEstimator
virtual float GetGradientMagnitudeBias()