VTK  9.7.20261123
vtkWebGPUVolumeTest Namespace Reference

Shared scaffolding for the WebGPU volume tests: it pins the rendering backend, builds the transfer functions the tests reuse, and reads frames back so a test can assert something about what was drawn without needing a baseline image. More...

Classes

struct  Frame
 A frame, as RGB triples ordered row by row. More...

Functions

bool CheckClass (vtkObject *object, const char *expected)
 Fail loudly when the factory handed back something other than the class under test, rather than quietly passing while exercising a different backend.
Frame Capture (vtkRenderWindow *window)
int LargestDifference (const Frame &left, const Frame &right)
 Largest per channel difference between two frames of the same size.
double MeanDifference (const Frame &left, const Frame &right)
 Mean per channel difference between two frames of the same size.
vtkSmartPointer< vtkVolumeProperty > MakeProperty (const double range[2], const double rgb[3]=nullptr)
 A property that maps range onto a blue to yellow ramp of growing opacity.

Detailed Description

Shared scaffolding for the WebGPU volume tests: it pins the rendering backend, builds the transfer functions the tests reuse, and reads frames back so a test can assert something about what was drawn without needing a baseline image.

Function Documentation

◆ CheckClass()

bool vtkWebGPUVolumeTest::CheckClass ( vtkObject * object,
const char * expected )
inline

Fail loudly when the factory handed back something other than the class under test, rather than quietly passing while exercising a different backend.

Definition at line 35 of file vtkWebGPUVolumeTestHelpers.h.

◆ Capture()

Frame vtkWebGPUVolumeTest::Capture ( vtkRenderWindow * window)
inline

Definition at line 78 of file vtkWebGPUVolumeTestHelpers.h.

◆ LargestDifference()

int vtkWebGPUVolumeTest::LargestDifference ( const Frame & left,
const Frame & right )
inline

Largest per channel difference between two frames of the same size.

Definition at line 95 of file vtkWebGPUVolumeTestHelpers.h.

◆ MeanDifference()

double vtkWebGPUVolumeTest::MeanDifference ( const Frame & left,
const Frame & right )
inline

Mean per channel difference between two frames of the same size.

Definition at line 113 of file vtkWebGPUVolumeTestHelpers.h.

◆ MakeProperty()

vtkSmartPointer< vtkVolumeProperty > vtkWebGPUVolumeTest::MakeProperty ( const double range[2],
const double rgb[3] = nullptr )
inline

A property that maps range onto a blue to yellow ramp of growing opacity.

Definition at line 130 of file vtkWebGPUVolumeTestHelpers.h.