One way is to create a custom lookup table. You can create a for loop that loops 256 times, and wire the index out to create your lookup table. With no modifications, this is a straight linear mapping - everything stays the same. You can modify the value of the index as you create the lookup table, though. For example, replace all values less than 100 with 0 and all values greater than 200 with 255. When you apply the lookup table, the resulting image will be what you want. One big advantage of this method is that once you create the lookup table, you can apply it to multiple images.
Bruce
Bruce Ammons
Ammons Engineering