public int checkResolution(final Canvas3D canvas, final Transform3D volToIP) { for (int i = 0; i < this.corners.length; ++i) volumePointInCanvas(canvas, volToIP, this.corners[i], this.cornersInCanvas[i]); if (outsideCanvas(canvas)) return OUTSIDE_CANVAS; double d2 = this.cornersInCanvas[0].distance(this.cornersInCanvas[7]); double d1 = this.cornersInCanvas[1].distance(this.cornersInCanvas[6]); if (d1 > d2) d2 = d1; d1 = this.cornersInCanvas[2].distance(this.cornersInCanvas[5]); if (d1 > d2) d2 = d1; d1 = this.cornersInCanvas[3].distance(this.cornersInCanvas[4]); if (d1 > d2) d2 = d1; return ((d2 <= RES_THRESHOLD) ? RESOLUTION_SUFFICIENT : RESOLUTION_UNSUFFICIENT); }
/** * Projects the specified point from image plate coordinates * into AWT pixel coordinates. The AWT pixel coordinates are * copied into the object provided. * @param imagePlatePoint the position in * physical image plate coordinates (relative to the lower-left * corner of the screen). * @param pixelLocation the object that will receive the coordinates * of the pixel relative to the upper-left hand corner of the window. * * @since Java 3D 1.2 */ // TODO: Document -- This transform the pixel location from the left image plate. public void getPixelLocationFromImagePlate(Point3d imagePlatePoint, Point2d pixelLocation) { if (canvasViewCache != null) { synchronized(canvasViewCache) { canvasViewCache.getPixelLocationFromImagePlate( imagePlatePoint, pixelLocation); } } else { pixelLocation.set(0.0, 0.0); } }
var center = new Point2d(250, 120); var regPolPoints = getRegularPolygonPoints(center, 3, 50); var currentFrame = (new Date).getTime();
syntaxError(st, file, "Both elements must be numbers") ; return new Point2d(((Double)elements.get(0)).doubleValue(), ((Double)elements.get(1)).doubleValue()) ;
cornersInCanvas = new Point2d[8]; for (int i = 0; i < 8; i++) { cornersInCanvas[i] = new Point2d(); corners[i] = new Point3d();
public void subtractInverse(final Canvas3D canvas, final Roi roi) { final Polygon p = roi.getPolygon(); final Transform3D volToIP = new Transform3D(); volumeToImagePlate(canvas, volToIP); final Point2d onCanvas = new Point2d(); final Point3i pos = new Point3i(0, 0, 0); for (int z = 0; z < zDim; z++) { for (int y = 0; y < yDim; y++) { for (int x = 0; x < xDim; x++) { volumePointInCanvas(canvas, volToIP, x, y, z, onCanvas); if (!p.contains(onCanvas.x, onCanvas.y)) { setNoCheckNoUpdate(x, y, z, BG); } } } IJ.showStatus("Filling..."); IJ.showProgress(z, zDim); } updateData(); }
adjPos.set(position); Point2d winCoord = new Point2d(); // Position of Raster in window coordinates Transform3D localToImagePlate = new Transform3D(); // Local to Image plate transform
final Point2d onCanvas = new Point2d(); for (int z = 0; z < vol.zDim; z++) { for (int y = 0; y < vol.yDim; y++) {