vtkVolume.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00047 #ifndef __vtkVolume_h
00048 #define __vtkVolume_h
00049
00050 #include "vtkProp3D.h"
00051
00052 class vtkRenderer;
00053 class vtkPropCollection;
00054 class vtkVolumeCollection;
00055 class vtkWindow;
00056 class vtkVolumeProperty;
00057 class vtkAbstractVolumeMapper;
00058
00059 class VTK_RENDERING_EXPORT vtkVolume : public vtkProp3D
00060 {
00061 public:
00062 vtkTypeRevisionMacro(vtkVolume,vtkProp3D);
00063 void PrintSelf(ostream& os, vtkIndent indent);
00064
00068 static vtkVolume *New();
00069
00071
00072 void SetMapper(vtkAbstractVolumeMapper *mapper);
00073 vtkGetObjectMacro(Mapper, vtkAbstractVolumeMapper);
00075
00077
00078 void SetProperty(vtkVolumeProperty *property);
00079 vtkVolumeProperty *GetProperty();
00081
00085 void GetVolumes(vtkPropCollection *vc);
00086
00088 void Update();
00089
00091
00093 double *GetBounds();
00094 void GetBounds(double bounds[6]) { this->vtkProp3D::GetBounds( bounds ); };
00095 double GetMinXBound();
00096 double GetMaxXBound();
00097 double GetMinYBound();
00098 double GetMaxYBound();
00099 double GetMinZBound();
00100 double GetMaxZBound();
00102
00104 unsigned long int GetMTime();
00105
00110 unsigned long GetRedrawMTime();
00111
00113 void ShallowCopy(vtkProp *prop);
00114
00115
00121 int RenderTranslucentGeometry(vtkViewport *viewport);
00122
00127 void ReleaseGraphicsResources(vtkWindow *);
00128
00130
00132 float *GetCorrectedScalarOpacityArray(int);
00133 float *GetCorrectedScalarOpacityArray()
00134 {return this->GetCorrectedScalarOpacityArray(0);};
00136
00138
00140 float *GetScalarOpacityArray(int);
00141 float *GetScalarOpacityArray(){return this->GetScalarOpacityArray(0);};
00143
00145
00147 float *GetGradientOpacityArray(int);
00148 float *GetGradientOpacityArray(){return this->GetGradientOpacityArray(0);};
00150
00152
00154 float *GetGrayArray(int);
00155 float *GetGrayArray(){return this->GetGrayArray(0);};
00157
00159
00161 float *GetRGBArray(int);
00162 float *GetRGBArray(){return this->GetRGBArray(0);};
00164
00166
00168 float GetGradientOpacityConstant(int);
00169 float GetGradientOpacityConstant()
00170 {return this->GetGradientOpacityConstant(0);};
00172
00175 float GetArraySize () { return static_cast<float>(this->ArraySize); };
00176
00179 void UpdateTransferFunctions( vtkRenderer *ren );
00180
00182
00184 void UpdateScalarOpacityforSampleSize( vtkRenderer *ren,
00185 float sample_distance );
00187
00188
00189
00190 protected:
00191 vtkVolume();
00192 ~vtkVolume();
00193
00194 vtkAbstractVolumeMapper *Mapper;
00195 vtkVolumeProperty *Property;
00196
00197
00198
00199
00200
00201 float *RGBArray[VTK_MAX_VRCOMP];
00202 vtkTimeStamp RGBArrayMTime[VTK_MAX_VRCOMP];
00203
00204
00205
00206
00207
00208 float *GrayArray[VTK_MAX_VRCOMP];
00209 vtkTimeStamp GrayArrayMTime[VTK_MAX_VRCOMP];
00210
00211
00212
00213
00214
00215 float *ScalarOpacityArray[VTK_MAX_VRCOMP];
00216 vtkTimeStamp ScalarOpacityArrayMTime[VTK_MAX_VRCOMP];
00217
00218
00219
00220
00221
00222 float *CorrectedScalarOpacityArray[VTK_MAX_VRCOMP];
00223 vtkTimeStamp CorrectedScalarOpacityArrayMTime[VTK_MAX_VRCOMP];
00224
00225
00226
00227
00228
00229 float CorrectedStepSize;
00230
00231
00232 int ArraySize;
00233
00234
00235 float GradientOpacityArray[VTK_MAX_VRCOMP][256];
00236 float GradientOpacityConstant[VTK_MAX_VRCOMP];
00237 vtkTimeStamp GradientOpacityArrayMTime[VTK_MAX_VRCOMP];
00238
00239
00240 float ComputeScreenCoverage( vtkViewport *vp );
00241
00242 private:
00243 vtkVolume(const vtkVolume&);
00244 void operator=(const vtkVolume&);
00245 };
00246
00247 #endif
00248