[vtkusers] Bug in vtkPointHandleRepresentation3D/vtkSeedWidget setting properties seperately for seed points?

Lodron, Gerald Gerald.Lodron at joanneum.at
Wed Jun 20 02:36:21 EDT 2018


Hi

I am using a vtkSeedWidget with a vtkPointHandleRepresentation3D to place some points in my image. I want to set different color for different seed points so I use for each point

vtkSmartPointer<vtkProperty> vtkPorperty = vtkSmartPointer<vtkProperty>::New();
vtkPorperty->SetColor(r,g,b);
static_cast<vtkPointHandleRepresentation3D*>( seedWidget->GetSeedRepresentation()->GetHandleRepresentation( pointId ))->SetProperty(vtkPorperty);

after adding the point. The problem is that after that line of code/after Render() ALL seed points get those color.
Example:

Add 3 Seedpoints and set first red, second blue, third green (using above code). All appear green, because this one was the last "SetProperty" call. When I move first seed point a little bit it becomes (after movement/after releasing mouse) red again which is my wanted color for this seed.

Any idea what I am making wrong? Can I maybe simulate an move interaction to get correct color. I already tried several "StartInteraction" calls on the representation and widget without success.


    



More information about the vtkusers mailing list