Difference between revisions of "VTKpytools"
(Created page with "'''vtkpytools''' is a python package developed in house that has useful tools for generating Visualization ToolKit (VTK) files, and for extracting and manipulating data from V...") |
|||
Line 17: | Line 17: | ||
[[Category:Post-processing]] | [[Category:Post-processing]] | ||
+ | [[Category:vtkpytools]] |
Revision as of 15:58, 24 August 2020
vtkpytools is a python package developed in house that has useful tools for generating Visualization ToolKit (VTK) files, and for extracting and manipulating data from VTK files. The code is hosted on a repository in PHASTA's GitHub organization.
vtkpytools heavily utilizes the pyvista Python package, which provides a Pythonic interface to VTK objects, and the Python bindings for the VTK library itself (which are simply one-to-one copies of the C++ API).
Using vtkpytools
The recommended (though admitedly clunky) way import vtkpytools is to add it to the python path in script then import it:
import sys sys.path.insert(0, 'path/to/vtkpytools/repository/directory')
This makes you have control over which version of vtkpytools you use. Alternatively, the package can be installed to your python environment by running python setup.py install
in the repository directory. If running this on the global installed conda environment on the viz nodes, this will update/install the package version for everyone.
Expanding vtkpytools
Currently, the vtkpytools repository is structured so that it can be expanded to host useful functions/utilities/scripts for many different kinds of problems/uses. If you would like to make changes/additions to the package, see the (to be added) CONTRIBUTING.md
file in the repository for instructions.