Class AlgorithmConstrainedOAR3D.MatrixListItem
java.lang.Object
gov.nih.mipav.model.algorithms.registration.AlgorithmConstrainedOAR3D.MatrixListItem
- All Implemented Interfaces:
Comparable<AlgorithmConstrainedOAR3D.MatrixListItem>
- Enclosing class:
AlgorithmConstrainedOAR3D
class AlgorithmConstrainedOAR3D.MatrixListItem
extends Object
implements Comparable<AlgorithmConstrainedOAR3D.MatrixListItem>
Helper class to make it easy to store the necessary information about a minimum. Stores the "point", or vector at
which the minimum was reached; the "cost", or value of the cost function at that minimum; and the matrix, which
was the true input into the cost function and represents the transformation that gives the minimum cost of
differences between the images. Implements Comparable, so that a list of MatrixListItems can be sorted using
Java's sort.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected doubleCost of function at this minimum.protected TransMatrixdMatrix with the best transformation divided by half.protected double[]Rotations, translations, scales, and skews that make up transformation.protected TransMatrixdMatrix that gives best transformation.protected TransMatrixdMatrix with the best transformation's z rot and xy translations. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMatrixListItem(double _cost) Creates new minimum object, with identity transMatrix and a given cost.protectedMatrixListItem(double _cost, TransMatrixd _matrix, double[] _initial) Creates new minimum object, setting the data and copying the point array explicitly. -
Method Summary
Modifier and TypeMethodDescriptionintNecessary to implement so that list may be sorted.Creates string of this object with just first 6DOF and cost.toString()Creates readable string of this object, including cost, matrix, and point with its meanings.
-
Field Details
-
cost
protected double costCost of function at this minimum. -
halfMatrix
Matrix with the best transformation divided by half. Might be null. -
initial
protected double[] initialRotations, translations, scales, and skews that make up transformation. -
matrix
Matrix that gives best transformation. -
midsagMatrix
Matrix with the best transformation's z rot and xy translations. Might be null.
-
-
Constructor Details
-
MatrixListItem
protected MatrixListItem(double _cost) Creates new minimum object, with identity transMatrix and a given cost.- Parameters:
_cost- Cost of this minimum.
-
MatrixListItem
Creates new minimum object, setting the data and copying the point array explicitly.- Parameters:
_cost- Cost of this minimum._matrix- Matrix that gives best transformation._initial- Rotations, translations, scales, and skews that make up transformation.
-
-
Method Details
-
compareTo
Necessary to implement so that list may be sorted. Returns -1 if this cost is less than the parameter's cost; 1 if this cost is greater than the parameter's cost; and 0 if they are equal.- Specified by:
compareToin interfaceComparable<AlgorithmConstrainedOAR3D.MatrixListItem>- Parameters:
o- MatrixListItem to compare to.- Returns:
- -1 if this is less than, 1 if greater than, 0 if equal.
-
toAbridgedString
Creates string of this object with just first 6DOF and cost.- Returns:
- Readable string representation of this object.
-
toString
Creates readable string of this object, including cost, matrix, and point with its meanings.
-