Reads a VTK generated triangle geometry file into an AVS/Express Mesh.
Name | Type | Description | UI Control |
filename | string | Name of VTK triangle file to be read. | File Browser |
Name | Type | Description | |
out_mesh | Mesh | Mesh data constructed from read Geometry. | |
out_obj | GDobject | Directly renderable output object. | |
out_fld | Field | Mesh data combined with appropriate node data. | |
The read_vtk user macro is designed to be a simple interface between the VTK triangle file storage format and the AVS/Express triangle mesh structure. It reads the contents of the file and creates a triangle cell set as output. The internal low-level module, ReadVtkCore, is implemented in C++. The module is designed to only read a subset of the VTK file format, specifically files very similar to:
# vtk DataFile Version 2.0 ASCII DATASET POLYDATA POINTS 9 float -1.0 -1.0 0.0 1.0 -1.0 0.0 1.0 1.0 0.0 -1.0 1.0 0.0 1.0 1.0 0.0 1.0 3.0 0.0 -1.0 3.0 0.0 1.0 3.0 0.0 1.0 5.0 0.0 POLYGONS 3 12 3 0 1 2 3 3 4 5 3 6 7 8
filename
Name of the VTK triangle geometry file to be loaded. The parameter is of type string. The User Interface provided by the user macro contains a file browser so that this parameter can be easily changed.
out_mesh
The output mesh containing nodes and triangle cells constructed from the data present in the VTK file. This output only contains geometry, it does not contain any node or cell data.
out_obj
The GDobject version of the output, suitable for direct connection to the viewer.
out_fld
A placeholder for field data generated by the macro. Currently the read_vtk macro outputs automatically generated node data. This data is unlikely to be useful. However it is possible to modify the read_vtk macro to output real data through this port. Please see above for further details.
The low-level module, ReadVtkCore is used by the functional macro Read_VTK. This functional macro and the User Interface Macro, Read_VTK_UI are both used by the user macro, read_vtk. This project does not use a separate parameter block.
The example application, ReadVtkEg, is provided. This application demonstrates how the read_vtk macro can be used to read a geometric representation of the inner ear. It also demonstrates how the field and mesh outputs can be visualised. Note that the rainbow effect on the viewed image is a result of the automatically generated node data. It is not part of the original data.
iac_proj/rd_vtk/rvtkmods.v contains the V definition of the ReadVtkCore module.
iac_proj/rd_vtk/rvtkmacs.v contains the V definitions of the Read_VTK_UI UI macro, the Read_VTK functional macro, the read_vtk user macro and the ReadVtkEg example application.
The low-level ReadVtkMods library containing the module ReadVtkCore does not specify a process. By default the express process will be used.
Dave Goughnour, Ian Curington, Advanced Visual Systems, Inc. Andrew Dodd, International AVS Centre
International AVS Centre Manchester Visualization Centre Manchester Computing University of Manchester Oxford Road Manchester United Kingdom M13 9PL