public class ImageTransform
extends java.lang.Object
Constructor and Description |
---|
ImageTransform(java.awt.Dimension imageDims)
Deprecated.
As of 3.3.1, use the other constructors instead.
|
ImageTransform(java.awt.Dimension imageDims,
DataLocation center,
double scale)
Constructs a new image transform with the specified image
dimensions, center data location, and scaling factor.
|
ImageTransform(java.awt.Dimension imageDims,
DataLocation center,
double[] scales)
Deprecated.
As of 3.3.1, replaced by
ImageTransform(Dimension,DataLocation,double) or
ImageTransform(Dimension,Dimension,DataLocation,double,AffineTransform) . |
ImageTransform(java.awt.Dimension imageDims,
java.awt.Dimension dataDims,
DataLocation center,
double scale,
java.awt.geom.AffineTransform orientationAffine)
Constructs a new image transform with the specified image
dimensions, center data location, scaling factors, and orientation
affine.
|
Modifier and Type | Method and Description |
---|---|
java.awt.geom.AffineTransform |
getAffine()
Gets the data to image coordinate transform.
|
java.awt.Dimension |
getImageDimensions()
Gets the current image dimensions.
|
static void |
main(java.lang.String[] argv)
Tests this class.
|
java.awt.geom.Point2D |
transform(DataLocation loc)
Converts data coordinates to image coordinates.
|
DataLocation |
transform(java.awt.Point point)
Converts integer image coordinates to data coordinates.
|
DataLocation |
transform(java.awt.geom.Point2D point)
Converts arbitrary precision image coordinates to data coordinates.
|
@Deprecated public ImageTransform(java.awt.Dimension imageDims)
imageDims
- the image dimensions.@Deprecated public ImageTransform(java.awt.Dimension imageDims, DataLocation center, double[] scales) throws java.awt.geom.NoninvertibleTransformException
ImageTransform(Dimension,DataLocation,double)
or
ImageTransform(Dimension,Dimension,DataLocation,double,AffineTransform)
.imageDims
- the image dimensions.center
- the center data location. This location transforms
to the center of the image coordinates.scales
- the image to data scaling factors as [row, column].java.awt.geom.NoninvertibleTransformException
- if the image to data
transform is not invertible.public ImageTransform(java.awt.Dimension imageDims, DataLocation center, double scale) throws java.awt.geom.NoninvertibleTransformException
imageDims
- the image dimensions.center
- the center data location. This location transforms
to the center of the image coordinates.scale
- the ratio of data pixels to view image pixels.java.awt.geom.NoninvertibleTransformException
- if the image to data
transform is not invertible.public ImageTransform(java.awt.Dimension imageDims, java.awt.Dimension dataDims, DataLocation center, double scale, java.awt.geom.AffineTransform orientationAffine) throws java.awt.geom.NoninvertibleTransformException
imageDims
- the image dimensions.dataDims
- the data dimensions.center
- the center data location. This location transforms
to the center of the image coordinates.scale
- the ratio of data pixels to view image pixels.orientationAffine
- the affine transform that orients
the data for display. This may be used for when data row and column
coordinates do not correspond to the normal way that a data image is
expected to be displayed. The affine can be TYPE_FLIP,
TYPE_QUANDRANT_ROTATION, or TYPE_IDENTITY only. The orientation affine
is used to rotate or flip the data about its center point in data
coordinate space (ie: world coordinates versus viewport coordinates).java.awt.geom.NoninvertibleTransformException
- if the data to image
transform is not invertible.java.lang.IllegalArgumentException
- if the orientation affine is not a flip,
quadrant rotation, or identity.public java.awt.geom.Point2D transform(DataLocation loc)
loc
- the data location.transform(Point)
public DataLocation transform(java.awt.geom.Point2D point)
point
- the image coordinates.transform(DataLocation)
public DataLocation transform(java.awt.Point point)
point
- the image coordinates.transform(DataLocation)
public java.awt.geom.AffineTransform getAffine()
public java.awt.Dimension getImageDimensions()
public static void main(java.lang.String[] argv) throws java.lang.Exception
argv
- the array of command line parameters.java.lang.Exception