[vtkusers] Please help on vtkLookupTable

Janny Dong janny.dong at gmail.com
Mon May 21 10:31:04 EDT 2007


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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070521/475b3653/attachment.htm>


More information about the vtkusers mailing list