[vtkusers] vtp point output not showing in paraview
Chris Marsh
chris.marsh at usask.ca
Wed Apr 26 17:57:13 EDT 2017
Hi,
I have an unstructured mesh that represents some topography and I am able
to view this in paraview. I would like to have a set of points overlain
over this 3D mesh that correspond to various physical locations, so-as to
more easily interpret my results.
I am following this wiki link pretty much verbatim to write this set of
points to a VTP file.
http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/WriteVTP
I insert a point like
points->InsertNextPoint ( UTM_easting,UTM_northing, elevation );
When I write to vtp using ascii output, it looks correct (the negative
easting value is a result of the projection I'm using).
<Points>
<DataArray type="Float32" Name="Points" NumberOfComponents="3"
format="ascii" RangeMin="3525178.8854" RangeMax="3525178.8854">
-2100420 2831098.75 1375.8105469
</DataArray>
</Points>
However, when I view this in Paraview, I see nothing. No amount of fiddling
with representation and corresponding size seems to make these points
visible.
When I compile and run the example linked in the wiki, I am able to see the
points in 3D glyph mode. However if I modify it to write just 1 point to
output, e.g.,
points->InsertNextPoint ( -2100420, 2831098.75 ,1375.8105469);
I can not see the point. If I change to 3D glyph-> Sphere I can see it in
2D, and if I overlay my unstructured mesh it goes away. Full contents of
vtp file are below
Cheers
Chris
<?xml version="1.0"?>
<VTKFile type="PolyData" version="0.1" byte_order="LittleEndian"
header_type="UInt32" compressor="vtkZLibDataCompressor">
<PolyData>
<Piece NumberOfPoints="1" NumberOfVerts="0" NumberOfLines="0"
NumberOfStrips="0" NumberOfPolys="0">
<PointData>
</PointData>
<CellData>
</CellData>
<Points>
<DataArray type="Float32" Name="Points" NumberOfComponents="3"
format="ascii" RangeMin="3525178.8893" RangeMax="3525178.8893">
-2100420 2831098.75 1375.8105469
</DataArray>
</Points>
<Verts>
<DataArray type="Int64" Name="connectivity" format="ascii"
RangeMin="1e+299" RangeMax="-1e+299">
</DataArray>
<DataArray type="Int64" Name="offsets" format="ascii"
RangeMin="1e+299" RangeMax="-1e+299">
</DataArray>
</Verts>
<Lines>
<DataArray type="Int64" Name="connectivity" format="ascii"
RangeMin="1e+299" RangeMax="-1e+299">
</DataArray>
<DataArray type="Int64" Name="offsets" format="ascii"
RangeMin="1e+299" RangeMax="-1e+299">
</DataArray>
</Lines>
<Strips>
<DataArray type="Int64" Name="connectivity" format="ascii"
RangeMin="1e+299" RangeMax="-1e+299">
</DataArray>
<DataArray type="Int64" Name="offsets" format="ascii"
RangeMin="1e+299" RangeMax="-1e+299">
</DataArray>
</Strips>
<Polys>
<DataArray type="Int64" Name="connectivity" format="ascii"
RangeMin="1e+299" RangeMax="-1e+299">
</DataArray>
<DataArray type="Int64" Name="offsets" format="ascii"
RangeMin="1e+299" RangeMax="-1e+299">
</DataArray>
</Polys>
</Piece>
</PolyData>
</VTKFile>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170426/4ea4e93a/attachment.html>
More information about the vtkusers
mailing list