public static void registerCloseListener() { ImagePlus.addImageListener(new ImageListener() { @Override public void imageOpened(ImagePlus image) {} @Override public void imageUpdated(ImagePlus image) {} @Override public void imageClosed(ImagePlus image) { run(); } }); }
public SliceMonitor(ImagePlus ip){ this.ip = ip; ImagePlus.addImageListener(this); }
public RoiMonitor(ImagePlus ip){ this.ip = ip; ImagePlus.addImageListener(this); thread = new Thread(this); thread.start(); }
private void createListeners() { if (srcImp==null) return; ImagePlus.addImageListener(this); Roi.addRoiListener(this); if (live!=null) { Font font = live.getFont(); live.setFont(new Font(font.getName(), Font.BOLD, font.getSize())); live.setForeground(Color.red); } }
private void createListeners() { if (srcImp==null) return; ImagePlus.addImageListener(this); Roi.addRoiListener(this); if (live!=null) { Font font = live.getFont(); live.setFont(new Font(font.getName(), Font.BOLD, font.getSize())); live.setForeground(Color.red); } }
public IepGui() { super(); initImageList(); initGUI(); addWindowListener( this ); addImageBox(); jButtonMinus.setEnabled( false ); jTextAreaInfo.setText( MESSAGES[ 0 ] ); jTextAreaInfo.setCaretPosition( 0 ); ImagePlus.addImageListener( this ); }
private void enableLivePlot() { if (plotMaker==null) plotMaker = plot!=null?plot.getPlotMaker():null; if (plotMaker==null) return; srcImp = plotMaker.getSourceImage(); if (srcImp==null) return; if (bgThread==null) { bgThread = new Thread(this, "Live Plot"); bgThread.setPriority(Math.max(bgThread.getPriority()-3, Thread.MIN_PRIORITY)); doUpdate = true; bgThread.start(); } if (IJ.debugMode) IJ.log("PlotWindow.createListeners"); ImagePlus.addImageListener(this); Roi.addRoiListener(this); Font font = live.getFont(); live.setFont(new Font(font.getName(), Font.BOLD, font.getSize())); live.setForeground(Color.red); }
public CurrentSlice() { ImagePlus.addImageListener(this); handleImages(true); check(WindowManager.getCurrentImage()); }
private void enableLivePlot() { if (plotMaker==null) plotMaker = plot!=null?plot.getPlotMaker():null; if (plotMaker==null) return; srcImp = plotMaker.getSourceImage(); if (srcImp==null) return; if (bgThread==null) { bgThread = new Thread(this, "Live Plot"); bgThread.setPriority(Math.max(bgThread.getPriority()-3, Thread.MIN_PRIORITY)); doUpdate = true; bgThread.start(); } if (IJ.debugMode) IJ.log("PlotWindow.createListeners"); ImagePlus.addImageListener(this); Roi.addRoiListener(this); Font font = live.getFont(); live.setFont(new Font(font.getName(), Font.BOLD, font.getSize())); live.setForeground(Color.red); }
private void addImageListeners() { imp.addImageListener(this); ImageWindow win = imp.getWindow(); if (win == null) close(); canvas = win.getCanvas(); canvas.addKeyListener(this); }
public void run(String arg) { IJ.addEventListener(this); Executer.addCommandListener(this); ImagePlus.addImageListener(this); Roi.addRoiListener(this); IJ.log("EventListener started"); }
public void run(String arg) { IJ.addEventListener(this); Executer.addCommandListener(this); ImagePlus.addImageListener(this); Roi.addRoiListener(this); IJ.log("EventListener started"); }
protected void register() { ImagePlus.addImageListener(this); notifyIfChanged(); if (window == null) return; window.addMouseWheelListener(this); for (Component child : window.getComponents()) if (child instanceof Scrollbar) ((Scrollbar)child).addAdjustmentListener(this); else if (child instanceof Container) for (Component child2 : ((Container)child).getComponents()) if (child2 instanceof Scrollbar) ((Scrollbar)child2).addAdjustmentListener(this); }
private void addImageListeners() { imp.addImageListener(this); ImageWindow win = imp.getWindow(); if (win == null) close(); canvas = win.getCanvas(); canvas.addKeyListener(this); }
private void createListeners() { //IJ.log("createListeners"); if(srcImp == null) { return; } ImageCanvas canvas = srcImp.getCanvas(); if(canvas == null) { return; } canvas.addMouseListener(this); canvas.addMouseMotionListener(this); canvas.addKeyListener(this); ImagePlus.addImageListener(this); Font font = live.getFont(); live.setFont(new Font(font.getName(), Font.BOLD, font.getSize())); live.setForeground(Color.red); }
public SegmentationViewerCanvas(ImagePlus imp) { super(imp); label_colors = new Color[256]; w=imp.getWidth(); h=imp.getHeight(); d=imp.getStack().getSize(); contours=new Vector[d]; colors=new Vector[d]; indices=new Vector[d]; ImagePlus.addImageListener(new ImageListener() { public void imageOpened(ImagePlus imp) { } public void imageClosed(ImagePlus imp) { } public void imageUpdated(ImagePlus imp) { if (imp == labels) setLabels(labels); } }); }
protected void registerTool() { int[] ids = WindowManager.getIDList(); if (ids != null) for (int id : ids) registerTool(WindowManager.getImage(id)); if (toolbarMouseListener != null) toolbar.addMouseListener(toolbarMouseListener); ImagePlus.addImageListener(this); IJ.getInstance().addWindowFocusListener(this); }
private void addListeners(ImageCanvas canvas) { canvas.addMouseListener(this); canvas.addMouseMotionListener(this); canvas.addKeyListener(this); win.addWindowListener (this); win.addMouseWheelListener(this); win.addFocusListener(this); ImagePlus.addImageListener(this); Executer.addCommandListener(this); }
private void addListeners(ImageCanvas canvas) { canvas.addMouseListener(this); canvas.addMouseMotionListener(this); canvas.addKeyListener(this); win.addWindowListener (this); win.addMouseWheelListener(this); win.addFocusListener(this); ImagePlus.addImageListener(this); Executer.addCommandListener(this); }
@Override public void run(ImageProcessor ip) { if(imp.getStackSize() > 1 || !isPow2(imp.getWidth()) || !isPow2(imp.getHeight())) { IJ.error("Only one slice allowed, whose dimensions must" + " be a power of 2"); return; } bImage = createImage(); univ = new Image3DUniverse(); BranchGroup bg = new BranchGroup(); bg.addChild(createShape()); bg.compile(); univ.getScene().addChild(bg); univ.show(); univ.getCanvas().addMouseListener(this); univ.getCanvas().addMouseMotionListener(this); updater = new ImageUpdater(); ImagePlus.addImageListener(this); imp.show(); }