[vtkusers] The question regarding SetScalarRange() function

TzuYi Yu tyyu01 at mail.apol.com.tw
Sun Mar 11 23:28:06 EST 2001


Dear VTK User:

  In the graphics\examplesCxx\ColorSph.cxx, 
there are some statements listed as follows:
----------Code Segment included -----------------
  vtkSphereSource *sphere = vtkSphereSource::New();
    sphere->SetPhiResolution(12); 
    sphere->SetThetaResolution(12);

  vtkElevationFilter *colorIt = vtkElevationFilter::New();
    colorIt->SetInput(sphere->GetOutput());
    colorIt->SetLowPoint(0,0,-1);
    colorIt->SetHighPoint(0,0,1);
----------End of included -----------------------
If I add the "colorIt->SetScalarRange(a,b);"
where a & b are different numbers, then the 
sphere shows different colors (sometime, it 
only show one color even a and b are differnt).
Can anyone tell me how the "SetScalarRange" 
effect the final color of the sphere?  ie, 
how can I know how to specify the right range 
to have the desire color of the sphere when 
renders?  

Thanks, 


Robert Yu 





More information about the vtkusers mailing list