[vtkusers] vtkRectilinearGridToTetrahedra: remember scalar field

Purves, Murray purvesmh at ornl.gov
Wed Jan 9 09:47:49 EST 2019


I am currently trying to generate a volume rendering of a 3D scalar field that I read in from an HDF5 file. The data structures within the file represent a rectilinear grid, though are stored in a complex fashion and not directly ‘importable’ into an array or other structure.

I am reading the data and pre-processing to build a vtkRectilinearGrid, which I then run through the vtkRectilinearGridToTetrahedra pipeline to build an unstructured grid which I then volume render. The original rectilinear grid has scalars (representing e.g. temperature, power, density) that I would like to preserve when making this conversion, so that I can apply colour/opacity to the volume based on this.

Is this something that is possible to conserve? I can see that it is possible to maintain the original voxel ID as a scalar in the new grid – should I just use this as an index to re-populate the scalar data in the new grid, or can I do it more directly? Or failing that, should I extend the conversion method to allow for transfer of the original scalar field?

Any help/advice is much appreciated.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20190109/43a5efa0/attachment.html>

More information about the vtkusers mailing list