private final void volumePointInCanvas(final Canvas3D canvas, final Transform3D volToIP, final Point3d p, final Point2d ret) { ptmp.set(p); volToIP.transform(ptmp); canvas.getPixelLocationFromImagePlate(ptmp, ret); }
private void volumePointInCanvas(final Canvas3D canvas, final Transform3D volToIP, final int x, final int y, final int z, final Point2d out) { locInImagePlate.set(x * pw, y * ph, z * pd); volToIP.transform(locInImagePlate); canvas.getPixelLocationFromImagePlate(locInImagePlate, out); }
/** * Returns the 3D coordinates of the given x, y, z position on the 3D canvas. * * @param canvas * @param volToIP * @param x * @param y * @param z * @return */ private void volumePointInCanvas(final Canvas3D canvas, final Transform3D volToIP, final int x, final int y, final int z, final Point2d ret) { final VoltexVolume vol = renderer.volume; final double px = x * vol.pw; final double py = y * vol.ph; final double pz = z * vol.pd; final Point3d locInImagePlate = new Point3d(px, py, pz); volToIP.transform(locInImagePlate); canvas.getPixelLocationFromImagePlate(locInImagePlate, ret); }
private boolean roiContains(final Point3f p, final Transform3D volToIP, final Canvas3D canvas, final Polygon polygon) { final Point3d locInImagePlate = new Point3d(p); volToIP.transform(locInImagePlate); canvas.getPixelLocationFromImagePlate(locInImagePlate, p2d); return polygon.contains(p2d.x, p2d.y); }
canvas.getPixelLocationFromImagePlate(objCoord, winCoord);