[vtkusers] How to reverse the colours to display contours.?

rakesh patil prakeshofficial at gmail.com
Thu Feb 17 04:56:25 EST 2011


Hi John,

Thanks. It works for default lookup table. Below is my code:

vtkSmartPointer<vtkLookupTable> lut =
vtkSmartPointer<vtkLookupTable>::New();
lut->SetNumberOfTableValues(9);
lut->SetTableValue(0, 1.00, 0.00, 0.00);
lut->SetTableValue(0, 1.00, 0.50, 0.00);
lut->SetTableValue(0, 1.00, 1.00, 0.00);
lut->SetTableValue(0, 0.50, 1.00, 0.00);
lut->SetTableValue(0, 0.00, 1.00, 0.00);
lut->SetTableValue(0, 0.00, 1.00, 0.50);
lut->SetTableValue(0, 0.00, 1.00, 1.00);
lut->SetTableValue(0, 0.00, 0.50, 1.00);
lut->SetTableValue(0, 0.00, 0.00, 1.00);
lut->Build();

In this case, I am unable to reverse the colous. Manually, i need to change
the code to reverse i guess..

Any idea how to get it done here.?
On Thu, Feb 17, 2011 at 2:15 PM, John Platt <jcplatt at dsl.pipex.com> wrote:

> Hi Rakesh,
>
> Have you tried
>
>   SetHueRange( 2/3, 0 );
>   Build();
>
> HTH
>
> John.
>
> ----- Original Message ----- From: rakesh patil
> To: VTK Users
> Sent: Thursday, February 17, 2011 7:20 AM
> Subject: [vtkusers] How to reverse the colours to display contours.?
>
>
>
> Hello,
>
> When I display contours, I use the default vtkLookupTable() to represent
> the colour scheme. Default is min_value is red and max_value is blue.
>
> Now what do I do in order to reverse it? I mean, min_value should be
> depicted with blue colour and max_value with red colour. Is there any way to
> do this?
>
> Thanks
>
> Regards
> Rakesh Patil
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK 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/20110217/8240a105/attachment.htm>


More information about the vtkusers mailing list