# vtkThreshold get extremes

**URL:** https://discourse.vtk.org/t/vtkthreshold-get-extremes/9445
**Category:** Support
**Created:** [September 24, 2022, 12:54pm UTC](https://discourse.vtk.org/t/vtkthreshold-get-extremes/9445 "2022-09-24T12:54:47Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![gbene](https://discourse.vtk.org/user_avatar/discourse.vtk.org/gbene/32/5746_2.png) [@gbene](https://discourse.vtk.org/u/gbene)
#### Post date: [September 24, 2022, 12:54pm UTC](https://discourse.vtk.org/t/vtkthreshold-get-extremes/9445/1 "2022-09-24T12:54:47Z")

</div>

Hi!  
I was wandering if there was a simple way to use ThresholdBetween for vtkThreshold to get the part of the object thesholded away (like GenerateClippedOutputOn for vtkClipPolyData).

This could be achieved with a combination of ThresholdByUpper and ThresholdByLower but if there is a simpler option I would prefer it since I need to filter different scalars along a chain and it becomes messy pretty quickly (e.g. Red colour values → Blue colour values → Green colour values).

Thanks!

---

<div class="post-metadata">

### Author: ![Christos\_Tsolakis](https://discourse.vtk.org/user_avatar/discourse.vtk.org/christos_tsolakis/32/2076_2.png) [@Christos\_Tsolakis](https://discourse.vtk.org/u/Christos_Tsolakis)
#### Post date: [September 24, 2022, 11:22pm UTC](https://discourse.vtk.org/t/vtkthreshold-get-extremes/9445/2 "2022-09-24T23:22:45Z")

</div>

You can try setting the limits with `ThreholdBetween` and check the `Invert` option to select everything outside the range .

---

<div class="post-metadata">

### Author: ![gbene](https://discourse.vtk.org/user_avatar/discourse.vtk.org/gbene/32/5746_2.png) [@gbene](https://discourse.vtk.org/u/gbene)
#### Post date: [September 25, 2022, 8:04am UTC](https://discourse.vtk.org/t/vtkthreshold-get-extremes/9445/3 "2022-09-25T08:04:28Z")

</div>

Ah yes thank you, I must have missed It. And for vtkThresholdPoints? It doesn’t seem to have any invert option for some reason.

Thanks again!
