/** Assigns a LUT (lookup table) to this image. * @see ij.io.Opener#openLut */ public void setLut(LUT lut) { ImageProcessor ip2 = getProcessor(); if (ip2!=null && lut!=null) { ip2.setLut(lut); setProcessor(ip2); } }
/** Assigns a LUT (lookup table) to this image. * @see ij.io.Opener#openLut */ public void setLut(LUT lut) { ImageProcessor ip2 = getProcessor(); if (ip2!=null && lut!=null) { ip2.setLut(lut); setProcessor(ip2); } }
public synchronized void setChannelLut(LUT table, int channel) { int channels = getNChannels(); if (lut==null) setupLuts(channels); if (channel<1 || channel>lut.length) throw new IllegalArgumentException("Channel out of range"); lut[channel-1] = (LUT)table.clone(); if (getWindow()!=null && channel==getChannel()) getProcessor().setLut(lut[channel-1]); if (cip!=null && cip.length>=channel && cip[channel-1]!=null) cip[channel-1].setLut(lut[channel-1]); else cip = null; customLuts = true; }
public synchronized void setChannelLut(LUT table, int channel) { int channels = getNChannels(); if (lut==null) setupLuts(channels); if (channel<1 || channel>lut.length) throw new IllegalArgumentException("Channel out of range"); lut[channel-1] = (LUT)table.clone(); if (getWindow()!=null && channel==getChannel()) getProcessor().setLut(lut[channel-1]); if (cip!=null && cip.length>=channel && cip[channel-1]!=null) cip[channel-1].setLut(lut[channel-1]); else cip = null; customLuts = true; }
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]); }
private void showMask() { final ImagePlus mask = parser.getMask(); if (!lutChoice.contains("No LUT.")) mask.getProcessor().setLut(ShollUtils .getLut(lutTable)); displayService.createDisplay(mask); }
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]); }
result.setLut(labelImage.getLut()); return result;
/** * Returns a binary image that contains only the largest region. * * @param image * a binary image containing several individual regions * @return a new binary image containing only the largest region from * original image */ public static final ImageProcessor keepLargestRegion(ImageProcessor image) { ImageProcessor labelImage = componentsLabeling(image, 4, 16); ImageProcessor result = binarize(LabelImages.keepLargestLabel(labelImage)); result.setLut(image.getLut()); return result; }
synchronized void setup(int channels, ImageStack stack2) { if (stack2!=null && stack2.getSize()>0 && (stack2.getProcessor(1) instanceof ColorProcessor)) { // RGB? cip = null; lut = null; return; } setupLuts(channels); if (mode==COMPOSITE) { cip = new ImageProcessor[channels]; for (int i=0; i<channels; ++i) { cip[i] = stack2.getProcessor(i+1); cip[i].setLut(lut[i]); } currentSlice = currentFrame = 1; } }
synchronized void setup(int channels, ImageStack stack2) { if (stack2!=null && stack2.getSize()>0 && (stack2.getProcessor(1) instanceof ColorProcessor)) { // RGB? cip = null; lut = null; return; } setupLuts(channels); if (mode==COMPOSITE) { cip = new ImageProcessor[channels]; for (int i=0; i<channels; ++i) { cip[i] = stack2.getProcessor(i+1); cip[i].setLut(lut[i]); } currentSlice = currentFrame = 1; } }
/** * Returns a binary image in which the largest region has been replaced by * the background value. * * @param image * a binary image containing several individual particles * @return a new binary image containing all the regions from original image * but the largest one */ public static final ImageProcessor removeLargestRegion(ImageProcessor image) { ImageProcessor labelImage = componentsLabeling(image, 4, 16); LabelImages.removeLargestLabel(labelImage); ImageProcessor result = binarize(labelImage); result.setLut(image.getLut()); return result; }
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(); }
lines.setLut( LUT.createLutFromColor( Color.red ) ); roi = new ImageRoi( 0, 0, lines ); roi.setZeroTransparent( true );
lines.setLut( LUT.createLutFromColor( Color.red ) ); roi = new ImageRoi( 0, 0, lines ); roi.setZeroTransparent( true );
@Override public void run(ImageProcessor image) { // Create structuring element of the given size Strel strel = shape.fromRadius(radius); // add some listeners DefaultAlgoListener.monitor(strel); // Eventually display the structuring element used for processing if (showStrel) { showStrelImage(strel); } // Execute core of the plugin on the original image result = op.apply(this.baseImage, strel); if (!(result instanceof ColorProcessor)) result.setLut(this.baseImage.getLut()); if (previewing) { // Fill up the values of original image with values of the result for (int i = 0; i < image.getPixelCount(); i++) { image.setf(i, result.getf(i)); } image.resetMinAndMax(); } }
ImageProcessor result = Reconstruction.killBorders(image); if (!(result instanceof ColorProcessor)) result.setLut(image.getLut()); resultPlus = new ImagePlus(newName, result);
updateAndRepaintWindow(); } else if (lut!=null) { getProcessor().setLut(lut); updateAndRepaintWindow();
updateAndRepaintWindow(); } else if (lut!=null) { getProcessor().setLut(lut); updateAndRepaintWindow();