[vtkusers] How to use the lookup table.

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Wed Dec 27 07:34:25 EST 2000


hi,

>>>>> "Miyashita" == Yukihiro Miyashita <miyasita at sesys.co.jp> writes:

<snip>
    Miyashita> I want to know the usage of lookup table.  How can I
    Miyashita> link the color table and the data.  How can I change
    Miyashita> the color of the part which I want.

    Miyashita> Point of Program:
    this-> Reader->SetFileName(strdup(lpszPathName));
    this-> Mapper->SetInput(this->Reader->GetOutput());
    Miyashita>    vtkStructuredPoints *volume =
    Miyashita> vtkStructuredPoints::New();
    volume-> CopyStructure(this->Mapper->GetInput());
    volume-> GetPointData()->SetScalars(this->Mapper->GetColors());
    Miyashita>    vtkMarchingCubes *contour = vtkMarchingCubes::New();
    contour-> SetValue(0,1.0);

I am not sure that I am entirely correct but this might help.  In your
case you want the 1.0 contour.  In your data file, your Lookup table
associates this value with the color (0.0, 0.5, 1.0, 1.0) - this is
the last entry.  So you can edit the value that you have set in the
looktable.  So for instance if you set change the last entry in your
lookup table to 1.0 0.5 1.0 1.0 you will get a very different color.

prabhu




More information about the vtkusers mailing list