public double getDisplayRangeMin() { if (lut!=null) return lut[getChannelIndex()].min; else return 0.0; }
public double getDisplayRangeMax() { if (lut!=null) return lut[getChannelIndex()].max; else return 255.0; }
public double getDisplayRangeMax() { if (lut!=null) return lut[getChannelIndex()].max; else return 255.0; }
public LUT getChannelLut() { int c = getChannelIndex(); return lut[c]; }
public LUT getChannelLut() { int c = getChannelIndex(); return lut[c]; }
public double getDisplayRangeMin() { if (lut!=null) return lut[getChannelIndex()].min; else return 0.0; }
public void setDisplayRange(double min, double max) { ip.setMinAndMax(min, max); int c = getChannelIndex(); lut[c].min = min; lut[c].max = max; if (getWindow()==null && cip!=null && c<cip.length) cip[c].setLut(lut[c]); }
public void setDisplayRange(double min, double max) { ip.setMinAndMax(min, max); int c = getChannelIndex(); lut[c].min = min; lut[c].max = max; if (getWindow()==null && cip!=null && c<cip.length) cip[c].setLut(lut[c]); }
public Color getChannelColor() { if (lut==null || mode==GRAYSCALE) return Color.black; IndexColorModel cm = lut[getChannelIndex()]; if (cm==null) return Color.black; int index = cm.getMapSize() - 1; int r = cm.getRed(index); int g = cm.getGreen(index); int b = cm.getBlue(index); //IJ.log(index+" "+r+" "+g+" "+b); if (r<100 || g<100 || b<100) return new Color(r, g, b); else return Color.black; }
public Color getChannelColor() { if (lut==null || mode==GRAYSCALE) return Color.black; IndexColorModel cm = lut[getChannelIndex()]; if (cm==null) return Color.black; int index = cm.getMapSize() - 1; int r = cm.getRed(index); int g = cm.getGreen(index); int b = cm.getBlue(index); //IJ.log(index+" "+r+" "+g+" "+b); if (r<100 || g<100 || b<100) return new Color(r, g, b); else return Color.black; }
public void setChannelLut(LUT table) { int c = getChannelIndex(); double min = lut[c].min; double max = lut[c].max; lut[c] = table; lut[c].min = min; lut[c].max = max; if (mode==COMPOSITE && cip!=null && c<cip.length) { cip[c].setColorModel(lut[c] ); imageSource = null; newPixels = true; img = null; } currentChannel = -1; getProcessor().setLut(table); customLuts = true; if (!IJ.isMacro()) ContrastAdjuster.update(); }
public void setChannelLut(LUT table) { int c = getChannelIndex(); double min = lut[c].min; double max = lut[c].max; lut[c] = table; lut[c].min = min; lut[c].max = max; if (mode==COMPOSITE && cip!=null && c<cip.length) { cip[c].setColorModel(lut[c] ); imageSource = null; newPixels = true; img = null; } currentChannel = -1; getProcessor().setLut(table); customLuts = true; if (!IJ.isMacro()) ContrastAdjuster.update(); }
public void resetDisplayRange() { if (getType()==GRAY16 && getDefault16bitRange()!=0) { int defaultRange = getDefault16bitRange(); for (int i=1; i<=getNChannels(); i++) { LUT lut = getChannelLut(i); lut.min = 0; lut.max = Math.pow(2,defaultRange)-1; if (getWindow()!=null) setChannelLut(lut, i); } } else { ip.resetMinAndMax(); int c = getChannelIndex(); lut[c].min = ip.getMin(); lut[c].max = ip.getMax(); } }
public void resetDisplayRange() { if (getType()==GRAY16 && getDefault16bitRange()!=0) { int defaultRange = getDefault16bitRange(); for (int i=1; i<=getNChannels(); i++) { LUT lut = getChannelLut(i); lut.min = 0; lut.max = Math.pow(2,defaultRange)-1; if (getWindow()!=null) setChannelLut(lut, i); } } else { ip.resetMinAndMax(); int c = getChannelIndex(); lut[c].min = ip.getMin(); lut[c].max = ip.getMax(); } }