[vtkusers] Bug in vtkPointHandleRepresentation3D/vtkSeedWidget setting properties seperately for seed points?
Lodron, Gerald
Gerald.Lodron at joanneum.at
Wed Jun 20 02:33:39 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...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180620/305c80fc/attachment.html>
More information about the vtkusers
mailing list