[vtkusers] vtkColorTransferFunction limit

Clement.Chu at csiro.au Clement.Chu at csiro.au
Wed Aug 10 14:03:21 EDT 2011


Hi,

   Anyone know how many colours I can add into vtkColorTransferFunction class by calling AddRGBPoint method.  I used the code below to generate the colour map:

int numCols = 256;
vtkColorTransferFunction ct = new vtkColorTransferFunction::New();
vtkPiecewiseFunction pf = new vtkPiecewiseFunction::New();
for (int i=0; i<numCols; i++) {
  ct.AddRGBPoint(i, i/(numCols -1), i/(numCols -1), i/(numCols -1));
  pf.AddPoint(i, i/(numCols -1));
}

I would like to know whether it is possible to change the variable numCols to high number such 4096 or 65536.  Thanks.


Regards,
Clement



More information about the vtkusers mailing list