/** Uses a table look-up to map the pixels in this image from min-max to 0-255. */ public void setMinAndMax(double min, double max) { setMinAndMax(min, max, 7); }
/** Uses a table look-up to map the pixels in this image from min-max to 0-255. */ public void setMinAndMax(double min, double max) { setMinAndMax(min, max, 7); }
/** Sets the display range of specified channels in an RGB image, where 4=red, 2=green, 1=blue, 6=red+green, etc. With non-RGB images, this method is identical to setDisplayRange(min, max). This method is used by the Image/Adjust/Color Balance tool . */ public void setDisplayRange(double min, double max, int channels) { if (ip instanceof ColorProcessor) ((ColorProcessor)ip).setMinAndMax(min, max, channels); else ip.setMinAndMax(min, max); }
/** Sets the display range of specified channels in an RGB image, where 4=red, 2=green, 1=blue, 6=red+green, etc. With non-RGB images, this method is identical to setDisplayRange(min, max). This method is used by the Image/Adjust/Color Balance tool . */ public void setDisplayRange(double min, double max, int channels) { if (ip instanceof ColorProcessor) ((ColorProcessor)ip).setMinAndMax(min, max, channels); else ip.setMinAndMax(min, max); }
colorProc.setMinAndMax(globalMin, globalMax, 3);
colorProc.setMinAndMax(globalMin, globalMax, 3);
void applyRGB(ImagePlus imp, ImageProcessor ip) { double min = imp.getDisplayRangeMin(); double max = imp.getDisplayRangeMax(); ip.setRoi(imp.getRoi()); ip.reset(); if (channels!=7) ((ColorProcessor)ip).setMinAndMax(min, max, channels); else ip.setMinAndMax(min, max); ip.reset(ip.getMask()); imp.changes = true; previousImageID = 0; ((ColorProcessor)ip).caSnapshot(false); setup(); if (Recorder.record) { if (Recorder.scriptMode()) Recorder.recordCall("IJ.run(imp, \"Apply LUT\", \"\");"); else Recorder.record("run", "Apply LUT"); } }
void applyRGB(ImagePlus imp, ImageProcessor ip) { double min = imp.getDisplayRangeMin(); double max = imp.getDisplayRangeMax(); ip.setRoi(imp.getRoi()); ip.reset(); if (channels!=7) ((ColorProcessor)ip).setMinAndMax(min, max, channels); else ip.setMinAndMax(min, max); ip.reset(ip.getMask()); imp.changes = true; previousImageID = 0; ((ColorProcessor)ip).caSnapshot(false); setup(); if (Recorder.record) { if (Recorder.scriptMode()) Recorder.recordCall("IJ.run(imp, \"Apply LUT\", \"\");"); else Recorder.record("run", "Apply LUT"); } }
if (mask!=null) ip.snapshot(); if (channels!=7) ((ColorProcessor)ip).setMinAndMax(min, max, channels); else ip.setMinAndMax(min, max);
if (mask!=null) ip.snapshot(); if (channels!=7) ((ColorProcessor)ip).setMinAndMax(min, max, channels); else ip.setMinAndMax(min, max);