[Paraview] I: 3D point cloud with color

Andrew Maclean andrew.amaclean at gmail.com
Mon Feb 27 18:44:53 EST 2012


I also attach the vtp file I created from your text file. Set the
point size to 11 to make the points more obvious.

On Mon, Feb 27, 2012 at 6:57 PM, Giulio Reina
<giulio.reina at unisalento.it> wrote:
> 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



-- 
___________________________________________
Andrew J. P. Maclean

___________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.vtp
Type: application/octet-stream
Size: 2114 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20120228/0d2161eb/attachment.obj>


More information about the ParaView mailing list