47 #ifndef vtkUnstructuredGridPreIntegration_h
48 #define vtkUnstructuredGridPreIntegration_h
50 #include "vtkRenderingVolumeModule.h"
84 vtkGetMacro(IntegrationTableScalarResolution,
int);
86 vtkGetMacro(IntegrationTableLengthResolution,
int);
93 virtual double GetIntegrationTableScalarShift(
int component = 0);
94 virtual double GetIntegrationTableScalarScale(
int component = 0);
95 virtual double GetIntegrationTableLengthScale();
105 vtkGetMacro(IncrementalPreIntegration,
int);
121 virtual float *GetPreIntegrationTable(
int component = 0);
127 float *GetTableEntry(
double scalar_front,
double scalar_back,
double lenth,
135 float *GetIndexedTableEntry(
int scalar_front_index,
int scalar_back_index,
160 virtual void BuildPreIntegrationTables(
vtkDataArray *scalars);
168 int scalar_front_index,
169 int scalar_back_index,
176 if (scalar_front_index < 0) scalar_front_index = 0;
177 if (scalar_front_index >= this->IntegrationTableScalarResolution)
178 scalar_front_index = this->IntegrationTableScalarResolution - 1;
179 if (scalar_back_index < 0) scalar_back_index = 0;
180 if (scalar_back_index >= this->IntegrationTableScalarResolution)
181 scalar_back_index = this->IntegrationTableScalarResolution - 1;
182 if (length_index < 0) length_index = 0;
183 if (length_index >= this->IntegrationTableLengthResolution)
184 length_index = this->IntegrationTableLengthResolution - 1;
186 return ( this->IntegrationTable[component]
187 + 4*( ( ( length_index*this->IntegrationTableScalarResolution
189 * this->IntegrationTableScalarResolution)
190 + scalar_front_index));
196 int sfi =
static_cast<int>( scalar_front
197 *this->IntegrationTableScalarScale[
component]
198 + this->IntegrationTableScalarShift[
component] + 0.5);
199 int sbi =
static_cast<int>( scalar_back*this->IntegrationTableScalarScale[
component]
200 + this->IntegrationTableScalarShift[
component] + 0.5);
201 int li =
static_cast<int>(length*this->IntegrationTableLengthScale + 0.5);
202 return this->GetIndexedTableEntry(sfi, sbi, li, component);
205 #endif //vtkUnstructuredGridPreIntegration_h
represents a volume (data & properties) in a rendered scene
virtual void Initialize(vtkVolume *volume, vtkDataArray *scalars)=0
Set up the integrator with the given properties and scalars.
vtkUnstructuredGridVolumeRayIntegrator * Integrator
record modification and/or execution time
vtkTimeStamp IntegrationTableBuilt
int IntegrationTableScalarResolution
dynamic, self-adjusting array of double
double * IntegrationTableScalarShift
a superclass for volume ray integration functions
float * GetTableEntry(double scalar_front, double scalar_back, double lenth, int component=0)
Get an entry (RGBA) in one of the pre-integration tables.
double IntegrationTableLengthScale
int IncrementalPreIntegration
a simple class to control print indentation
vtkVolumeProperty * Property
abstract superclass for arrays of numeric data
performs ray integration with pre-integration tables.
float ** IntegrationTable
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
represents the common properties for rendering a volume.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
int IntegrationTableLengthResolution
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
double * IntegrationTableScalarScale
virtual void Integrate(vtkDoubleArray *intersectionLengths, vtkDataArray *nearIntersections, vtkDataArray *farIntersections, float color[4])=0
Given a set of intersections (defined by the three arrays), compute the peicewise integration of the ...