[vtkusers] RE : XYZ ASCII to VTK

Thomas Lecocq thlecocq at msn.com
Tue Apr 15 02:58:22 EDT 2008


FW from another list, but same subject :

---------

NOTE : you have to ADD "import string" at the beginning of the script.


There is also another solution, using a PointCloud.py python script :


See the attached file, I did modify it... Normaly, it should work fine.

you have to call the program from a command line "python PointCloud.py input.txt" where input.txt contains one "X Y Z" per line

HTH

Thomas

**********************
Thomas Lecocq

Geologist
Ph.D.Student (Seismology)
Royal Observatory of Belgium
**********************

Date: Wed, 9 Apr 2008 14:30:26 +0800
From: kalpana0611 at gmail.com
To: mayavi-users at lists.sourceforge.net
Subject: [MayaVi-users] converting xyz(txt) to unstructured grid(vtk)

Hi
 
I found this link 
http://mayavi.sourceforge.net/mwiki/PointCloudson converting point clouds to vtk's unstructured grid form. Unfortunately, I dun know python, is there a C++ program that I can use or could someone show me how to convert the file, I have installed python on windows and linux. I dun need to install vtk to run this program rite.. I can just run it from the console...?

 
anyway, i tried running the script without much knowledge of course, in windows, I received this error
 
Traceback (most recent call last):
  File "C:\Documents and Settings\kalpanak\Desktop\ppp\xyz2vtk.py", line 1, in <module>
    from Scientific.IO.TextFile import pointclouddatafile
ImportError: No module named Scientific.IO.TextFile

 
 
I hope someone could guide me...


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080415/fc256ada/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PointCloud.py
Type: text/x-python
Size: 2254 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080415/fc256ada/attachment.py>


More information about the vtkusers mailing list