/** Restore image outside non-rectangular roi. */ void doMasking(ImagePlus imp, ImageProcessor ip) { ImageProcessor mask = imp.getMask(); if (mask!=null) ip.reset(mask); }
protected void toggleLogarithmic(boolean enabled) { if (imp == null) return; ImageProcessor ip = imp.getProcessor(); if (enabled) { ip.snapshot(); ip.log(); ip.resetMinAndMax(); } else ip.reset(); imagePanel.repaint(); }
public void reset() { record("reset"); proc.reset(); }
public void reset(ImageProcessor mask) { record("reset", mask, ImageProcessor.class); proc.reset(mask); }
/** Restore image outside non-rectangular roi. */ void doMasking(ImagePlus imp, ImageProcessor ip) { ImageProcessor mask = imp.getMask(); if (mask!=null) ip.reset(mask); }
public void reset(ImageProcessor mask) { record("reset", mask, ImageProcessor.class); proc.reset(mask); }
public void reset() { record("reset"); proc.reset(); }
public void abortPaste() { clipboard = null; imp.getProcessor().reset(); imp.updateAndDraw(); }
public void run(ImageProcessor ip) { rank(ip, radius, filterType, whichOutliers, (float)threshold); if (IJ.escapePressed()) // interrupted by user? ip.reset(); }
public void abortPaste() { clipboard = null; imp.getProcessor().reset(); imp.updateAndDraw(); }
@Override public void update(MinMaxData m) { // Transform min and max from slider values to image values double[] mm = toImage(m.min, m.max); transformed.reset(); transformed.setMinAndMax(mm[0], mm[1]); super.transformedImage = makeImage(null, super.mask); } }
public void run(ImageProcessor ip) { rank(ip, radius, filterType, whichOutliers, (float)threshold); if (IJ.escapePressed()) // interrupted by user? ip.reset(); }
void doIterations (ImageProcessor ip, String mode) { if (escapePressed) return; if (!previewing && iterations>1) IJ.showStatus(arg+"... press ESC to cancel"); for (int i=0; i<iterations; i++) { if (Thread.currentThread().isInterrupted()) return; if (IJ.escapePressed()) { escapePressed = true; ip.reset(); return; } if (mode.equals("erode")) ((ByteProcessor)ip).erode(count, background); else ((ByteProcessor)ip).dilate(count, background); } }
void applyTable(ImageProcessor ip, int[] lut) { if (updateSelectionOnly) { ImageProcessor mask = ip.getMask(); if (mask!=null) ip.snapshot(); ip.applyTable(lut); if (mask!=null) ip.reset(mask); } else ip.applyTable(lut); }
void applyTable(ImageProcessor ip, int[] lut) { if (updateSelectionOnly) { ImageProcessor mask = ip.getMask(); if (mask!=null) ip.snapshot(); ip.applyTable(lut); if (mask!=null) ip.reset(mask); } else ip.applyTable(lut); }
void updateScalebar() { updateLocation(); imp.getProcessor().reset(); if (createOverlay) { if (drawnScaleBar) { imp.updateAndDraw(); drawnScaleBar = false; } createOverlay(imp); } else { if (showingOverlay) { imp.setOverlay(null); showingOverlay = false; } drawScaleBar(imp); } }
/** Restore image outside non-rectangular roi. */ void doMasking(ImagePlus imp, ImageProcessor ip) { ImageProcessor mask = imp.getMask(); if (mask!=null) { Rectangle r = ip.getRoi(); if (mask.getWidth()!=r.width||mask.getHeight()!=r.height) { ip.setRoi(imp.getRoi()); mask = ip.getMask(); } ip.reset(mask); } }
/** Restore image outside non-rectangular roi. */ void doMasking(ImagePlus imp, ImageProcessor ip) { ImageProcessor mask = imp.getMask(); if (mask!=null) { Rectangle r = ip.getRoi(); if (mask.getWidth()!=r.width||mask.getHeight()!=r.height) { ip.setRoi(imp.getRoi()); mask = ip.getMask(); } ip.reset(mask); } }
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 updateScalebar() { updateLocation(); imp.getProcessor().reset(); if (createOverlay) { if (drawnScaleBar) { imp.updateAndDraw(); drawnScaleBar = false; } createOverlay(imp); } else { if (showingOverlay) { imp.setOverlay(null); showingOverlay = false; } drawScaleBar(imp); } }