Which filter to use to convert from 16 bit image to 8 bit Image

Sort of having a brain fart today but what is the ITK Filter I am looking for that would change from a 16 bit image to an 8 bit image? is that a simple ITKImageCast? I feel like that isn’t correct because if I have values greater than 255 there would be an issue. I need a filter that actually rescales the data into the range of the target byte sizes before the cast down to the new type.

Thanks

Hello @imikejackson,

RescaleIntensity or IntensityWindowing with the target range being [0,255] followed by CastImage. Depends on whether you want to map the whole original range into 256 values or just a subrange of the original values.

2 Likes