[Paraview] I: 3D point cloud with color
Giulio Reina
giulio.reina at unisalento.it
Mon Feb 27 02:57:02 EST 2012
Hi all,
Following David's suggestion, I came up with the code attached that turns
the starting data file (rgb.txt, of the type [X Y Z R G B] (the first three
vector columns specify the location of the single point and the last three
one its color in RGB space)) into a parsed vtp format. Unfortunately, when I
try to open the VTP file in Paraview (after applying a Glyph filter) the
results are not what I expect, i.e. one point red, one point green, two
points blue.
I would greatly appreciate if someone could help me put reading correctly
the VTP file, I should admit that I'm not very familiar with the use of vtp
files in Paraview,
Cheers
Giulio
-----Messaggio originale-----
Da: David Doria [mailto:daviddoria at gmail.com]
Inviato: giovedì 23 febbraio 2012 02:48
A: giulio.reina at unisalento.it
Cc: paraview at paraview.org
Oggetto: Re: [Paraview] 3D point cloud with color
>> I have been working with 3D stereo reconstruction. So, I have huge 3d
point clouds co-registered with color in this format [X Y Z R G B] (the
first three vector columns specify the location of the single point and the
last three one its color in RGB space). I have been trying to display the
data in Paraview without success.
>>
>>
>>
>> I use the table to points filter to show the 3D coordinates but then I
do not know how to specify the color of each single point using its RGB
components. Can you please help me out?
If you're more comfortable in c++ you could use VTK to parse the file,
construct a polydata, and then write a vtp file. Here are the examples you'd
need:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/InfoVis/ReadDelimitedFile
http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/WriteVTP
Then Paraview can easily read this vtp file.
David
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: main.cpp
URL: <http://www.paraview.org/pipermail/paraview/attachments/20120227/cb7017c5/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rgb.txt
URL: <http://www.paraview.org/pipermail/paraview/attachments/20120227/cb7017c5/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.vtp
Type: application/octet-stream
Size: 2583 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20120227/cb7017c5/attachment.obj>
More information about the ParaView
mailing list