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=========================================================================*/
27#ifndef vtkVolumeTextureMapper_h
28#define vtkVolumeTextureMapper_h
29
30#include "vtkRenderingVolumeModule.h" // For export macro
31#include "vtkVolumeMapper.h"
32
35class vtkRenderWindow;
36class vtkRenderer;
37class vtkVolume;
38
39class VTKRENDERINGVOLUME_EXPORT vtkVolumeTextureMapper : public vtkVolumeMapper
40{
41public:
43 void PrintSelf( ostream& os, vtkIndent indent );
44
46
50 vtkGetObjectMacro( GradientEstimator, vtkEncodedGradientEstimator );
52
54
57 vtkGetObjectMacro( GradientShader, vtkEncodedGradientShader );
59
61
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
86 virtual void Render(vtkRenderer *ren, vtkVolume *vol)=0;
87
89
94 virtual float GetGradientMagnitudeBias();
95 virtual float GetGradientMagnitudeScale(int)
96 { return this->GetGradientMagnitudeScale(); };
97 virtual float GetGradientMagnitudeBias(int)
98 { return this->GetGradientMagnitudeBias(); };
100
107
108protected:
111
113
115
116 // Objects / variables needed for shading / gradient magnitude opacity
119 int Shade;
120
122 unsigned char *RGBAArray;
125
132
133 double DataOrigin[3];
134 double DataSpacing[3];
135
136 unsigned short *EncodedNormals;
137 unsigned char *GradientMagnitudes;
138
140
142private:
143 vtkVolumeTextureMapper(const vtkVolumeTextureMapper&) VTK_DELETE_FUNCTION;
144 void operator=(const vtkVolumeTextureMapper&) VTK_DELETE_FUNCTION;
145};
146
147
148#endif
149
150
virtual float GetGradientMagnitudeScale()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE.
virtual float GetGradientMagnitudeBias()
Superclass for gradient estimation.
Compute shading tables for encoded normals.
Detect and break reference loops.
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
create a window for renderers to draw into
abstract specification for renderers
Definition: vtkRenderer.h:64
Abstract class for a volume mapper.
Abstract class for a volume mapper.
virtual int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
see vtkAlgorithm for details
virtual float GetGradientMagnitudeScale()
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Values needed by the volume.
unsigned short * GetEncodedNormals()
vtkEncodedGradientShader * GradientShader
void InitializeRender(vtkRenderer *ren, vtkVolume *vol)
void ReportReferences(vtkGarbageCollector *) override
virtual float GetGradientMagnitudeScale(int)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual void Render(vtkRenderer *ren, vtkVolume *vol)=0
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
float * GetGradientOpacityArray()
Allow access to the arrays / variables from the templated functions in the subclasses.
vtkEncodedGradientEstimator * GradientEstimator
virtual float GetGradientMagnitudeBias(int)
virtual void SetGradientEstimator(vtkEncodedGradientEstimator *gradest)
Set / Get the gradient estimator used to estimate normals.
unsigned char * GetRGBAArray()
unsigned char * GetGradientMagnitudes()
virtual float GetGradientMagnitudeBias()
represents a volume (data & properties) in a rendered scene
Definition: vtkVolume.h:51