Thanks for your reply!
Sadly, this doesnt help.
Here's a screenshot, i marked the points, so you can see that it's the
line between points with SnapId 0 and 1 witch is colored, not the actual
points themselves.. No matter how big i set the table range, only the
first linesegment gets colored..
(Each line connects the same point in different snapshots, so snapid is
increasing here from left to right along one line..)
http://www.physik.uzh.ch/~rafik/pv%20coloring.png
here the orginal code, wich generated this pic, or at least part of..:
(i can paste everything if needed..)
....
vtkSmartPointer<vtkLookupTable> lut2 =
vtkSmartPointer<vtkLookupTable>::New();
lut2->SetTableRange(0,3);
lut2->SetNumberOfTableValues(4);
lut2->SetTableValue(0,1,0,0);
lut2->SetTableValue(1,1,1,0);
lut2->SetTableValue(2,1,1,1);
lut2->SetTableValue(3,0,0,1);
lut2->Build();
actData->SnapId->SetLookupTable(lut2);
//lut2->PrintSelf(cerr, vtkIndent(0)) ;
out->SetPoints(actData->Position);
out->SetVerts(actData->Cells);
out->SetLines(actData->Tracks);
out->GetPointData()->AddArray(actData->Velocity);
out->GetPointData()->AddArray(actData->GId);
out->GetPointData()->AddArray(actData->SnapId);
out->GetPointData()->AddArray(actData->Mvir);
out->GetPointData()->AddArray(actData->Rvir);
out->GetPointData()->AddArray(actData->Vmax);
out->GetPointData()->AddArray(actData->Rmax);
out->GetPointData()->AddArray(actData->Redshift);
out->GetPointData()->AddArray(actData->TrackId);
Many thanks
Rafael Kueng
Am 08.12.2010 22:48, schrieb John Drescher:
On Wed, Dec 8, 2010 at 4:27 PM, Rafael Küng<[email protected]> wrote:
Hi There
I'm trying to get colored points and tracks with a reader, but i only get
the first point colored.. can somebody please give me a hint? It looks to me
that the SetTableRange(d,d) is not doing what it's supposed to do... (pv
3.8.0)
In position (vtkPoints) i've got 10 points, connected with lines. I would
like to color each point according to it's snapid (vtkIdTypeArray).
So, it does some coloring, but only on the line between the 1st point
(SnapId=0) and the second point (SnapId 1)..
Many thanks
Rafael Kueng
University of Zuerich
My code:
-----
vtkPolyData * out = vtkPolyData::GetData(outputVector);
//...generate points...
vtkSmartPointer<vtkLookupTable> lut =
vtkSmartPointer<vtkLookupTable>::New();
lut->Build();
lut->SetTableRange(0,9);
lut->SetNumberOfTableValues(10);
lut->SetTableValue(0,1,0,0);
lut->SetTableValue(1,1,1,0);
lut->SetTableValue(2,1,1,1);
lut->SetTableValue(3,0,1,1);
//...
Put the following line here instead of at the top.
lut->Build();
SnapId->SetLookupTable(lut2);
out->SetPoints(Position);
out->SetVerts(Cells);
out->SetLines(Tracks);
out->GetPointData()->AddArray(SnapId);
-----
i also tried lut->build after setting the table values, doesn't make any
difference..
_______________________________________________
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
_______________________________________________
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