[vtkusers] Please help on vtkLookupTable
Andrew Maclean
andrew.amaclean at gmail.com
Mon May 21 20:16:32 EDT 2007
Try:
mapper->SetScalarRange(bwLut->GetTableRange());
On 5/22/07, Janny Dong <janny.dong at gmail.com> wrote:
>
> Hi,
>
> Did you try
>
> mapper->SetScalarRange()
> mapper->ScalarVisibilityOn()
>
> btw, I am also new so I can't guarantee it works :P
>
> Janny
>
> On 5/20/07, YaoHaofeng <hfyao1983 at hotmail.com> wrote:
> >
> > Hi, I am new to VTK and do not know how vtkLookupTable work, I have an
> > array of points with scalar value 0-1500, and I want to map them to
> > different colors, so I do:
> >
> > vtkLookupTable *bwLut = vtkLookupTable::New();
> > bwLut->SetTableRange(0, 1536);
> > bwLut->SetNumberOfColors(256);
> > bwLut->SetHueRange (0.6667, 0.0);
> > bwLut->SetSaturationRange (1.0, 1.0);
> > bwLut->SetValueRange (1.0, 1.0);
> > bwLut->Build();
> >
> > vtkPolyDataMapper *mapper = vtkPolyDataMapper::New();
> > mapper->SetLookupTable(bwLut);
> > mapper->SetInputConnection(clipper->GetOutputPort());
> > mapper->SetColorModeToMapScalars ();
> > mapper->UseLookupTableScalarRangeOn();
> >
> > But the entire image is blue everywhere, please help on correctly
> > displaying colors with scalars.
> >
> > thanks
> >
> > hank
> >
> >
> > ------------------------------
> > 中国十大热门旅游景点 了解更多信息!<http://search.msn.com/results.aspx?q=%E4%B8%AD%E5%9B%BD%E5%8D%81%E5%A4%A7%E9%A3%8E%E6%99%AF&mkt=zh-CN&form=QBRE>
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
> >
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
--
___________________________________________
Andrew J. P. Maclean
Centre for Autonomous Systems
The Rose Street Building J04
The University of Sydney 2006 NSW
AUSTRALIA
Ph: +61 2 9351 3283
Fax: +61 2 9351 7474
URL: http://www.cas.edu.au/
___________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070522/1e47308c/attachment.htm>
More information about the vtkusers
mailing list