[Paraview] [EXTERNAL] rgb lookup table

Cory Quammen cory.quammen at kitware.com
Wed Jun 13 15:48:33 EDT 2018


Claudio,

ParaView ignores the LOOKUP_TABLE you specified in your VTK file. Instead,
elaborating on what Alan suggested, you can do the following:

* Load your data
* Add a "Tensor Glyph" filter.
* Color the "Tensor Glyph" filter by the "sample_scalars" array. This
should actually happen by default.
* Open up the Color Map Editor.
* Near the top of the Color Map Editor dialog, check the box "Interpret
Values as Categories"
* Under "Annotations", click on the toolbutton "Add active values from
selected sources". This will assign a unique color to each glyph. You can
customize these colors by clicking on the circular color swatch in the left
column of the Annotations table.

Hope that helps,
Cory

On Fri, Jun 8, 2018 at 6:42 PM Scott, W Alan via ParaView <
paraview at public.kitware.com> wrote:

> Hi Claudio,
>
> I have never done this, but it sounds like you are looking for an
> annotation, rather than a continuous color map.  Could you flip to
> annotations, then color using an int?
>
>
>
> Alan
>
>
>
>
>
> *From: *ParaView <paraview-bounces at public.kitware.com> on behalf of
> Claudio via ParaView <paraview at public.kitware.com>
> *Reply-To: *Claudio <cv39100 at yahoo.com>
> *Date: *Wednesday, June 6, 2018 at 8:46 AM
> *To: *"paraview at public.kitware.com" <paraview at public.kitware.com>
> *Subject: *[EXTERNAL] [Paraview] rgb lookup table
>
>
>
> Hi,
>
> I'm stuck with a problem concerning colors assignment to data.
>
> I've a list of 8 tensors (here represented as circular ellipsoids, see
> short vtk file below)
>
> I typically open the file and filter using ("tensor glyph").
>
> Now I would like to assign to each tensor glyph a unique color specified
> by an rgba sequence (e.g. 0.1 0.3 0.2 1)
>
> How can I do that? I tried to append a scalar lookup table followed by a
> rgba one but without success
>
> Thanks
>
>    -Claudio
>
>
>
>
>
> # vtk DataFile Version 3.0
>
> Random data to test tensors
>
> ASCII
>
> DATASET UNSTRUCTURED_GRID
>
> POINTS 8 float
>
> 0 0 0
>
> 1 0 0
>
> 0 1 0
>
> 1 1 0
>
> 0 0 1
>
> 1 0 1
>
> 0 1 1
>
> 1 1 1
>
>
>
> POINT_DATA 8
>
>
>
> TENSORS spherical_ellipsoid float
>
> 1 0 0
>
> 0 1 0
>
> 0 0 1
>
>
>
> 1 0 0
>
> 0 1 0
>
> 0 0 1
>
>
>
> 1 0 0
>
> 0 1 0
>
> 0 0 1
>
>
>
> 1 0 0
>
> 0 1 0
>
> 0 0 1
>
>
>
> 1 0 0
>
> 0 1 0
>
> 0 0 1
>
>
>
> 1 0 0
>
> 0 1 0
>
> 0 0 1
>
>
>
> 1 0 0
>
> 0 1 0
>
> 0 0 1
>
>
>
> 1 0 0
>
> 0 1 0
>
> 0 0 1
>
>
>
> SCALARS sample_scalars float 1
>
> LOOKUP_TABLE rgbtable
>
> 0
>
> 1
>
> 2
>
> 3
>
> 4
>
> 5
>
> 6
>
> 7
>
>
>
> LOOKUP_TABLE rgbtable 8
>
> 0.2 0.4 0.3 1.0
>
> 04.0 2.0 1.0 1.0
>
> 0.4 1.0 0.2 1.0
>
> 1.0 1.0 0.7 1.0
>
> 0.2 0.0 5.0 1.0
>
> 1.0 0.2 1.0 1.0
>
> 2.0 1.0 1.0 1.0
>
> 0.0 1.0 0.9 1.0
>
>
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> ParaView discussion is moving! Please visit
> https://discourse.paraview.org/ for future posts.
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/paraview
>


-- 
Cory Quammen
Staff R&D Engineer
Kitware, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/paraview/attachments/20180613/fda39e25/attachment.html>


More information about the ParaView mailing list