Class AlgorithmSWI

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

    public class AlgorithmSWI
    extends AlgorithmBase
    This class recalculates mo and dceFullTre to provide better estimates using the inverse Ernst equation
    Author:
    Justin Senseney (SenseneyJ@mail.nih.gov)
    • Field Detail

      • maskThreshold

        private double maskThreshold
      • xFilterSize

        private int xFilterSize
      • yFilterSize

        private int yFilterSize
      • multFactor

        private int multFactor
      • xDim

        private int xDim
        X dimension length
      • yDim

        private int yDim
        Y dimension length
      • zDim

        private int zDim
        Z dimension length
      • xFilterTopLeft

        private double xFilterTopLeft
      • yFilterTopLeft

        private double yFilterTopLeft
      • showInterImages

        private boolean showInterImages
        Whether intermediate images should be displayed during pipeline processing
      • brainMask

        private ModelImage brainMask
        Denotes which pixels undergo SWI processing.
      • inScript

        private boolean inScript
        Denotes whether the algorithm is run in a script/JIST, if so showInterImages just stores images for later access.
    • Constructor Detail

      • AlgorithmSWI

        public AlgorithmSWI​(boolean inScript,
                            ModelImage resultImage,
                            ModelImage magImage,
                            ModelImage phaseImage,
                            double maskThreshold,
                            int roFilterSize,
                            int peFilterSize,
                            int multFactor,
                            boolean showInterImages)
        Constructor.
        Parameters:
        resultImage - Result image model
        srcImg - Source image model.
    • Method Detail

      • finalize

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

        public void runAlgorithm()
        Starts the algorithm. At the conclusion of this method, AlgorithmBase reports to any algorithm listeners that this algorithm has completed. This method is not usually called explicitly by a controlling dialog. Instead, see AlgorithmBase.run() or start().
        Specified by:
        runAlgorithm in class AlgorithmBase
      • calc2D

        private void calc2D()
      • calc3D

        private void calc3D()
      • generateMagEnhanced

        private ModelImage generateMagEnhanced​(double[] phaseMaskData,
                                               ModelImage magnitude)
      • generatePhaseMask

        private ModelImage generatePhaseMask​(java.util.BitSet brainMaskSet,
                                             double[] ixRealFinal,
                                             double[] ixImagFinal,
                                             double[] phaseMaskData)
      • generateIFinal

        private ModelImage generateIFinal​(ModelImage iImage,
                                          ModelImage iCenterImage,
                                          java.util.BitSet brainMaskSet,
                                          double[] ixRealFinal,
                                          double[] ixImagFinal)
      • createiImage

        private ModelImage createiImage​(double[] realData,
                                        double[] imagData)
      • createBrainMask

        private ModelImage createBrainMask()
      • rescaleToComplex

        private void rescaleToComplex​(ModelImage magImage,
                                      ModelImage phaseImage,
                                      double[] realData,
                                      double[] imagData)
      • getkCenterImage

        public ModelImage getkCenterImage()