[vtkusers] please help for rgb colors
    Julia Faurie 
    julia at lrde.epita.fr
       
    Tue Aug 13 07:41:52 EDT 2002
    
    
  
hi!
does anyone know how i can set a rgb colors gradation to my isosurface?
i've tried a look up table like that (i associate scalars in the file):
     vtkLookupTable *clut=vtkLookupTable::New();
     clut->SetNumberOfColors(hsize*hsize*hsize);
     clut->Build();
     int numerop=0;
     for (int r = 0; r < hsize; ++r)
       for (int g = 0; g < hsize; ++g)
  {
    for (int b = 0; b < hsize; ++b)
      {
        float re=((float)r*mult)/248;
        float gr=((float)g*mult)/248;
        float bl=((float)b*mult)/248;
        clut->SetTableValue(numerop,re,gr,bl,1.0);
        numerop++;
      }
  }
     clut->SetTableRange (tab);
i can see the colors on the surface are right but there are blobs on the
surface!
thanks
    
    
More information about the vtkusers
mailing list