[vtkusers] VTK : vtkLookupTable blues..
Ed Bachta
ebachta at iupui.edu
Tue Sep 9 11:18:30 EDT 2003
You might try adding:
topog_map->SetScalarRange(0, 1000);
On Tue, 2003-09-09 at 09:56, Luke J West wrote:
> Hi,
>
> I can get vtkLookupTable to respond to SetHueRange, SetSaturationRange and
> SetValueRange, to create just the colourtable I want, but it ignores calls to
> SetTableRange, and continues to map the colourtable onto the data range [0,1],
> which I assume is the default behavior. I've tried to do this in numerous pieces
> of code, but to no avail.
>
> any ideas?
>
> here is my pipeline from vtkStructuredGrid to vtkActor...
>
> thanks,
>
> luke
>
>
> vtkStructuredGrid* topog_grd = vtkStructuredGrid::New();
> topog_grd->SetDimensions(NX(),NY(),1);
> topog_grd->SetPoints(topog_pts);
> topog_pts->Delete();
> topog_grd->GetPointData()->SetScalars(topog_arr);
>
>
> vtkContourFilter* topog_con = vtkContourFilter::New();
> topog_con->SetInput(topog_grd);
> topog_con->GenerateValues(Nz(),0,1000);
>
>
> vtkLookupTable* topog_lut = vtkLookupTable::New();
> topog_lut->SetTableRange (0,1000); // has no effect
> topog_lut->SetHueRange ( 0, 1);
> topog_lut->SetSaturationRange( 1, 1);
> topog_lut->SetValueRange ( 1, 1);
>
> vtkStructuredGridGeometryFilter* topog_geo =
> vtkStructuredGridGeometryFilter::New();
> topog_geo->SetInput(topog_grd);
> topog_geo->SetExtent(0,NX(),0,NY(),0,0);
>
> vtkPolyDataMapper* topog_map = vtkPolyDataMapper::New();
> topog_map->SetLookupTable(topog_lut);
> topog_map->SetInput(topog_con->GetOutput());
>
> vtkActor* topog_act = vtkActor::New();
> topog_act->SetMapper(topog_map);
>
>
> Luke J West : Research Assistant : e-Science
> --------------------------------------------
> Rm. 566/12, School of Ocean & Earth Sciences
> Southampton Oceanography Centre, Southampton
> SO14 3ZH United Kingdom
> --------------------------------------------
> Tel: +44 23 8059 4801 Fax: +44 23 8059 3052
> Mob: +44 79 6107 4783
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
--
Ed Bachta
Technical Lead
Visualization and Interactive Spaces Lab,
Pervasive Technology Labs at Indiana University
http://vis.iu.edu
More information about the vtkusers
mailing list