vtkVolume.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00036 #ifndef __vtkVolume_h
00037 #define __vtkVolume_h
00038
00039 #include "vtkProp3D.h"
00040
00041 class vtkRenderer;
00042 class vtkPropCollection;
00043 class vtkVolumeCollection;
00044 class vtkWindow;
00045 class vtkVolumeProperty;
00046 class vtkAbstractVolumeMapper;
00047
00048 class VTK_RENDERING_EXPORT vtkVolume : public vtkProp3D
00049 {
00050 public:
00051 vtkTypeRevisionMacro(vtkVolume,vtkProp3D);
00052 void PrintSelf(ostream& os, vtkIndent indent);
00053
00057 static vtkVolume *New();
00058
00060
00061 void SetMapper(vtkAbstractVolumeMapper *mapper);
00062 vtkGetObjectMacro(Mapper, vtkAbstractVolumeMapper);
00064
00066
00067 void SetProperty(vtkVolumeProperty *property);
00068 vtkVolumeProperty *GetProperty();
00070
00074 void GetVolumes(vtkPropCollection *vc);
00075
00077 void Update();
00078
00080
00082 double *GetBounds();
00083 void GetBounds(double bounds[6]) { this->vtkProp3D::GetBounds( bounds ); };
00084 double GetMinXBound();
00085 double GetMaxXBound();
00086 double GetMinYBound();
00087 double GetMaxYBound();
00088 double GetMinZBound();
00089 double GetMaxZBound();
00091
00093 unsigned long int GetMTime();
00094
00099 unsigned long GetRedrawMTime();
00100
00102 void ShallowCopy(vtkProp *prop);
00103
00104
00110 int RenderTranslucentGeometry(vtkViewport *viewport);
00111
00116 void ReleaseGraphicsResources(vtkWindow *);
00117
00119
00121 float *GetCorrectedScalarOpacityArray(int);
00122 float *GetCorrectedScalarOpacityArray()
00123 {return this->GetCorrectedScalarOpacityArray(0);};
00125
00127
00129 float *GetScalarOpacityArray(int);
00130 float *GetScalarOpacityArray(){return this->GetScalarOpacityArray(0);};
00132
00134
00136 float *GetGradientOpacityArray(int);
00137 float *GetGradientOpacityArray(){return this->GetGradientOpacityArray(0);};
00139
00141
00143 float *GetGrayArray(int);
00144 float *GetGrayArray(){return this->GetGrayArray(0);};
00146
00148
00150 float *GetRGBArray(int);
00151 float *GetRGBArray(){return this->GetRGBArray(0);};
00153
00155
00157 float GetGradientOpacityConstant(int);
00158 float GetGradientOpacityConstant()
00159 {return this->GetGradientOpacityConstant(0);};
00161
00164 float GetArraySize () { return static_cast<float>(this->ArraySize); };
00165
00168 void UpdateTransferFunctions( vtkRenderer *ren );
00169
00171
00173 void UpdateScalarOpacityforSampleSize( vtkRenderer *ren,
00174 float sample_distance );
00176
00177
00178
00179 protected:
00180 vtkVolume();
00181 ~vtkVolume();
00182
00183 vtkAbstractVolumeMapper *Mapper;
00184 vtkVolumeProperty *Property;
00185
00186
00187
00188
00189
00190 float *RGBArray[VTK_MAX_VRCOMP];
00191 vtkTimeStamp RGBArrayMTime[VTK_MAX_VRCOMP];
00192
00193
00194
00195
00196
00197 float *GrayArray[VTK_MAX_VRCOMP];
00198 vtkTimeStamp GrayArrayMTime[VTK_MAX_VRCOMP];
00199
00200
00201
00202
00203
00204 float *ScalarOpacityArray[VTK_MAX_VRCOMP];
00205 vtkTimeStamp ScalarOpacityArrayMTime[VTK_MAX_VRCOMP];
00206
00207
00208
00209
00210
00211 float *CorrectedScalarOpacityArray[VTK_MAX_VRCOMP];
00212 vtkTimeStamp CorrectedScalarOpacityArrayMTime[VTK_MAX_VRCOMP];
00213
00214
00215
00216
00217
00218 float CorrectedStepSize;
00219
00220
00221 int ArraySize;
00222
00223
00224 float GradientOpacityArray[VTK_MAX_VRCOMP][256];
00225 float GradientOpacityConstant[VTK_MAX_VRCOMP];
00226 vtkTimeStamp GradientOpacityArrayMTime[VTK_MAX_VRCOMP];
00227
00228
00229 float ComputeScreenCoverage( vtkViewport *vp );
00230
00231 private:
00232 vtkVolume(const vtkVolume&);
00233 void operator=(const vtkVolume&);
00234 };
00235
00236 #endif
00237