help > RE: Range (i.e. Darkest and Brightest values) are not correct when loading a .nii file
Oct 7, 2020  05:10 AM | Chris Rorden
RE: Range (i.e. Darkest and Brightest values) are not correct when loading a .nii file
This is a feature. MRIcroGL will clip values below the "Darkest" value and above the "Brightest" value, and linearly scale the intensity between these two values. This like adjusting the contrast and brightness of an image, or in radiological terms the "Window Center" and "Window Width". Setting the minimum for the darkest value in the image and the maximum to the brightest value in the image is typically a bad choice, as it it wildly impacted by outliers. The initial values are set to the "robust intensity range", which minimizes the impact of outliers. This provides much better contrast, brightness for typical images. If you want to override this behavior to use any arbitrary value, simply set the cal_min and cal_max values of your NIfTI header to the values you prefer.

As an aside, on Linux and MacOS if you launch MRIcroGL from the command line, it will report both the full image intensity range and the robust image intensity range to the terminal. For example, with the spmMotor image that comes with the software, the full range is -6.86..+12.1, but the robust range is -1.58..2.976:

int16 range -6.8623576164245605...12.15650463104248
int16 window -1.5804531574249268...2.9761490821838379

Threaded View

TitleAuthorDate
makis Oct 6, 2020
RE: Range (i.e. Darkest and Brightest values) are not correct when loading a .nii file
Chris Rorden Oct 7, 2020
makis Oct 7, 2020
Chris Rorden Oct 7, 2020