[Paraview] I: 3D point cloud with color
pat.marion at kitware.com
Mon Feb 27 15:44:55 EST 2012
ParaView does indeed display points with RGB color values. The colors must
be in a unsigned char array (not any other data type) with 3 components.
Then go to the display tab and uncheck the "map scalars" box, and you will
see the points with color. You can read more about the map scalars option
in the online documentation here:
Giulio, did you try the python programmable source that I posted in your
original email? It works for me on your supplied file, rgb.txt. If you
use this python programmable source, you can then use File -> Save Data to
re-save the data as a VTP file that can be loaded using a standard reader
in the future.
On Mon, Feb 27, 2012 at 3:19 PM, David Pont <David.Pont at scionresearch.com>wrote:
> Hi Giulio,
> I am also very interested in viewing XYZRGB data, and I have not had any
> success in Paraview so far. I think the suggestion to use a vtp file
> instead of a text file was simply another way to get data in to Paraview.
> But I think the issue is how to use RGB values for coloring, regardless of
> how the information is read.
> I hope I am wrong, but I don't think this is supported. Paraview (vtk)
> uses lookup tables to map scalar attribute data to RGB values. It also
> supports vector data, by using only one of the values, or magnitude, ie
> still a scalar to RGB mapping. When I load your example vtp file the RGB
> triplet is loaded as Normals_, and color options are then to use, X or Y or
> Z or Magnitude.
> It seems like this should be easy, really we want to bypass the mapping of
> scalars to color and have Paraview (vtk) use the provided RGB directly. But
> I think this might require a completely new Mapper and/or other parts of
> the rendering subsystem. Probably quite do-able for someone that
> understands the inner workings of the rendering system?
> In the meantime you might be better looking for other tools that are
> designed to display point clouds with RGB? This kind of data is becoming
> more common. My interest is for LiDAR data where XYZRGB data is starting to
> become available, but I have not actually encountered this yet so I have
> not found a solution.
> Here's hoping I'm wrong and someone has a clever solution in Paraview...
> otherwise perhaps it could be a feature request?
> regards, Dave
> David Pont
> Scientist - Forest Management Science
> 49 Sala Street, Private Bag 3020, Rotorua 3046, New Zealand
> DDI +64 7 343 5663
> -----Original Message-----
> From: paraview-bounces at paraview.org [mailto:paraview-bounces at paraview.org]
> On Behalf Of Giulio Reina
> Sent: Monday, 27 February 2012 8:57 p.m.
> To: paraview at paraview.org
> Cc: andrew.amaclean at gmail.com
> Subject: [Paraview] I: 3D point cloud with color
> 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,
> -----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
> Then Paraview can easily read this vtp file.
> This e-mail and any attachments may contain information which is
> confidential or subject to copyright. If you receive this e-mail in error,
> please delete it.
> Scion does not accept responsibility for anything in this e-mail which is
> not provided in the course of Scion's usual business or for any computer
> virus, data corruption, interference or delay arising from this e-mail.
> Powered by www.kitware.com
> Visit other Kitware open-source projects at
> Please keep messages on-topic and check the ParaView Wiki at:
> Follow this link to subscribe/unsubscribe:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ParaView