How can I change the line colour in vtkResliceCursorWidget and vtkLineWidget ?

How can I change the colour of the line in vtkLineWidget ?
How can I change the colour of the lines in vtkResliceCursorWidget ?
Screenshot_20220202_120706

Screenshot_20220202_120352

1 Like

Look at vtkLineWidget, in particular, GetLineProperty()
vtkProperty will let you change the line colour. You can also change the ball colour, see GetHandleProperty().

I don’t think you can change cursor colours in vtkResliceCursorWidget.

Does not work in vtk.js
lineWidget.GetLineProperty is not a function

Hello, Was this issue resolved? I want to change the color and opacity of the line in vtkLineWidget vtk.js. Can that be done?

Thanks,
Sneha