<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Eric,<br>
<br>
Paraview only displays cells, not points.<br>
<br>
There are at least two solutions:<br>
- When you write the ugrid file, you can add vertices, which are
cells containing a single point, using something like:<br>
<blockquote type="cite">cell = vtk.vtkVertex()<br>
cell_array = vtk.vtkCellArray()<br>
for k_point in xrange(ugrid.GetPoints().GetNumberOfPoints()):<br>
cell.GetPointIds().SetId(0, k_point)<br>
cell_array.InsertNextCell(cell)<br>
ugrid.SetCells(vtk.VTK_VERTEX, cell_array)<br>
for k_array in xrange(ugrid.GetPointData().GetNumberOfArrays()):<br>
ugrid.GetCellData().AddArray(ugrid.GetPointData().GetArray(k_array))<br>
</blockquote>
- Otherwise, if you have only points in your ugrid, you can glyph
them in paraview, using for instance a sphere with fixed small
diameter.<br>
<br>
Martin<br>
<br>
<div class="moz-cite-prefix">On 01/02/2016 05:07, Eric Robertson
wrote:<br>
</div>
<blockquote
cite="mid:CACk0HAPdWbq2eCB7Lp+Ju9TLNdXuFAtPTOEaG_C-S6AN3asfCw@mail.gmail.com"
type="cite">
<div dir="ltr">Hi all,
<div><br>
</div>
<div>I have a raw data set of X,Y,Z coordinates as well as a set
of scalars (lets call them A, B, C) which are stored at the
aforementioned coordinates. I use vtkUnstructuredGrid to
create the domain, but when I go to open the .vtu file in
Paraview I see that there aren't any cells to visualize. </div>
<div><br>
</div>
<div>My question is- how do I go about providing 'cells' which
use these points as cell-centers?</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
Please keep messages on-topic and check the VTK FAQ at: <a class="moz-txt-link-freetext" href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a>
Search the list archives at: <a class="moz-txt-link-freetext" href="http://markmail.org/search/?q=vtkusers">http://markmail.org/search/?q=vtkusers</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://public.kitware.com/mailman/listinfo/vtkusers">http://public.kitware.com/mailman/listinfo/vtkusers</a>
</pre>
</blockquote>
<br>
</body>
</html>