[vtkusers] Filtered polydata
Nil Goyette
nil.goyette at imeka.ca
Wed May 9 10:00:52 EDT 2018
Hi all,
We decided to port our old vtk application to vtk8 and I have some
questions concerning the jump to OpenGL2+. We load a streamlines file
(tck/trk/fib/vtk), which is simply a list of lines in 3D [1], to view it
with an image, compute some stats on it, etc. This is already working
well, thanks to the MITK framework.
The problem is that we need to filter the streamlines when the user
moves a selection box. It needs to be real-time, even with million(s) of
streamlines. By 'filter', I simply mean that the user won't see all the
data, but the data still should be in memory. Last time I simply created
my own mapper, extending vtkPolyDataMapper, looping over a shared QSet
containing the indices I wanted to draw. It was kind of a hack but it
was super fast because there was no data duplication, only the qset was
modified.
vtk changed a lot so I prefer asking before coding anything. Is there a
standard way to filter a huge polydata in real-time? If not, I started
studying OpenGL2/vtkOpenGLPolyDataMapper.cxx and I have some questions
about the best way to draw only the lines I want, probably concerning
glDrawRangeElements and Primitives.IBO.
Nil Goyette
[1] https://i.imgur.com/krzBvJV.png
More information about the vtkusers
mailing list