Casting images

What is the difference between RescaleIntensityImageFilter and CastImageFilter classes?

If input image is of type short, and has these pixels: 0 2 -1 300. Let’s consider the interesting case of output pixel type being unsigned char.

Cast filter would produce: 0 2 255 44. Rescale filter with default parameters would produce: 0 1 0 255 (assuming rounding down).

1 Like