public class IlvFittedTransform extends Object implements IlvMathTransform, IlvPersistentObject
Constructor and Description |
---|
IlvFittedTransform(IlvCoordinate[] sourcePoints,
IlvCoordinate[] destinationPoints,
int degree)
Creates a new 2D polynomial transform.
|
IlvFittedTransform(IlvFittedTransform source)
Creates a new fitted transform which is a copy of the specified
transformation.
|
IlvFittedTransform(IlvInputStream stream)
Reads an
IlvFittedTransform from the specified
input stream. |
Modifier and Type | Method and Description |
---|---|
static IlvFittedTransform |
CreateTransform(IlvCoordinate UL,
IlvCoordinate LR,
IlvCoordinateTransformation transform,
int degree,
double controlPointModifier)
Creates an interpolation function for the specified coordinate
transformation, for the area of interest which corners are specified.
|
boolean |
equals(Object obj) |
Iterator<IlvCoordinate> |
getDestinationPoints()
Returns an iterator over the destination points.
|
IlvMathTransform |
getInverse()
Returns the inverse transformation of this transformation.
|
int |
getSourceDimension()
The dimension of source coordinates.
|
Iterator<IlvCoordinate> |
getSourcePoints()
Returns an iterator over the source points.
|
int |
getTargetDimension()
The dimension of target coordinates.
|
boolean |
isIdentity()
Returns
true if this transformation is an identity. |
IlvCoordinate[] |
transform(IlvCoordinate[] sourceCP,
IlvCoordinate[] targetCP)
Transforms the specified array of points, and stores the result in
the specified coordinate array.
|
IlvCoordinate |
transform(IlvCoordinate sourceCP,
IlvCoordinate targetCP)
Transforms the specified source point, and stores the result in the
specified coordinate.
|
void |
write(IlvOutputStream stream)
Writes this transformation to the specified output stream.
|
public IlvFittedTransform(IlvCoordinate[] sourcePoints, IlvCoordinate[] destinationPoints, int degree)
sourcePoints
- The source points.destinationPoints
- The points to fit.degree
- The degree of the interpolation.IllegalArgumentException
- If the number of points does not
allow for a polynomial of degree degree
to be found.public IlvFittedTransform(IlvFittedTransform source)
source
- The source transformpublic IlvFittedTransform(IlvInputStream stream) throws IlvReadFileException
IlvFittedTransform
from the specified
input stream.stream
- The IlvInputStream
.IlvReadFileException
- if the transformation cannot be
read from the input stream.public void write(IlvOutputStream stream) throws IOException
write
in interface IlvPersistentObject
stream
- The IlvOutputStream
.Java.io.IOException
- If an error occurs.IOException
- thrown when an exception occurs during
the write operation for this object.public int getSourceDimension()
getSourceDimension
in interface IlvMathTransform
public int getTargetDimension()
getTargetDimension
in interface IlvMathTransform
public IlvCoordinate transform(IlvCoordinate sourceCP, IlvCoordinate targetCP) throws IlvCoordinateTransformationException
null
, a new
coordinate is created and returned.transform
in interface IlvMathTransform
IlvCoordinateTransformationException
public IlvCoordinate[] transform(IlvCoordinate[] sourceCP, IlvCoordinate[] targetCP) throws IlvCoordinateTransformationException
null
, a new array of coordinates is created and returned.transform
in interface IlvMathTransform
IlvCoordinateTransformationException
public IlvMathTransform getInverse()
getInverse
in interface IlvMathTransform
public boolean isIdentity()
true
if this transformation is an identity.isIdentity
in interface IlvMathTransform
true
if this transformation is an identity.public Iterator<IlvCoordinate> getSourcePoints()
IlvCoordinate[] sources = new IlvCoordinate[numPoints]; IlvCoordinate[] dest = new IlvCoordinate[numPoints]; for (Iterator i = transform.getSourcePoints(); i.hasNext() ; ) { IlvCoordinate c = (IlvCoordinate)i.next(); }
public Iterator<IlvCoordinate> getDestinationPoints()
for (Iterator i = transform.getDestinationPoints(); i.hasNext() ; ) { IlvCoordinate c = (IlvCoordinate)i.next(); }
public static IlvFittedTransform CreateTransform(IlvCoordinate UL, IlvCoordinate LR, IlvCoordinateTransformation transform, int degree, double controlPointModifier) throws IlvCoordinateTransformationException
controlPointModifier
parameter allows to specify a
modifier to the number of points for the specified degree (example,
1.20 means use 20% more points that the theoretical number of points
needed for a polynomial of degree degree
).UL
- The upper left coordinate of the area of interest, expressed
in the source coordinate system.LR
- The lower right coordinate of the area of interest, expressed
in the source coordinate system.transform
- The transformation to interpolate.degree
- The degree of the interpolation function.controlPointModifier
- The modifier to the number of control
points used. This must be greater than 1.IlvCoordinateTransformationException
- if some points could not
be transformed.public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.