Class AlgorithmTreT1

All Implemented Interfaces:
ActionListener, WindowListener, Runnable, 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 Details

    • t1ResultStack

      private ModelImage t1ResultStack
    • m0ResultStack

      private ModelImage m0ResultStack
    • r1ResultStack

      private ModelImage r1ResultStack
    • b1ResultStack

      private ModelImage b1ResultStack
    • t1ResultData

      private double[][][] t1ResultData
    • m0ResultData

      private double[][][] m0ResultData
    • r1ResultData

      private double[][][] r1ResultData
    • b1ResultData

      private double[][][] b1ResultData
    • largestImage

      private ModelImage largestImage
    • 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 String[] wList
    • titles

      private 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)
    • m0ResultWindow

      private ViewJFrameImage m0ResultWindow
    • r1ResultWindow

      private ViewJFrameImage r1ResultWindow
    • b1ResultWindow

      private ViewJFrameImage b1ResultWindow
  • Constructor Details

    • 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, String[] wList, 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, String[] wList, String[] titles)
  • Method Details

    • init

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

      protected void computeProcessors()
      Specified by:
      computeProcessors in class AlgorithmTProcess
    • 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)