44 #ifndef vtkUnstructuredGridPreIntegration_h 45 #define vtkUnstructuredGridPreIntegration_h 47 #include "vtkRenderingVolumeModule.h" 65 float color[4]) VTK_OVERRIDE;
81 vtkGetMacro(IntegrationTableScalarResolution,
int);
83 vtkGetMacro(IntegrationTableLengthResolution,
int);
90 virtual double GetIntegrationTableScalarShift(
int component = 0);
91 virtual double GetIntegrationTableScalarScale(
int component = 0);
92 virtual double GetIntegrationTableLengthScale();
102 vtkGetMacro(IncrementalPreIntegration,
int);
118 virtual float *GetPreIntegrationTable(
int component = 0);
124 float *GetTableEntry(
double scalar_front,
double scalar_back,
double lenth,
132 float *GetIndexedTableEntry(
int scalar_front_index,
int scalar_back_index,
146 float **IntegrationTable;
147 double *IntegrationTableScalarShift;
148 double *IntegrationTableScalarScale;
149 double IntegrationTableLengthScale;
152 int IntegrationTableScalarResolution;
153 int IntegrationTableLengthResolution;
155 int IncrementalPreIntegration;
157 virtual
void BuildPreIntegrationTables(
vtkDataArray *scalars);
165 int scalar_front_index,
166 int scalar_back_index,
173 if (scalar_front_index < 0) scalar_front_index = 0;
174 if (scalar_front_index >= this->IntegrationTableScalarResolution)
175 scalar_front_index = this->IntegrationTableScalarResolution - 1;
176 if (scalar_back_index < 0) scalar_back_index = 0;
177 if (scalar_back_index >= this->IntegrationTableScalarResolution)
178 scalar_back_index = this->IntegrationTableScalarResolution - 1;
179 if (length_index < 0) length_index = 0;
180 if (length_index >= this->IntegrationTableLengthResolution)
181 length_index = this->IntegrationTableLengthResolution - 1;
183 return ( this->IntegrationTable[component]
184 + 4*( ( ( length_index*this->IntegrationTableScalarResolution
186 * this->IntegrationTableScalarResolution)
187 + scalar_front_index));
193 int sfi =
static_cast<int>( scalar_front
194 *this->IntegrationTableScalarScale[
component]
195 + this->IntegrationTableScalarShift[
component] + 0.5);
196 int sbi =
static_cast<int>( scalar_back*this->IntegrationTableScalarScale[
component]
197 + this->IntegrationTableScalarShift[
component] + 0.5);
198 int li =
static_cast<int>(length*this->IntegrationTableLengthScale + 0.5);
199 return this->GetIndexedTableEntry(sfi, sbi, li, component);
202 #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.
record modification and/or execution time
dynamic, self-adjusting array of double
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.
a simple class to control print indentation
abstract superclass for arrays of numeric data
performs ray integration with pre-integration tables.
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.
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...
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 ...