vtki
is VTK. It simply adds a layer on top to make VTK way easier to use so that we don’t have to remember the nuances of lookup tables and rendering, etc.
All vtki
data objects are instances of VTK data objects:
>>> import vtk
>>> import vtki
>>> isinstance(vtki.PolyData(), vtk.vtkPolyData)
True
>>> isinstance(vtki.UnstructuredGrid(), vtk.vtkUnstructuredGrid)
True
- You’ll need to create a mapper:
vtk.vtkDataSetMapper()
- Then set up that mappers lookup table properly:
mapper.GetLookupTable()
and set its attributes/colormapping
Try following this example or this cpp exmaple which could be translated to Python