[vtkusers] Fwd: VTK coloring tube filter with connectivity information
zloy.smiertniy2 at gmail.com
Tue Nov 8 04:23:04 EST 2016
I hope I am going in the right direction here
I have a molecule I want to represent with spheres and tubes connecting
them. I'd like to color the tubes according to connectivity information.
Meaning that I have various disconnected regions or disconnected components
I would like to color differently per region. So far I have this, in python
and it works. I have commented what I tried to do to achieve this. The
variable data is a PolyData array that contains points, scalars and cells
with the connectivity information.
tube = vtk.vtkTubeFilter()
"""appendFilter = vtk.vtkAppendPolyData()
connectivityFilter = vtk.vtkPolyDataConnectivityFilter()
tubeMapper = vtk.vtkPolyDataMapper()
And this is how it looks so far.
The connectivity filter actually works and finds all the connected
components I just have not figured out how to color the tubes with a
different color each.
Thank you world
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers