[Paraview] bug in vtkLookupTable?

John Drescher drescherjm at gmail.com
Wed Dec 8 16:48:23 EST 2010


On Wed, Dec 8, 2010 at 4:27 PM, Rafael Küng <rafi.kueng at gmx.ch> 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
>



-- 
John M. Drescher


More information about the ParaView mailing list