[vtkusers] Question ? [Reading data from txt file]

agatte agatakrason at gmail.com
Mon Aug 6 12:21:44 EDT 2012


Hi ;)

I have very simple question a propos de reading txt file
I have a data in txt file :
<nb points>
<nb triangles>
<point 0 X> <point 0 Y> <point 0 Z>
<point 1 X> <point 1 Y> <point 1 Z>
...
<point N X> <point N Y> <point N Z>
<triangle 0 A> <triangle 0 B> <triangle 0 C>
<triangle 1 A> <triangle 1 B> <triangle 1 C>
...
This is example :

2778
5552
3.060173	 -23.518985	 34.600001
2.738770	 -23.433715	 34.675001
2.868080	 -23.186338	 34.385715
3.289746	 -23.289412	 34.350001
3.420931	 -23.551782	 34.600001
3.683301	 -23.289412	 34.350001
3.814486	 -23.551782	 34.600001
4.076856	 -23.289412	 34.350001
4.208040	 -23.551782	 34.600001
4.470410	 -23.289412	 34.350001
4.601595	 -23.551782	 34.600..
....

2661	 2778	 2645
2659	 2778	 2661
2659	 2777	 2778
2658	 2777	 2659
2658	 2776	 2777
2657	 2776	 2658
2657	 2775	 2776
2656	 2775	 2657
2656	 2774	 2775
2655	 2774	 2656
2655	 2773	 2774
2655	 2640	 2773
2772	 2645	 2778
2772	 2629	 2645
2777	 2771	 2778
2778	 2771	 2772
2776	 2770	 2777
2777	 2770	 2771
2775	 2769	 2776
2776	 2769	 2770
2774	 2768	 2775
2775	 2768	 2769
2773	 2767	 277..

What I could read it in VTK ?

I have already tried with  example:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/InfoVis/ReadDelimitedFile

But I couldn't read well data value of points/triangle. 
I received : output :
x: 1.#QNANy: 0z: 0 n: 0 0 0
x: 1.#QNANy: 0z: 0 n: 0 0 0
x: 1.#QNANy: 0z: 0 n: 0 0 0
x: 1.#QNANy: 0z: 0 n: 0 0 0
x: 1.#QNANy: 0z: 0 n: 0 0 0
x: 1.#QNANy: 0z: 0 n: 0 0 0
x: 1.#QNANy: 0z: 0 n: 0 0 0
x: 1.#QNANy: 0z: 0 n: 0 0 0
x: 1.#QNANy: 0z: 0 n: 0 0 0
x: 1.#QNANy: 0z: 0 n: 0 0 0
x: 1.#QNANy: 0z: 0 n: 0 0 0
x: 1.#QNANy: 0z: 0 n: 0 0 0
x: 1.#QNANy: 0z: 0 n: 0 0 0
x: 1.#QNANy: 0z: 0 n: 0 0 0
x: 1.#QNANy: 0z: 0 n: 0 0 0
x: 1.#QNANy: 0z: 0 n: 0 0 0
x: 1.#QNANy: 0z: 0 n: 0 0 0
x: 1.#QNANy: 0z: 0 n: 0 0 0
x: 1.#QNANy: 0z: 0 n: 0 0 0
x: 1.#QNANy: 0z: 0 n: 0 0 0
x: 1.#QNANy: 0z: 0 n: 0 0 0
x: 1.#QNANy: 0z: 0 n: 0 0 0...



I would appreciate for any help or advice.


agatte






--
View this message in context: http://vtk.1045678.n5.nabble.com/Question-Reading-data-from-txt-file-tp5715125.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list