<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi all,</p>
<p><span><span>We decided to port our old vtk application to vtk8
and I have some </span><span>questions concerning the jump to
OpenGL2+. </span>We load a streamlines file </span><span>(tck/trk/fib/vtk),
which is simply a list of lines in 3D [1], to view it </span><span>with
an image, compute some stats on it, etc. </span><span>We also
need to filter the polydata when the user moves a box over it.
Only the line passing in the box should be drawn. [2]<br>
</span></p>
<p><span>I already have a working version without modifying any vtk
file, but it's slow.<br>
- I keep the raw unmodified polydata somewhere because all
filtering should start from the original version<br>
- I create a new polydata that will be used for drawing. I use
the raw point and a new vtkCellArray for lines that I want to
draw.<br>
- Each time the user moves the box, I create a new </span><span>vtkCellArray,
fill it with the right cells and call SetLines().</span></p>
<p><span>This is quite slow even with only 4000 lines and I'm not
sure why. Is the mapper sending all the points data again even
if I only modified the lines data? Can this method ever be fast?
If you have other ideas that require a modification to the
mapper, it's not a problem, I can do it, I just don't know where
to start because I don't know much about OpenGL.</span><br>
<span></span></p>
<p><span>Nil Goyette</span></p>
<p><span><span>[1] </span><a href="https://i.imgur.com/krzBvJV.png"
target="_top" rel="nofollow"><span>https://i.imgur.com/krzBvJV.png</span></a></span><a
href="https://i.imgur.com/krzBvJV.png" target="_top"
rel="nofollow"></a><span><br>
[2] I already asked this question 3 months ago but I didn't get
any answer. For more information
<a class="moz-txt-link-freetext" href="http://vtk.1045678.n5.nabble.com/Filtered-polydata-td5747327.html">http://vtk.1045678.n5.nabble.com/Filtered-polydata-td5747327.html</a></span><br>
<span></span></p>
</body>
</html>