00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00040
#ifndef __vtkVolume_h
00041
#define __vtkVolume_h
00042
00043
#include "vtkProp3D.h"
00044
00045
class vtkRenderer;
00046
class vtkPropCollection;
00047
class vtkVolumeCollection;
00048
class vtkWindow;
00049
class vtkVolumeProperty;
00050
class vtkVolumeMapper;
00051
00052 class VTK_RENDERING_EXPORT vtkVolume :
public vtkProp3D
00053 {
00054
public:
00055 vtkTypeRevisionMacro(vtkVolume,
vtkProp3D);
00056
void PrintSelf(ostream& os,
vtkIndent indent);
00057
00061
static vtkVolume *
New();
00062
00064
00065
void SetMapper(
vtkVolumeMapper *mapper);
00066 vtkGetObjectMacro(Mapper,
vtkVolumeMapper);
00068
00070
00071
void SetProperty(
vtkVolumeProperty *property);
00072
vtkVolumeProperty *GetProperty();
00074
00078
void GetVolumes(
vtkPropCollection *vc);
00079
00081
void Update();
00082
00084
00086
float *
GetBounds();
00087 void GetBounds(
float bounds[6]) { this->
vtkProp3D::GetBounds( bounds ); };
00088
float GetMinXBound();
00089
float GetMaxXBound();
00090
float GetMinYBound();
00091
float GetMaxYBound();
00092
float GetMinZBound();
00093
float GetMaxZBound();
00095
00097
unsigned long int GetMTime();
00098
00103
unsigned long GetRedrawMTime();
00104
00106
void ShallowCopy(
vtkProp *prop);
00107
00108
00114
int RenderTranslucentGeometry(
vtkViewport *viewport);
00115
00120
void ReleaseGraphicsResources(
vtkWindow *);
00121
00123
00125
float *GetCorrectedScalarOpacityArray(
int);
00126 float *GetCorrectedScalarOpacityArray()
00127 {
return this->GetCorrectedScalarOpacityArray(0);};
00129
00131
00133
float *GetScalarOpacityArray(
int);
00134 float *GetScalarOpacityArray(){
return this->GetScalarOpacityArray(0);};
00136
00138
00140
float *GetGradientOpacityArray(
int);
00141 float *GetGradientOpacityArray(){
return this->GetGradientOpacityArray(0);};
00143
00145
00147
float *GetGrayArray(
int);
00148 float *GetGrayArray(){
return this->GetGrayArray(0);};
00150
00152
00154
float *GetRGBArray(
int);
00155 float *GetRGBArray(){
return this->GetRGBArray(0);};
00157
00159
00161
float GetGradientOpacityConstant(
int);
00162 float GetGradientOpacityConstant()
00163 {
return this->GetGradientOpacityConstant(0);};
00165
00168 float GetArraySize () {
return static_cast<float>(this->ArraySize); };
00169
00172
void UpdateTransferFunctions(
vtkRenderer *ren );
00173
00175
00177
void UpdateScalarOpacityforSampleSize(
vtkRenderer *ren,
00178
float sample_distance );
00180
00181
00182
00183
protected:
00184 vtkVolume();
00185 ~vtkVolume();
00186
00187 vtkVolumeMapper *Mapper;
00188 vtkVolumeProperty *Property;
00189
00190
00191
00192
00193
00194 float *RGBArray[
VTK_MAX_VRCOMP];
00195 vtkTimeStamp RGBArrayMTime[
VTK_MAX_VRCOMP];
00196
00197
00198
00199
00200
00201 float *GrayArray[
VTK_MAX_VRCOMP];
00202 vtkTimeStamp GrayArrayMTime[
VTK_MAX_VRCOMP];
00203
00204
00205
00206
00207
00208 float *ScalarOpacityArray[
VTK_MAX_VRCOMP];
00209 vtkTimeStamp ScalarOpacityArrayMTime[
VTK_MAX_VRCOMP];
00210
00211
00212
00213
00214
00215 float *CorrectedScalarOpacityArray[
VTK_MAX_VRCOMP];
00216 vtkTimeStamp CorrectedScalarOpacityArrayMTime[
VTK_MAX_VRCOMP];
00217
00218
00219
00220
00221
00222 float CorrectedStepSize;
00223
00224
00225 int ArraySize;
00226
00227
00228 float GradientOpacityArray[
VTK_MAX_VRCOMP][256];
00229 float GradientOpacityConstant[
VTK_MAX_VRCOMP];
00230 vtkTimeStamp GradientOpacityArrayMTime[
VTK_MAX_VRCOMP];
00231
00232
00233
float ComputeScreenCoverage(
vtkViewport *vp );
00234
00235
private:
00236 vtkVolume(
const vtkVolume&);
00237
void operator=(
const vtkVolume&);
00238 };
00239
00240
#endif
00241