Hi John,<br><br><div class="gmail_quote">2009/1/20 John Biddiscombe <span dir="ltr">&lt;biddisco@cscs.ch&gt;</span><div>&nbsp;</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2) In this set of code from vtkPointSpriteMapper.cpp line 1522  &nbsp;int Np = points-&gt;GetNumberOfPoints();<br>
 &nbsp;int Nc = input-&gt;GetVerts()-&gt;GetNumberOfCells();<br>
 &nbsp;if (this-&gt;IgnoreVertexCells || Nc==0 || Nc==Np) {<br>
 &nbsp; &nbsp;RenderFlags |= VTK_PSM_USE_POINTS;<br>
 &nbsp;}<br>
<br>
Why does the if() include the test for Nc == 0<br>
</blockquote>
<br></div>
1) If user has supplied N points and N cells, with one cell per point, it&#39;s quicker to traverse the points directly than loop over the cells.<br>
2) If there are no cells suplied, then just use the points (Nc==0). I sometime read data and just don&#39;t bother creating cells at all. The spritemapper will just render the points and skip all cell related activity.<div class="Ih2E3d">
<br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
What if I have a static set of points+colours, and I want to plot none of them? &nbsp;I would like to just set the verticies to an empty cell array, but at the moment it looks like I have to disable or remove the actor from the renderer.<br>

</blockquote></div>
actor-&gt;SetVisibility(0) !!<br>
<br>
yes?<br>
<br>
Sorry the idea of having blanking by using an empty cell array never occured to me, you can remove the Nc==0 check if it bothers you. It won&#39;t break anything else.<br><font color="#888888">
</font></blockquote><div><br>I ended up using SetVisibility(0) along with some more code, so thats all done now.&nbsp; The mapper works very well :)<br><br><br>I understand why you have the Nc==0 (convenience), but what if a user were to read in points from one file, colour scalar values from another, and cells from another file, and then push the data into the SpriteMapper ?<br>
<br>Then it work work perfectly if there was more than zero cells in the file, but if the cell file was empty, all the points would be plotted.&nbsp; Its behaviour is not consistent.&nbsp;&nbsp; It requires more work on the user&#39;s end to test if they have no cells and to turn the actor off.&nbsp; That requires an additional link between the cell array and the actor.&nbsp;&nbsp; Could be difficult if someone were using it in an application like Paraview ?<br>
</div></div><br>Anyway, its not a problem for me (now), but I wonder if someone else may be surprised in the future.<br><br>thanks,<br>Paul<br><br>