# DataSetmapper + LookupTable : hide range

**URL:** https://discourse.vtk.org/t/datasetmapper-lookuptable-hide-range/8345
**Category:** Support
**Created:** [April 21, 2022, 10:19am UTC](https://discourse.vtk.org/t/datasetmapper-lookuptable-hide-range/8345 "2022-04-21T10:19:35Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Olivier](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/o/d2c977/32.png) [@Olivier](https://discourse.vtk.org/u/Olivier)
#### Post date: [April 21, 2022, 10:19am UTC](https://discourse.vtk.org/t/datasetmapper-lookuptable-hide-range/8345/1 "2022-04-21T10:19:35Z")

</div>

Hi friends,

I have a vtkUnstructuredGrid containing triangles and points data as scalars.  
I’m displaying it with a vtkDataSetMapper linked to a vtkLookupTable.

Here is the resulting display :

 ![Range full](https://discourse.vtk.org/uploads/default/original/2X/c/c3320962eccca2df3e771110b0aa68185aa762cd.jpeg)

Now what I want to do is “clip” this display, to hide values that are outside of a given values range.  
Obviously I can use :  
vtkLookupTable SetTableRange(min, max)  
UseBelowRangeColor(true)  
SetBelowRangeColor(1, 1, 1, 0)  
UseAboveRangeColor(true)  
SetAboveRangeColor(1, 1, 1, 0)

Here is the result :

 ![Range not full](https://discourse.vtk.org/uploads/default/original/2X/4/4d2bd6f63c37ca04f6271f7f60d6a6de2eeac364.jpeg)

Has you can see, the values above MAX are hidden.  
But the entire ColorMap has been offseted, giving colors that are different from the 1rst shoot !  
What I want is preserving the initial colors (ie. from the full ranged LookupTable) , but hiding out of range values.

Any clue ?  
Thanks !

---

<div class="post-metadata">

### Author: ![Olivier](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/o/d2c977/32.png) [@Olivier](https://discourse.vtk.org/u/Olivier)
#### Post date: [April 21, 2022, 10:25am UTC](https://discourse.vtk.org/t/datasetmapper-lookuptable-hide-range/8345/2 "2022-04-21T10:25:48Z")

</div>

Of course I could do that geometrically with a double vtkClipDataSet (one for Min on for Max), but this would be totally overkill !
