/** * Construct an {@link ome.xml.model.AffineTransform} corresponding to * the given angle. * @param theta the angle of rotation in radians */ protected AffineTransform getRotationTransform(double theta) { AffineTransform transform = new AffineTransform(); transform.setA02(0.0); transform.setA12(0.0); transform.setA00(Math.cos(theta)); transform.setA11(Math.cos(theta)); transform.setA01(Math.sin(theta)); transform.setA10(-1 * Math.sin(theta)); return transform; }
setA10(Double.valueOf( element.getAttribute("A10")));
/** * Construct an AffineTransform corresponding to * the given angle. * @param theta the angle of rotation in radians */ public static AffineTransform createRotationTransform(double theta) { AffineTransform transform = new AffineTransform(); transform.setA02(0.0); transform.setA12(0.0); transform.setA00(Math.cos(theta)); transform.setA11(Math.cos(theta)); transform.setA01(Math.sin(theta)); transform.setA10(-1 * Math.sin(theta)); return transform; }
/** * Construct an {@link ome.xml.model.AffineTransform} corresponding to * the given angle. * @param theta the angle of rotation in radians */ protected AffineTransform getRotationTransform(double theta) { AffineTransform transform = new AffineTransform(); transform.setA02(0.0); transform.setA12(0.0); transform.setA00(Math.cos(theta)); transform.setA11(Math.cos(theta)); transform.setA01(Math.sin(theta)); transform.setA10(-1 * Math.sin(theta)); return transform; }
setA10(Double.valueOf( element.getAttribute("A10")));
/** Default constructor. */ public AffineTransform() { // Set to identity setA00(1.0); setA01(0.0); setA02(0.0); setA10(0.0); setA11(1.0); setA12(0.0); }
private static AffineTransform toTransform(omero.model.AffineTransform omeroTransform) { if (omeroTransform == null || omeroTransform.getA00() == null || omeroTransform.getA01() == null || omeroTransform.getA02() == null || omeroTransform.getA10() == null || omeroTransform.getA11() == null || omeroTransform.getA12() == null) { return null; } final AffineTransform schemaTransform = new AffineTransform(); schemaTransform.setA00(omeroTransform.getA00().getValue()); schemaTransform.setA01(omeroTransform.getA01().getValue()); schemaTransform.setA02(omeroTransform.getA02().getValue()); schemaTransform.setA10(omeroTransform.getA10().getValue()); schemaTransform.setA11(omeroTransform.getA11().getValue()); schemaTransform.setA12(omeroTransform.getA12().getValue()); return schemaTransform; }