Set global min/max according to pixel type. (see #11840)
If invalid interval set it to range wrt pixels type
Merge pull request #1902 from jburel/viewer-issue

Set global min/max according to pixel type. (see #11840)