46 #ifndef vtkUnstructuredGridPreIntegration_h 47 #define vtkUnstructuredGridPreIntegration_h 86 virtual double GetIntegrationTableScalarShift(
int component = 0);
87 virtual double GetIntegrationTableScalarScale(
int component = 0);
88 virtual double GetIntegrationTableLengthScale();
110 virtual float *GetPreIntegrationTable(
int component = 0);
115 float *GetTableEntry(
double scalar_front,
double scalar_back,
double lenth,
123 float *GetIndexedTableEntry(
int scalar_front_index,
int scalar_back_index,
149 virtual void BuildPreIntegrationTables(
vtkDataArray *scalars);
157 int scalar_front_index,
158 int scalar_back_index,
165 if (scalar_front_index < 0) scalar_front_index = 0;
166 if (scalar_front_index >= this->IntegrationTableScalarResolution)
167 scalar_front_index = this->IntegrationTableScalarResolution - 1;
168 if (scalar_back_index < 0) scalar_back_index = 0;
169 if (scalar_back_index >= this->IntegrationTableScalarResolution)
170 scalar_back_index = this->IntegrationTableScalarResolution - 1;
171 if (length_index < 0) length_index = 0;
172 if (length_index >= this->IntegrationTableLengthResolution)
173 length_index = this->IntegrationTableLengthResolution - 1;
175 return ( this->IntegrationTable[component]
176 + 4*( ( ( length_index*this->IntegrationTableScalarResolution
178 * this->IntegrationTableScalarResolution)
179 + scalar_front_index));
185 int sfi =
static_cast<int>( scalar_front
186 *this->IntegrationTableScalarScale[
component]
187 + this->IntegrationTableScalarShift[
component] + 0.5);
188 int sbi =
static_cast<int>( scalar_back*this->IntegrationTableScalarScale[
component]
189 + this->IntegrationTableScalarShift[
component] + 0.5);
190 int li =
static_cast<int>(length*this->IntegrationTableLengthScale + 0.5);
191 return this->GetIndexedTableEntry(sfi, sbi, li, component);
194 #endif //vtkUnstructuredGridPreIntegration_h
represents a volume (data & properties) in a rendered scene
float * GetIndexedTableEntry(int scalar_front_index, int scalar_back_index, int length_index, int component=0)
virtual void Initialize(vtkVolume *volume, vtkDataArray *scalars)=0
#define VTKRENDERINGVOLUME_EXPORT
vtkUnstructuredGridVolumeRayIntegrator * Integrator
#define vtkGetMacro(name, type)
record modification and/or execution time
vtkTimeStamp IntegrationTableBuilt
int IntegrationTableScalarResolution
#define vtkTypeMacro(thisClass, superclass)
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)
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
#define vtkGetObjectMacro(name, type)
represents the common properties for rendering a volume.
virtual void PrintSelf(ostream &os, vtkIndent indent)
#define vtkBooleanMacro(name, type)
int IntegrationTableLengthResolution
double * IntegrationTableScalarScale
virtual void Integrate(vtkDoubleArray *intersectionLengths, vtkDataArray *nearIntersections, vtkDataArray *farIntersections, float color[4])=0
#define vtkSetMacro(name, type)