Class AlgorithmRegValidation

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.event.WindowListener, java.lang.Runnable, java.util.EventListener

    public class AlgorithmRegValidation
    extends AlgorithmBase
    Uses a selected RegistrationMeasure and the user-specified points to output the relevant measure back to the user.
    Author:
    senseneyj
    • Field Detail

      • numCoords

        private int numCoords
        DOCUMENT ME!
      • dim

        private int dim
        The number of dimensions (2D or 3D).
      • pointSetA

        private double[][] pointSetA
        Input point set A (2D or 3D)
      • pointSetB

        private double[][] pointSetB
        Input point set B (2D or 3D)
      • xfrmBA

        private TransMatrix xfrmBA
        The transformation matrix that describes the transform from point set B to point set A.
    • Constructor Detail

      • AlgorithmRegValidation

        public AlgorithmRegValidation​(double[][] coordsA,
                                      double[][] coordsB,
                                      int dim2or3)
        AlgorithmRegValidation - Constructor.
        Parameters:
        coordsA - - double[dim][n] 3D or 2D point set
        coordsB - - double[dim][n] 3D or 2D point set
        dim2or3 - - indicates whether data set is 2D or 3D
      • AlgorithmRegValidation

        public AlgorithmRegValidation​(WildMagic.LibFoundation.Mathematics.Vector3f[] coordsA3D,
                                      WildMagic.LibFoundation.Mathematics.Vector3f[] coordsB3D,
                                      int dim2or3)
        AlgorithmRegValidation - Constructor.
        Parameters:
        coordsA3D - Vector3f[n] 3D point set
        coordsB3D - Vector3f[n] 3D point set
        dim2or3 - indicates whether data set is 2D or 3D
    • Method Detail

      • SQR

        public static double SQR​(double x)
        SQR = x^2.
        Parameters:
        x - DOCUMENT ME!
        Returns:
        DOCUMENT ME!
      • buildXfrm

        private TransMatrix buildXfrm​(double[] p1,
                                      double[] p2,
                                      Jama.Matrix R)
        Builds 4x4 transformation matrix from R and T where T=p2-R*p1.
        Parameters:
        p1 - from Match
        p2 - from Match
        R - =rotation matrix from Match
        Returns:
        DOCUMENT ME!
      • calculateResiduals

        public void calculateResiduals()
        CalculateResiduals.
      • EuclideanDistance

        public double EuclideanDistance​(double[] ptA,
                                        double[] ptB)
        EuclideanDistance.
        Parameters:
        ptA - DOCUMENT ME!
        ptB - DOCUMENT ME!
        Returns:
        DOCUMENT ME!
      • finalize

        public void finalize()
        Prepares this class for destruction.
        Overrides:
        finalize in class AlgorithmBase
      • getTransformBtoA

        public TransMatrix getTransformBtoA()
        Accesses xfrm from point set B to point set A.
        Returns:
        xfrmBA
      • matchBtoA

        public void matchBtoA()
        matchBtoA pA and pB are 2 3D point sets (pointSetA and B).

        p1[i]=(1/numCoords)*(sum from j = 0 to j = numCoords - 1 of pB[i][j]) p2[i]=(1/numCoords)*(sum from j = 0 to j = numCoords - 1 of pA[i][j])

        q1[i][j] =pB[i][j]-p1[i] q2[i][j]=pA[i][j]-p2[i]

      • setTransformBtoA

        public void setTransformBtoA​(TransMatrix xfrm)
        Set transform from point set A to point set B.
        Parameters:
        xfrm - transform to copy
      • setup

        public int setup​(double[][] coordsA,
                         double[][] coordsB)
        Checks if pointSetA is same dimension as pointSetB sets pointSetA and pointSetB.
        Parameters:
        coordsA - first 3D point set
        coordsB - second 3D point set
        Returns:
        distinguishing reason for error
      • setup

        public int setup​(WildMagic.LibFoundation.Mathematics.Vector3f[] coordsA,
                         WildMagic.LibFoundation.Mathematics.Vector3f[] coordsB)
        Checks if pointSetA is same dimension as pointSetB sets pointSetA and pointSetB.
        Parameters:
        coordsA - first 3D point set
        coordsB - second 3D point Set
        Returns:
        int distinguishing reason for error
      • setup

        public int setup​(WildMagic.LibFoundation.Mathematics.Vector2f[] coordsA,
                         WildMagic.LibFoundation.Mathematics.Vector2f[] coordsB)
        Checks if pointSetA is same dimension as pointSetB sets pointSetA and pointSetB.
        Parameters:
        coordsA - first 2D point set
        coordsB - second 2D point Set
        Returns:
        int distinguishing reason for error