Class AlgorithmTalairachTransform

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

    public class AlgorithmTalairachTransform
    extends AlgorithmBase
    Performs original to ACPC, original to Talairach, ACPC to original, ACPC to Talairach, Talairach to original, or Talairach to ACPC transformation.
    Version:
    May 26, 2005
    Author:
    Pilou Bazin
    • Field Detail

      • NEAREST_NEIGHBOR

        public static final int NEAREST_NEIGHBOR
        Nearest neighbor interpolation.
        See Also:
        Constant Field Values
      • BSPLINE3

        public static final int BSPLINE3
        Cubic bspline interpolation.
        See Also:
        Constant Field Values
      • BSPLINE4

        public static final int BSPLINE4
        Quadratic bspline interpolation.
        See Also:
        Constant Field Values
      • CUBIC_LAGRANGIAN

        public static final int CUBIC_LAGRANGIAN
        Cubic lagrangian interpolation.
        See Also:
        Constant Field Values
      • QUINTIC_LAGRANGIAN

        public static final int QUINTIC_LAGRANGIAN
        Quintic lagrangian interpolation.
        See Also:
        Constant Field Values
      • HEPTIC_LAGRANGIAN

        public static final int HEPTIC_LAGRANGIAN
        Heptic lagrangian interpolation.
        See Also:
        Constant Field Values
      • doClip

        boolean doClip
        DOCUMENT ME!
      • doVOI

        boolean doVOI
        DOCUMENT ME!
      • interpolation

        int interpolation
        DOCUMENT ME!
      • suffix

        java.lang.String suffix
        DOCUMENT ME!
      • transformType

        int transformType
        DOCUMENT ME!
      • transformTypeName

        java.lang.String transformTypeName
        DOCUMENT ME!
      • inVolExtents

        private int[] inVolExtents
        DOCUMENT ME!
      • nix

        private int nix
        DOCUMENT ME!
      • niy

        private int niy
        DOCUMENT ME!
      • niz

        private int niz
        DOCUMENT ME!
      • nrx

        private int nrx
        DOCUMENT ME!
      • nry

        private int nry
        DOCUMENT ME!
      • nrz

        private int nrz
        DOCUMENT ME!
    • Constructor Detail

      • AlgorithmTalairachTransform

        public AlgorithmTalairachTransform​(ModelImage destImage,
                                           ModelImage srcImage,
                                           TalairachTransformInfo tInfo,
                                           int transformType,
                                           int interpolation,
                                           boolean doClip,
                                           boolean doVOI)
        Creates a new AlgorithmTalairachTransform object.
        Parameters:
        destImage - DOCUMENT ME!
        srcImage - DOCUMENT ME!
        tInfo - DOCUMENT ME!
        transformType - DOCUMENT ME!
        interpolation - DOCUMENT ME!
        doClip - DOCUMENT ME!
        doVOI - DOCUMENT ME!
    • Method Detail

      • disposeLocal

        public void disposeLocal()
        Dispose of local variables that may be taking up lots of room.
      • computeBSplineImage

        private void computeBSplineImage​(float xi,
                                         float yi,
                                         float zi,
                                         float[] result,
                                         int xr,
                                         int yr,
                                         int zr)
        DOCUMENT ME!
        Parameters:
        xi - DOCUMENT ME!
        yi - DOCUMENT ME!
        zi - DOCUMENT ME!
        result - DOCUMENT ME!
        xr - DOCUMENT ME!
        yr - DOCUMENT ME!
        zr - DOCUMENT ME!
      • computeCubicLagrangian

        private void computeCubicLagrangian​(float xi,
                                            float yi,
                                            float zi,
                                            float[] result,
                                            int xr,
                                            int yr,
                                            int zr)
        DOCUMENT ME!
        Parameters:
        xi - DOCUMENT ME!
        yi - DOCUMENT ME!
        zi - DOCUMENT ME!
        result - DOCUMENT ME!
        xr - DOCUMENT ME!
        yr - DOCUMENT ME!
        zr - DOCUMENT ME!
      • computeHepticLagrangian

        private void computeHepticLagrangian​(float xi,
                                             float yi,
                                             float zi,
                                             float[] result,
                                             int xr,
                                             int yr,
                                             int zr)
        DOCUMENT ME!
        Parameters:
        xi - DOCUMENT ME!
        yi - DOCUMENT ME!
        zi - DOCUMENT ME!
        result - DOCUMENT ME!
        xr - DOCUMENT ME!
        yr - DOCUMENT ME!
        zr - DOCUMENT ME!
      • computeNearestImage

        private void computeNearestImage​(double[] img,
                                         float xi,
                                         float yi,
                                         float zi,
                                         float[] result,
                                         int xr,
                                         int yr,
                                         int zr)
        Transforms and resamples volume using nearest neighbor interpolation.
        Parameters:
        img - DOCUMENT ME!
        xi - DOCUMENT ME!
        yi - DOCUMENT ME!
        zi - DOCUMENT ME!
        result - DOCUMENT ME!
        xr - DOCUMENT ME!
        yr - DOCUMENT ME!
        zr - DOCUMENT ME!
      • computeQuinticLagrangian

        private void computeQuinticLagrangian​(float xi,
                                              float yi,
                                              float zi,
                                              float[] result,
                                              int xr,
                                              int yr,
                                              int zr)
        DOCUMENT ME!
        Parameters:
        xi - DOCUMENT ME!
        yi - DOCUMENT ME!
        zi - DOCUMENT ME!
        result - DOCUMENT ME!
        xr - DOCUMENT ME!
        yr - DOCUMENT ME!
        zr - DOCUMENT ME!
      • computeTrilinearImage

        private void computeTrilinearImage​(double[] img,
                                           float xi,
                                           float yi,
                                           float zi,
                                           float[] result,
                                           int xr,
                                           int yr,
                                           int zr)
        Transforms and resamples volume using trilinear interpolation.
        Parameters:
        img - DOCUMENT ME!
        xi - DOCUMENT ME!
        yi - DOCUMENT ME!
        zi - DOCUMENT ME!
        result - DOCUMENT ME!
        xr - DOCUMENT ME!
        yr - DOCUMENT ME!
        zr - DOCUMENT ME!
      • computeWSincImage

        private void computeWSincImage​(float xi,
                                       float yi,
                                       float zi,
                                       float[] result,
                                       int xr,
                                       int yr,
                                       int zr)
        DOCUMENT ME!
        Parameters:
        xi - DOCUMENT ME!
        yi - DOCUMENT ME!
        zi - DOCUMENT ME!
        result - DOCUMENT ME!
        xr - DOCUMENT ME!
        yr - DOCUMENT ME!
        zr - DOCUMENT ME!
      • generateVOI

        private VOI generateVOI​(VOI obj,
                                java.util.BitSet mask)
        extract a VOI from a binary mask image.
        Parameters:
        obj - DOCUMENT ME!
        mask - DOCUMENT ME!
        Returns:
        DOCUMENT ME!
      • transformTalairachVolume

        private void transformTalairachVolume​(double[] img,
                                              float[] result)
        computes the selected Talairach transform.
        Parameters:
        img - the original image
        result - the transformed image