double max = dd.windowCenter+dd.windowWidth/2;
if (Prefs.openDicomsAsFloat) {
min -= dd.rescaleIntercept;
max -= dd.rescaleIntercept;
} else {
Calibration cal = imp.getCalibration();
min = cal.getRawValue(min);
max = cal.getRawValue(max);
}
ip.setMinAndMax(min, max);
if (IJ.debugMode) IJ.log("window: "+min+"-"+max);
}
if (imp.getStackSize()>1)