void zoom(int sx, int sy, double zoomFactor) {//n__ if (plot == null || plot.isFrozen()) { if (zoomFactor > 1) super.zoomIn(sx, sy); else super.zoomOut(sx, sy); return; } plot.zoom(sx, sy, zoomFactor); }
void zoom(int sx, int sy, double zoomFactor) {//n__ if (plot == null || plot.isFrozen()) { if (zoomFactor > 1) super.zoomIn(sx, sy); else super.zoomOut(sx, sy); return; } plot.zoom(sx, sy, zoomFactor); }
public void realZoom( boolean in, int x, int y ) { if( in ) super.zoomIn(screenX(x),screenY(y)); else super.zoomOut(screenX(x),screenY(y)); }
public static void main( final String[] args ) { ImageJ.main( args ); final File file = new File( "/Users/tinevez/Google Drive/Projects/Contacts/raw data/2015-09-17/Trackmate files/SiC + SAg2_1_20_BCells.xml" ); final LoadTrackMatePlugIn_ loader = new LoadTrackMatePlugIn_(); loader.run( file.getAbsolutePath() ); loader.getSettings().imp.setDisplayMode( IJ.GRAYSCALE ); loader.getSettings().imp.getCanvas().zoomIn( 50, 50 ); loader.getSettings().imp.getCanvas().zoomIn( 50, 50 ); loader.getSettings().imp.getCanvas().zoomIn( 50, 50 ); loader.getSettings().imp.getCanvas().zoomIn( 50, 50 ); loader.getSettings().imp.getCanvas().zoomIn( 50, 50 ); for ( final TrackMateModelView view : loader.getController().getGuimodel().getViews() ) { view.setDisplaySettings( TrackMateModelView.KEY_TRACK_DISPLAY_DEPTH, 100 ); view.setDisplaySettings( TrackMateModelView.KEY_TRACK_DISPLAY_MODE, TrackMateModelView.TRACK_DISPLAY_MODE_LOCAL_BACKWARD ); } final TrackMate trackmate = loader.getController().getPlugin(); new CaptureOverlayAction( loader.getController().getGUI() ).execute( trackmate ); } }
private void zoomin(final int cx, final int cy) { mtrackj.log("Zooming in..."); mtrackj.canvas().zoomIn(cx,cy); getcoords(new MouseEvent(mtrackj.canvas(),0,0,0,cx,cy,0,false)); mtrackj.logok(); }
int y = ic.screenY(crossLoc.y); if (command.equals("In")) { ic.zoomIn(x, y); if (ic.getMagnification()<=1.0) imp.repaintWindow(); } else {
int y = ic.screenY(crossLoc.y); if (command.equals("In")) { ic.zoomIn(x, y); if (ic.getMagnification()<=1.0) imp.repaintWindow(); } else {
if (ic!=cic) { if ("In [+]".equals(command)) ic.zoomIn(sx, sy); else ic.zoomOut(sx, sy);
if (ic!=cic) { if ("In [+]".equals(command)) ic.zoomIn(sx, sy); else ic.zoomOut(sx, sy);
int y = ic.screenY(loc.y); if (arg.equals("in")) { ic.zoomIn(x, y); if (ic.getMagnification()<=1.0) imp.repaintWindow(); } else if (arg.equals("out")) {
/** Implements the Image/Zoom/View 100% command. */ public void zoom100Percent() { if (magnification==1.0) return; double imag = imp.getWindow().getInitialMagnification(); if (magnification!=imag) unzoom(); if (magnification==1.0) return; if (magnification<1.0) { while (magnification<1.0) zoomIn(imageWidth/2, imageHeight/2); } else if (magnification>1.0) { while (magnification>1.0) zoomOut(imageWidth/2, imageHeight/2); } else return; int x=xMouse, y=yMouse; if (mouseExited) { x = imageWidth/2; y = imageHeight/2; } int sx = screenX(x); int sy = screenY(y); adjustSourceRect(1.0, sx, sy); repaint(); }
/** Implements the Image/Zoom/View 100% command. */ public void zoom100Percent() { if (magnification==1.0) return; double imag = imp.getWindow().getInitialMagnification(); if (magnification!=imag) unzoom(); if (magnification==1.0) return; if (magnification<1.0) { while (magnification<1.0) zoomIn(imageWidth/2, imageHeight/2); } else if (magnification>1.0) { while (magnification>1.0) zoomOut(imageWidth/2, imageHeight/2); } else return; int x=xMouse, y=yMouse; if (mouseExited) { x = imageWidth/2; y = imageHeight/2; } int sx = screenX(x); int sy = screenY(y); adjustSourceRect(1.0, sx, sy); repaint(); }
int y = ic.screenY(loc.y); if (rotation<0) ic.zoomIn(x,y); else ic.zoomOut(x,y);
int y = ic.screenY(loc.y); if (rotation<0) ic.zoomIn(x,y); else ic.zoomOut(x,y);
/** Overrides ImagePlus.show(). */ public void show() { img = ip.createImage(); ImageCanvas ic = new PlotsCanvas(this); win = new ImageWindow(this, ic); IJ.showStatus(""); if (ic.getMagnification()==1.0) return; while(ic.getMagnification()<1.0) ic.zoomIn(0,0); Point loc = win.getLocation(); int w = getWidth()+20; int h = getHeight()+30; Dimension screen = IJ.getScreenSize(); if (loc.x+w>screen.width) w = screen.width-loc.x-20; if (loc.y+h>screen.height) h = screen.height-loc.y-30; win.setSize(w, h); win.validate(); repaintWindow(); }
if (flipXZ) zcoord=(int)(arat*(imp.getNSlices()-z)); while (xz_mag<magnification) { xz_ic.zoomIn(xz_ic.screenX(x), xz_ic.screenY(zcoord)); xz_mag = xz_ic.getMagnification(); zcoord = (int)(arat*z); while (yz_mag<magnification) { yz_ic.zoomIn(yz_ic.screenX(zcoord), yz_ic.screenY(y)); yz_mag = yz_ic.getMagnification();
/** Overrides ImagePlus.show(). */ public void show() { img = ip.createImage(); ImageCanvas ic = new PlotsCanvas(this); win = new ImageWindow(this, ic); IJ.showStatus(""); if (ic.getMagnification()==1.0) return; while(ic.getMagnification()<1.0) ic.zoomIn(0,0); Point loc = win.getLocation(); int w = getWidth()+20; int h = getHeight()+30; Dimension screen = IJ.getScreenSize(); if (loc.x+w>screen.width) w = screen.width-loc.x-20; if (loc.y+h>screen.height) h = screen.height-loc.y-30; win.setSize(w, h); win.validate(); repaintWindow(); }
if (flipXZ) zcoord=(int)(arat*(imp.getNSlices()-z)); while (xz_mag<magnification) { xz_ic.zoomIn(xz_ic.screenX(x), xz_ic.screenY(zcoord)); xz_mag = xz_ic.getMagnification(); zcoord = (int)(arat*z); while (yz_mag<magnification) { yz_ic.zoomIn(yz_ic.screenX(zcoord), yz_ic.screenY(y)); yz_mag = yz_ic.getMagnification();
void zoomToSelection(ImagePlus imp, ImageCanvas ic) { Roi roi = imp.getRoi(); ic.unzoom(); if (roi==null) return; Rectangle w = imp.getWindow().getBounds(); Rectangle r = roi.getBounds(); double mag = ic.getMagnification(); int marginw = (int)((w.width - mag * imp.getWidth())); int marginh = (int)((w.height - mag * imp.getHeight())); int x = r.x+r.width/2; int y = r.y+r.height/2; mag = ic.getHigherZoomLevel(mag); while(r.width*mag<w.width - marginw && r.height*mag<w.height - marginh) { ic.zoomIn(ic.screenX(x), ic.screenY(y)); double cmag = ic.getMagnification(); if (cmag==32.0) break; mag = ic.getHigherZoomLevel(cmag); w = imp.getWindow().getBounds(); } }
void zoomToSelection(ImagePlus imp, ImageCanvas ic) { Roi roi = imp.getRoi(); ic.unzoom(); if (roi==null) return; Rectangle w = imp.getWindow().getBounds(); Rectangle r = roi.getBounds(); double mag = ic.getMagnification(); int marginw = (int)((w.width - mag * imp.getWidth())); int marginh = (int)((w.height - mag * imp.getHeight())); int x = r.x+r.width/2; int y = r.y+r.height/2; mag = ic.getHigherZoomLevel(mag); while(r.width*mag<w.width - marginw && r.height*mag<w.height - marginh) { ic.zoomIn(ic.screenX(x), ic.screenY(y)); double cmag = ic.getMagnification(); if (cmag==32.0) break; mag = ic.getHigherZoomLevel(cmag); w = imp.getWindow().getBounds(); } }