Class AlgorithmTreT1

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

    public class AlgorithmTreT1
    extends AlgorithmTProcess
    This class is adapted from the ImageJ version originally written by Sean Deoni while working at the National Institutes of Health. This class performs T1 calculations given any number of SPGR and IRSPGR images.
    • Field Detail

      • t1ResultData

        private double[][][] t1ResultData
      • m0ResultData

        private double[][][] m0ResultData
      • r1ResultData

        private double[][][] r1ResultData
      • b1ResultData

        private double[][][] b1ResultData
      • treTR

        private double treTR
      • irspgrTR

        private double irspgrTR
      • irspgrKy

        private double irspgrKy
      • irspgrFA

        private double irspgrFA
      • maxT1

        private double maxT1
      • maxM0

        private double maxM0
      • treFA

        private double[] treFA
      • irspgrTr

        private double[] irspgrTr
      • irspgrTI

        private double[] irspgrTI
      • spgrData

        private double[] spgrData
      • irspgrData

        private double[] irspgrData
      • scale

        private double scale
      • pointScale

        private double pointScale
      • scaleIncrement

        private double scaleIncrement
      • estimates

        private double[] estimates
      • residuals

        private double[] residuals
      • direction

        private int[] direction
      • spgrImageIndex

        private int[] spgrImageIndex
      • irspgrImageIndex

        private int[] irspgrImageIndex
      • b1ImageIndex

        private int b1ImageIndex
      • angleIncrement

        private double angleIncrement
      • Nsa

        private int Nsa
      • Nti

        private int Nti
      • maxAngle

        private double maxAngle
      • smoothB1Field

        private boolean smoothB1Field
      • performStraightTreT1

        private boolean performStraightTreT1
      • performTreT1withPreCalculatedB1Map

        private boolean performTreT1withPreCalculatedB1Map
      • performTreT1HIFI

        private boolean performTreT1HIFI
      • doubleInversion

        private boolean doubleInversion
      • singleInversion

        private boolean singleInversion
      • geScanner

        private boolean geScanner
      • siemensScanner

        private boolean siemensScanner
      • threeTField

        private boolean threeTField
      • onefiveTField

        private boolean onefiveTField
      • calculateT1

        private boolean calculateT1
      • showB1Map

        private boolean showB1Map
      • calculateM0

        private boolean calculateM0
      • invertT1toR1

        private boolean invertT1toR1
      • useWeights

        private boolean useWeights
      • uniformAngleSpacing

        private boolean uniformAngleSpacing
      • wList

        private java.lang.String[] wList
      • titles

        private java.lang.String[] titles
      • completed

        private boolean completed
      • t1ResultWindow

        private ViewJFrameImage t1ResultWindow
        The frames for result images (if null at end of algorithm src ModelImage is destroyed)
    • Constructor Detail

      • AlgorithmTreT1

        public AlgorithmTreT1​(double treTR,
                              double irspgrTR,
                              double irspgrKy,
                              double irspgrFA,
                              double maxT1,
                              double maxM0,
                              double[] treFA,
                              double[] irspgrTr2,
                              double[] irspgrTI,
                              double[] spgrData,
                              double[] irspgrData,
                              double scale,
                              double pointScale,
                              double scaleIncrement,
                              double[] estimates,
                              double[] residuals,
                              int[] direction,
                              int[] spgrImageIndex,
                              int[] irspgrImageIndex,
                              int b1ImageIndex,
                              double angleIncrement,
                              int nsa,
                              int nti,
                              double maxAngle,
                              boolean smoothB1Field,
                              boolean performStraightTreT1,
                              boolean performTreT1withPreCalculatedB1Map,
                              boolean performTreT1HIFI,
                              boolean doubleInversion,
                              boolean singleInversion,
                              boolean geScanner,
                              boolean siemensScanner,
                              boolean threeTField,
                              boolean onefiveTField,
                              boolean calculateT1,
                              boolean showB1Map,
                              boolean calculateM0,
                              boolean invertT1toR1,
                              boolean useWeights,
                              boolean uniformAngleSpacing,
                              boolean upperLeftCorner,
                              boolean upperRightCorner,
                              boolean lowerLeftCorner,
                              boolean lowerRightCorner,
                              boolean useSmartThresholding,
                              boolean useHardThresholding,
                              float noiseScale,
                              float hardNoiseThreshold,
                              java.lang.String[] wList,
                              java.lang.String[] titles)
      • AlgorithmTreT1

        public AlgorithmTreT1​(ModelImage destImage,
                              ModelImage srcImage,
                              double treTR,
                              double irspgrTR,
                              double irspgrKy,
                              double irspgrFA,
                              double maxT1,
                              double maxM0,
                              double[] treFA,
                              double[] irspgrTr2,
                              double[] irspgrTI,
                              double[] spgrData,
                              double[] irspgrData,
                              double scale,
                              double pointScale,
                              double scaleIncrement,
                              double[] estimates,
                              double[] residuals,
                              int[] direction,
                              int[] spgrImageIndex,
                              int[] irspgrImageIndex,
                              int b1ImageIndex,
                              double angleIncrement,
                              int nsa,
                              int nti,
                              double maxAngle,
                              boolean smoothB1Field,
                              boolean performStraightTreT1,
                              boolean performTreT1withPreCalculatedB1Map,
                              boolean performTreT1HIFI,
                              boolean doubleInversion,
                              boolean singleInversion,
                              boolean geScanner,
                              boolean siemensScanner,
                              boolean threeTField,
                              boolean onefiveTField,
                              boolean calculateT1,
                              boolean showB1Map,
                              boolean calculateM0,
                              boolean invertT1toR1,
                              boolean useWeights,
                              boolean uniformAngleSpacing,
                              boolean upperLeftCorner,
                              boolean upperRightCorner,
                              boolean lowerLeftCorner,
                              boolean lowerRightCorner,
                              boolean useSmartThresholding,
                              boolean useHardThresholding,
                              float noiseScale,
                              float hardNoiseThreshold,
                              java.lang.String[] wList,
                              java.lang.String[] titles)
    • Method Detail

      • init

        private void init()
        Initializes local variables that are internal to tre.
      • displayImages

        protected void displayImages()
        This method is used in both the conventional and HIFI case to display result images
        Specified by:
        displayImages in class AlgorithmTProcess
      • calculateT1UsingTreT1HIFI

        public boolean calculateT1UsingTreT1HIFI()
      • calculateT1UsingConventionalTreT1

        public boolean calculateT1UsingConventionalTreT1()
      • finalize

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

        public void runAlgorithm()
        Description copied from class: AlgorithmBase
        Actually runs the algorithm. Implemented by inheriting algorithms.
        Specified by:
        runAlgorithm in class AlgorithmBase
      • signalResiduals

        public double signalResiduals​(double x,
                                      double[] spgrData,
                                      double[] irspgrData,
                                      double Inversion,
                                      int Nfa,
                                      int Nti,
                                      double[] treFA,
                                      double treTR,
                                      double[] irspgrTr,
                                      double[] irspgrTI,
                                      double irspgrFA)
      • getT1ResultStack

        public ModelImage getT1ResultStack()
      • getM0ResultStack

        public ModelImage getM0ResultStack()
      • getR1ResultStack

        public ModelImage getR1ResultStack()
      • getB1ResultStack

        public ModelImage getB1ResultStack()
      • initializeDisplayImages

        private void initializeDisplayImages​(ModelImage image)
        This method initializes the final images as near-clones of the largest image in the set
        Parameters:
        image -
      • loadFinalData

        private void loadFinalData​(ModelImage image,
                                   double[][][] data)