Hello, I was wondering if anyone could share an example where something like this was performed in Python. I am looking at colouring the lines / triangles etc. different colours.
https://kitware.github.io/vtk-examples/site/Cxx/Modelling/Delaunay3DDemo/
I thought something like this would work as a starting point but the colours (all red for now) are not showing.
triangulator = vtk.vtkDelaunay2D()
triangulator.SetAlpha(alphaValue)
triangulator.SetInputDataObject(data)
cellData = vtk.vtkUnsignedCharArray()
cellData.SetName("colors")
cellData.SetNumberOfComponents(3)
for i in range(triangulator.GetOutput().GetNumberOfCells()):
cellData.InsertNextTypedTuple((255,0,0))
triangulator.GetOutput().GetCellData().SetScalars(cellData)
mapper = vtk.vtkPolyDataMapper()
mapper.SetInputConnection(triangulator.GetOutputPort())
mapper.SetScalarModeToUseCellData()
sProp = vtk.vtkProperty()
sProp.SetOpacity(1.0)
actor = vtk.vtkActor()
actor.SetProperty(sProp)
actor.SetMapper(mapper)
...