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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

Lodron, Gerald

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…

 

 

   

 


_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers