This VI does only what the 16 bit display mapping function does (exept that there is an error made in this VI). The included 16 bit image is not full 16 bit (min = 176, max = 4095, only 15 bits are used). In attachment I included for you a full 16 bit image (values from 0 -> 65536) Imaq will read this as values ranging from -32768 -> 32767.
If you open this Image with the VI you suggested you will get a full black 8 bit image. The original image is a gray gradient from black to white.
The error in this VI is that the casting to I32 has to be done before you use the max-min function.
Otherwise you get 32767 -(-32768) = -1 because you have an overflow with I16.
This VI is not a solution because we have to analyze full 16 bit images for
there real gray values.
So if we convert the image to 8 bit we loose information. So if we take a line profile or a histogram it is difficult to use if the image is full 16 bit.
I can not understand why a signed data type is used for images. Images don't have negative values.
This is not the first time I mentioned this. I hope that NI understands the problem.