|  | VTK
    9.0.1
    | 
 
 
 
Go to the documentation of this file.
   42 #ifndef vtkUnstructuredGridPartialPreIntegration_h 
   43 #define vtkUnstructuredGridPartialPreIntegration_h 
   46 #include "vtkRenderingVolumeModule.h"  
   49 class vtkPartialPreIntegrationTransferFunction;
 
   70   static void IntegrateRay(
double length, 
double intensity_front, 
double attenuation_front,
 
   71     double intensity_back, 
double attenuation_back, 
float color[4]);
 
   72   static void IntegrateRay(
double length, 
const double color_front[3], 
double attenuation_front,
 
   73     const double color_back[3], 
double attenuation_back, 
float color[4]);
 
   83   static float Psi(
float taufD, 
float taubD);
 
   84   static float* GetPsiTable(
int& 
size);
 
   85   static void BuildPsiTable();
 
  103   static float PsiTable[PSI_TABLE_SIZE * PSI_TABLE_SIZE];
 
  114   float gammaf = taufD / (taufD + 1);
 
  115   float gammab = taubD / (taubD + 1);
 
  128   double intensity_front, 
double attenuation_front, 
double intensity_back, 
double attenuation_back,
 
  131   float taufD = 
length * attenuation_front;
 
  132   float taubD = 
length * attenuation_back;
 
  134   float zeta = 
static_cast<float>(exp(-0.5 * (taufD + taubD)));
 
  135   float alpha = 1 - zeta;
 
  138     (1 - 
color[3]) * (intensity_front * (1 - 
Psi) + intensity_back * (
Psi - zeta));
 
  140   color[0] += newintensity;
 
  141   color[1] += newintensity;
 
  142   color[2] += newintensity;
 
  147   const double color_front[3], 
double attenuation_front, 
const double color_back[3],
 
  148   double attenuation_back, 
float color[4])
 
  150   float taufD = 
length * attenuation_front;
 
  151   float taubD = 
length * attenuation_back;
 
  153   float zeta = 
static_cast<float>(exp(-0.5 * (taufD + taubD)));
 
  154   float alpha = 1 - zeta;
 
  156   color[0] += (1 - 
color[3]) * (color_front[0] * (1 - 
Psi) + color_back[0] * (
Psi - zeta));
 
  157   color[1] += (1 - 
color[3]) * (color_front[1] * (1 - 
Psi) + color_back[1] * (
Psi - zeta));
 
  158   color[2] += (1 - 
color[3]) * (color_front[2] * (1 - 
Psi) + color_back[2] * (
Psi - zeta));
 
  162 #endif // vtkUnstructuredGridPartialPreIntegration_h 
  
a superclass for volume ray integration functions
static int Floor(double x)
Rounds a double to the nearest integer not greater than itself.
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 piecewise integration of the ...
represents a volume (data & properties) in a rendered scene
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
record modification and/or execution time
vtkPartialPreIntegrationTransferFunction * TransferFunctions
abstract superclass for arrays of numeric data
vtkVolumeProperty * Property
static float PsiTable[PSI_TABLE_SIZE *PSI_TABLE_SIZE]
vtkTimeStamp TransferFunctionsModified
static float * GetPsiTable(int &size)
a simple class to control print indentation
int NumIndependentComponents
performs piecewise linear ray integration.
static void IntegrateRay(double length, double intensity_front, double attenuation_front, double intensity_back, double attenuation_back, float color[4])
Integrates a single ray segment.
virtual void Initialize(vtkVolume *volume, vtkDataArray *scalars)=0
Set up the integrator with the given properties and scalars.
dynamic, self-adjusting array of double
static float Psi(float taufD, float taubD)
Looks up Psi (as defined by Moreland and Angel, "A Fast High Accuracy Volume Renderer for Unstructure...
represents the common properties for rendering a volume.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.