public RotatedRectRoi(int sx, int sy, ImagePlus imp) { super(sx, sy, imp); type = FREEROI; xstart = ic.offScreenXD(sx); ystart = ic.offScreenYD(sy); ImageWindow win = imp.getWindow(); int pixels = win!=null?(int)(win.getSize().height/win.getCanvas().getMagnification()):imp.getHeight(); if (IJ.debugMode) IJ.log("RotatedRectRoi: "+(int)rectWidth+" "+pixels); if (rectWidth>pixels) rectWidth = pixels/3; setDrawOffset(false); bounds = null; }
public RotatedRectRoi(int sx, int sy, ImagePlus imp) { super(sx, sy, imp); type = FREEROI; xstart = ic.offScreenXD(sx); ystart = ic.offScreenYD(sy); ImageWindow win = imp.getWindow(); int pixels = win!=null?(int)(win.getSize().height/win.getCanvas().getMagnification()):imp.getHeight(); if (IJ.debugMode) IJ.log("RotatedRectRoi: "+(int)rectWidth+" "+pixels); if (rectWidth>pixels) rectWidth = pixels/3; setDrawOffset(false); bounds = null; }
if (win==null) continue; Dimension d = win.getSize(); if (i==0) { xstep = (int)(d.width*0.8);
if (win==null) continue; Dimension d = win.getSize(); if (i==0) { xstep = (int)(d.width*0.8);
void getLocationAndSize() { Variable v1 = getFirstVariable(); Variable v2 = getNextVariable(); Variable v3 = getNextVariable(); Variable v4 = getLastVariable(); ImagePlus imp = getImage(); int x=0, y=0, w=0, h=0; ImageWindow win = imp.getWindow(); if (win!=null) { Point loc = win.getLocation(); Dimension size = win.getSize(); x=loc.x; y=loc.y; w=size.width; h=size.height; } v1.setValue(x); v2.setValue(y); v3.setValue(w); v4.setValue(h); }
void getLocationAndSize() { Variable v1 = getFirstVariable(); Variable v2 = getNextVariable(); Variable v3 = getNextVariable(); Variable v4 = getLastVariable(); ImagePlus imp = getImage(); int x=0, y=0, w=0, h=0; ImageWindow win = imp.getWindow(); if (win!=null) { Point loc = win.getLocation(); Dimension size = win.getSize(); x=loc.x; y=loc.y; w=size.width; h=size.height; } v1.setValue(x); v2.setValue(y); v3.setValue(w); v4.setValue(h); }
private void initiateLocation() { mtrackj.window().getSize(curwindim);