<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">While waiting for an answer, I tried
coding the third solution I had: "Extend vtkPolyData to add the
concept of visibility". I took vtkStructuredGrid as an example,
noted where this->CellVisibility appears and extended
vtkPolyData with the important methods: Initialize, GetCellType
and GetCell_1-2, added Blank, UnBlank, etc.<br>
<br>
Of course, it didn't work and I'm not sure why. It seems GetCell
and GetCellType are never called. I was sure that one method
somewhere during the rendering process called them but it's not
the case. What I don't understand then is, if all methods related
to CellVisibility are not called, how can it works for
vtkStructuredGrid? There's no example using
vtkStructuredVisibilityConstraint. Do I need to pass the result of
polydata->GetCellVisibilityArray() to another method?<br>
<br>
Le 2014-05-21 10:43, Nil Goyette a écrit :<br>
</div>
<blockquote cite="mid:537CBB87.5070203@imeka.ca" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
Hi,<br>
<br>
I'm searching how to recreate the FiberNavigator [1] using vtk and
I'm stuck on one problem. As you can see in my screenshot [2], we
use a little teal cube to filter which fibers we want to see. The
cube will be a vtkBoxWidget and the fibers are a vtkPolyData. The
problem is that there's no concept of cell visibility in a
vtkPolyData. I found this feature in vtkStructuredGrid but I
believe my data doesn't fit the class' description. I found three
ways to do what I want:<br>
<ol>
<li>Use vtkExtractSelectedPolyDataIds to extract only the cells
I need. I think this would be super slow.<br>
</li>
<li>Add/delete cells when the cube pass by. I think this would
also be slow.</li>
<li>Extend vtkPolyData to add the concept of visibility
(vtkStructuredVisibilityConstraint). This looks like the best
option to me but I may be wrong.</li>
</ol>
<p>I wonder what's the best way to filter the fibers. Do you have
any suggestions for me? Thanks for your time.<br>
</p>
[1] <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://github.com/scilus/fibernavigator">https://github.com/scilus/fibernavigator</a><br>
[2] <a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://imgur.com/1edZpWT">http://imgur.com/1edZpWT</a>
</blockquote>
<div class="moz-signature">-- <br>
<table cellpadding="2" cellspacing="2" width="218" border="0"
height="96">
<tbody>
<tr>
<td valign="middle"> <a href="http://imeka.ca/"> <img
alt="Logo Imeka"
src="cid:part3.00020201.00060809@imeka.ca" width="66"
height="67"> </a> </td>
<td valign="top"> Nil Goyette, M.Sc.<br>
Programmeur<br>
<a href="http://imeka.ca/">www.imeka.ca</a><br>
819.820.5231 </td>
</tr>
</tbody>
</table>
</div>
</body>
</html>