[vtkusers] Scalar Range

Bruno bant1708 at yahoo.com.br
Thu Sep 2 13:24:11 EDT 2004


Hi,

I'm having problems with vtkImageData::GetScalarRange()

Supose that my original scalar range is [0,255]. So, if I run the command:

   vtkImageData *vol;
   ......
   vol->GetScalarRange(srange);

it works fine, i.e. srange = {0,255}. But if I change ALL my data, using 
the following command in a loop  
     val = 0;
     vol->GetPointData()->GetScalars()->SetTuple(i,&val);

and re-run GetScalarRange:

  vol->Update();
  vol->GetScalarRange(srange);

I get the old range (0,255) instead of the new one (0,0).  In other 
words, this update command isn't updating the scalar range.

What can I do to solve this problem? I'm using vtk 4.2, Borland C++ 
Builder and my data type is double

thanks,

Bruno.



More information about the vtkusers mailing list