Class AlgorithmRegPatientPos

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

    public class AlgorithmRegPatientPos
    extends AlgorithmBase
    Use origin and image orientations to align images based on patient position.
    Version:
    1.0 Sept 2000
    Author:
    Delia McGarry, Zohara Cohen
    • Field Detail

      • name

        java.lang.String name
        DOCUMENT ME!
      • alignmentXfrm

        private TransMatrix alignmentXfrm
        DOCUMENT ME!
      • axisDirA

        private int[] axisDirA
        DOCUMENT ME!
      • axisDirB

        private int[] axisDirB
        DOCUMENT ME!
      • coordA

        private double[] coordA
        DOCUMENT ME!
      • coordB

        private double[] coordB
        DOCUMENT ME!
      • dimB

        private double[] dimB
        private double dimA[], resA[];.
      • resB

        private double[] resB
        private double dimA[], resA[];.
      • doMatch

        private boolean doMatch
        DOCUMENT ME!
      • orientedImgB

        private ModelImage orientedImgB
        DOCUMENT ME!
      • shiftedImgB

        private ModelImage shiftedImgB
        DOCUMENT ME!
      • resultImg

        private ModelImage resultImg
        DOCUMENT ME!
      • index2Axial

        private int[] index2Axial
        DOCUMENT ME!
      • index2ImgA

        private int[] index2ImgA
        DOCUMENT ME!
      • sign2Axial

        private int[] sign2Axial
        DOCUMENT ME!
      • sign2ImgA

        private int[] sign2ImgA
        DOCUMENT ME!
      • orientA_inv

        private TransMatrix orientA_inv
        DOCUMENT ME!
      • orientB_inv

        private TransMatrix orientB_inv
        DOCUMENT ME!
      • orientMatrixA

        private double[][] orientMatrixA
        DOCUMENT ME!
      • orientMatrixB

        private double[][] orientMatrixB
        DOCUMENT ME!
      • xOrientA

        private double[] xOrientA
        DOCUMENT ME!
      • yOrientA

        private double[] yOrientA
        DOCUMENT ME!
      • zOrientA

        private double[] zOrientA
        DOCUMENT ME!
      • xOrientB

        private double[] xOrientB
        DOCUMENT ME!
      • yOrientB

        private double[] yOrientB
        DOCUMENT ME!
      • zOrientB

        private double[] zOrientB
        DOCUMENT ME!
    • Constructor Detail

      • AlgorithmRegPatientPos

        public AlgorithmRegPatientPos​(ModelImage imageA,
                                      ModelImage imageB,
                                      boolean doMatch)
        Creates new algorithm.
        Parameters:
        imageA - image A
        imageB - image B, to be registered to imageA
        doMatch - whether to match the image origins
    • Method Detail

      • finalize

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

        public void getPatientOrientation​(double[] xOrient,
                                          double[] yOrient,
                                          ModelImage image)
        Extract orientation info from file header.
        Parameters:
        xOrient - 3D array of directional cosines in x
        yOrient - 3D array of directional cosines in y
        image - image
      • getPatientPosition

        public void getPatientPosition​(double[] coord,
                                       ModelImage image)
        Extracts the origin from image file info.
        Parameters:
        coord - 3D array of patient position x,y,z *
        image - image
      • getResultImage

        public ModelImage getResultImage()
        Accessor that returns the result image.
        Returns:
        result image
      • vectorCrossProduct

        double[] vectorCrossProduct​(double[] a,
                                    double[] b)
        Returns orgthogonal vector.
        Parameters:
        a - vector
        b - vector
        Returns:
        vector orthogonal to a & b
      • getIndices

        private void getIndices()
        Get indices for reordering data from Image B to the Axial coordinate system (LPS) and to the coordinate system of Image A.
      • getTransform

        private void getTransform()
        Get transformation matrix from Image B to Image A.
      • matchOrigin

        private void matchOrigin()
        Add image margins to image B, or crop to match Image A.
      • reOrient

        private void reOrient()
        Reorient ImageB so that directions will coincide with ImageA.