Hi,

I’m not familiar with the mechanics of vtkCellLocator/vtkCellPicker, but from a 
code design perspective, subclassing the mapper could be a possibility. You 
should be able to set your own mapper with mitk::DataNode::SetMapper(). 
However, I would not recommend that, as it would involve a lot of extra code 
for the actual thing you are trying to achieve. Is it possible in your case to 
write a filter for that purpose which is located between the surface and the 
mapper? You might have manually call Modified() on the DataNode which holds the 
connected surface though.

Best,
Stefan

From: Federico Milano [mailto:fmil...@gmail.com]
Sent: Samstag, 12. September 2015 22:43
To: mitk-users@lists.sourceforge.net
Subject: [mitk-users] Accelerating 3D picking

Hi. I'm working with surfaces that have a very large quantity of cells. I'm 
doing a lot of picking (for interaction) on them. The problem is that picking 
with the vtkCellPicker is very slow if not optimized with vtkCellLocators. But 
the vtkCellLocators added to the vtkCellPicker have to be always in sync with 
the PolyDataMappers used by the scene renderer. Right now I'm keeping a list of 
surfaces added to the vtkCellPicker in my plugin. In this implementation, the 
vtkCellLocators are updated only when some plugin operation is triggered. I 
don't really like this so much.

Where do you recommend me to store the vtkCellLocator to be able to update it 
when the vtkPolyData is updates? Do you recommend me to subclass the 
SurfaceMapper3D and add code there to manage the vtkCellLocator?

Thanks in advance,

Federico
------------------------------------------------------------------------------
_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to