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
Scion
49 Sala Street, Private Bag 3020, Rotorua 3046, New Zealand
DDI +64 7 343 5663
www.scionresearch.com



-----Original Message-----
From: paraview-boun...@paraview.org [mailto:paraview-boun...@paraview.org] On 
Behalf Of Giulio Reina
Sent: Monday, 27 February 2012 8:57 p.m.
To: paraview@paraview.org
Cc: andrew.amacl...@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,

Cheers

Giulio




-----Messaggio originale-----
Da: David Doria [mailto:daviddo...@gmail.com]
Inviato: giovedì 23 febbraio 2012 02:48
A: giulio.re...@unisalento.it
Cc: paraview@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



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 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to