[vtkusers] vtklookuptable
杨衡
yhq at sjtu.edu.cn
Mon Aug 16 02:13:15 EDT 2004
Hi,all
I have used the vtkColorTransferFunction to map the scalar to rgba and the
effect is good .By using addpoint(int ,r,g,b), I clearly map the int to rgb.
But , now I need use vtklookuptable and I have scalars from 0 to 3000 .I
try to use the following code:
table=vtkLookupTable::New();
table->SetRange( 0,3000);
table->Allocate(3001);
while ( p->next)
{
p=p->next;
ctfun->AddRGBPoint(floor(p->point/10.0), p->r/255.0 , p->g/255.0,
p->b/255.0);/////when use vtkColorTransferFunction
table->SetTableValue(floor(p->point/10.0), p->r/255.0 , p->g/255.0,
p->b/255.0,p->opc/100.0);/////use vtklookuptable
}
Table->build();
But the result pic is not what I want ?
Can you tell me why and how to deal with it using vtklookuptable.
Thanks!
}
More information about the vtkusers
mailing list