[vtkusers] file conversion

p0rter a.schmitz703 at gmail.com
Wed Apr 18 05:42:39 EDT 2012


*hi,

the vtk looks like this:*

# vtk DataFile Version 1.0
Generator=TriangleMesh.java, Wed Dec 01 15:32:52 CET 2010
ASCII
DATASET POLYDATA
POINTS 1500 double
-10.516600913464657 177.84067036857135 394.5663277002459
-8.948885903928584 175.66132806672883 394.7663426028354
-11.175970694055763 174.878784436299 394.8202448540949
0.5256460757442767 229.73798767584557 389.9518823843581
-0.3635826600914527 230.2230158375073 387.4975767250487
[...]
POLYGONS 3000 12000
3 833 1239 390 
3 1145 645 18 
3 595 1387 1110 
3 337 336 416 
[...]
CELL_DATA 3000
SCALARS labels int 1
LOOKUP_TABLE default
391
390
390
390
400
393
394
390
391
392
[...]

*pretty basic. i know i can export vtk to x3d and vrml but actually i need
.obj or better: JSON. example:*

{
    "metadata": { "formatVersion" : 3, "generatedBy": "Blender 2.58
Exporter" },
    "scale" : 100.000000,
    "materials": [],
    "vertices": [-1306,2788,-842,340,-4515,-1884,1880,1458,-1603, ....],
    "morphTargets": [],
    "normals": [],	
    "colors": [],
    "uvs": [[]],
    "faces": [0,661,1599,29,0,1123,1162,1622,0,1425,1180,199,0,320, ...],
    "edges" : []
}

--
View this message in context: http://vtk.1045678.n5.nabble.com/file-conversion-tp5646519p5648680.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list