[vtkusers] vtk PLY reader errors

Anderson chidi Apunike anderchidi at yahoo.com
Fri Jul 10 10:35:00 EDT 2015


Thanks Meehan, the error doesn't appear anymore. I was expecting to recieve this message on my inbox folder, but it entered as spam and I check on it with a lesser frequency.

Thanks for your help, I appreciate it.



 


     On Wednesday, July 8, 2015 7:25 PM, "Meehan, Bernard" <MEEHANBT at nv.doe.gov> wrote:
   

  If you add a line after "element face 0”
property list uchar int vertex_index
It will load just fine. Just for clarity, here is the whole file:plyformat ascii 1.0element vertex 15property float xproperty float yproperty float zelement face 0property list uchar int vertex_indexend_header53.242 91.622 149.959129.485 97.222 149.71981.920 4.705 46.38181.827 4.788 46.98380.120 4.781 47.90276.090 4.647 49.16868.482 6.366 51.21668.482 6.366 51.21658.200 11.971 54.29548.691 17.704 54.61340.140 25.495 53.72132.668 34.396 51.96226.993 44.212 46.91722.274 51.449 35.90724.514 49.859 18.384
Here is the code I tested it with:import vtkr = vtk.vtkPLYReader()r.SetFileName("stuff.ply")r.Update()
From: vtkusers <vtkusers-bounces at vtk.org> on behalf of Anderson chidi Apunike via vtkusers <vtkusers at vtk.org>
Reply-To: Anderson chidi Apunike <anderchidi at yahoo.com>
Date: Wednesday, July 8, 2015 at 2:39 PM
To: "vtkusers at vtk.org" <vtkusers at vtk.org>
Subject: [vtkusers] vtk PLY reader errors

Hi VTK developpers, 

I am currently using vtkPLYReader class to load some polygonal objects. 
I convert a txt file into a ply file  (ascii format) with Python. When I try opening the ply file with VTKplyreader, it returns the following error: 

ERROR: In ..\..\VTK\IO\vtkPLYReader.cxx, line 125 
vtkPLYReader (000000000483BDE0): Cannot read geometry 

When I try opening the same PLY file that I created usinga software caled MeshLab, it opens the file in Meshlab, showing all the points. 

I am confused at this point, not knowing what to do about it.

Here's part of my file. It has 266 vertices, but I reduced them to 15.It has no faces. It only has vertices with their respective x, y,z coordinates. 

ply 
format ascii 1.0 
element vertex 15 
property float x 
property float y 
property float z 
element face 0 
end_header 
53.242 91.622 149.959 
129.485 97.222 149.719 
81.920 4.705 46.381 
81.827 4.788 46.983 
80.120 4.781 47.902 
76.090 4.647 49.168 
68.482 6.366 51.216 
68.482 6.366 51.216 
58.200 11.971 54.295 
48.691 17.704 54.613 
40.140 25.495 53.721 
32.668 34.396 51.962 
26.993 44.212 46.917 
22.274 51.449 35.907 
24.514 49.859 18.384 

Thanks. 

Anderson

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers


  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150710/93059827/attachment.html>


More information about the vtkusers mailing list