Class VabraSubjectTargetPairs

  • All Implemented Interfaces:
    de.jtem.numericalMethods.calculus.function.RealFunctionOfOneVariable

    public class VabraSubjectTargetPairs
    extends java.lang.Object
    implements de.jtem.numericalMethods.calculus.function.RealFunctionOfOneVariable
    • Field Detail

      • maxDimensions

        private int maxDimensions
      • currentDownSampleFactor

        private double currentDownSampleFactor
      • boundingBox

        private int[] boundingBox
      • currentDeformField

        private float[] currentDeformField
      • totalDeformField

        private float[] totalDeformField
      • origSubjectList

        private ModelImage origSubjectList
      • origTargetList

        private ModelImage origTargetList
      • chInterpType

        private int chInterpType
      • numOfBins

        private int numOfBins
      • RobustMinThresh

        private float RobustMinThresh
      • RobustMaxThresh

        private float RobustMaxThresh
      • defFieldUpdateMode

        private int defFieldUpdateMode
      • curX

        private int curX
      • curY

        private int curY
      • curZ

        private int curZ
      • totalDeformFieldSplit

        private ModelImage[] totalDeformFieldSplit
      • levelCount

        private int levelCount
      • resCount

        private int resCount
      • lambda

        private static double lambda
      • localROI

        private int[] localROI
      • localCoarseGradient

        private double[] localCoarseGradient
      • coarseLocalRegionCenter

        private int[] coarseLocalRegionCenter
      • directionsOptmizationWeight

        private double[] directionsOptmizationWeight
      • domainMax

        private double domainMax
      • domainMin

        private double domainMin
      • tolerance

        private double tolerance
      • commitCount

        private int commitCount
      • origJointST

        private int[] origJointST
      • currentJointST

        private int[] currentJointST
      • defSTxPlus

        private int[] defSTxPlus
      • defSTxMinus

        private int[] defSTxMinus
      • defSTyPlus

        private int[] defSTyPlus
      • defSTyMinus

        private int[] defSTyMinus
      • defSTzPlus

        private int[] defSTzPlus
      • defSTzMinus

        private int[] defSTzMinus
      • defSxPlus

        private int[] defSxPlus
      • defSxMinus

        private int[] defSxMinus
      • defSyPlus

        private int[] defSyPlus
      • defSyMinus

        private int[] defSyMinus
      • defSzPlus

        private int[] defSzPlus
      • defSzMinus

        private int[] defSzMinus
      • origDeformedSubject

        private int[] origDeformedSubject
      • origTarget

        private int[] origTarget
      • currentDeformedSubject

        private int[] currentDeformedSubject
    • Constructor Detail

      • VabraSubjectTargetPairs

        public VabraSubjectTargetPairs​(ModelImage subjectVols,
                                       ModelImage targetVols,
                                       float robustMaxT,
                                       float robustMinT,
                                       int numBins,
                                       int interpType,
                                       boolean useMNMI,
                                       double[] directionsOptmizationWeight,
                                       int defFieldUpdateMode)
    • Method Detail

      • robustMaximum

        private static final float robustMaximum​(float[] image,
                                                 float ratio,
                                                 int scales,
                                                 int nx,
                                                 int ny,
                                                 int nz)
        Robust maximum estimation
        Parameters:
        ratio - float fraction in [0,1]: the minimum number of points above or equal to the maximum over the total volume
        scales - int: the number of times the scale is refined for finding the robust maximum
        nx - ,ny,nz image dimensions
        Returns:
        the robust maximum value
      • robustMinimum

        private static final float robustMinimum​(float[] image,
                                                 float ratio,
                                                 int scales,
                                                 int nx,
                                                 int ny,
                                                 int nz)
        Robust maximum estimation
        Parameters:
        ratio - float fraction in [0,1]: the minimum number of points below or equal to the minimum over the total volume
        scales - int: the number of times the scale is refined for finding the robust minimum
        Returns:
        the robust minimum value
      • coarseGradientParameters

        public int coarseGradientParameters()
      • dispose

        public void dispose()
      • prepareForNextLevel

        public int[] prepareForNextLevel()
      • setResolution

        public void setResolution​(float downSampleFactor)
      • updateDefField

        private void updateDefField​(int[] regionToUpdate)
      • calculateBoundingBox

        void calculateBoundingBox()
      • getDeformationField

        ModelImage getDeformationField()
      • getDeformedSubject

        ModelImage getDeformedSubject()
      • getDomainMax

        public double getDomainMax()
      • getDomainMin

        public double getDomainMin()
      • getDomainTolerance

        public double getDomainTolerance()
      • getValue

        public double getValue​(double c)
      • coarseGradient

        public void coarseGradient​(int[] regionCenter,
                                   double[] results)
      • updateFromCoarseOptimization

        void updateFromCoarseOptimization​(double coeff)
      • coarseOptimize

        public double coarseOptimize​(int[] regionCenter,
                                     double[] gradient)
      • coarseCostFunctionCommit

        private double coarseCostFunctionCommit​(double coeff,
                                                boolean commitUpdate)
      • coarseCostFunction

        private double coarseCostFunction​(double coeff)
      • copyHist

        private int[] copyHist​(int[] in)
      • copyHist

        private int[][] copyHist​(int[][] in)
      • copyHist

        private int[][][] copyHist​(int[][][] vol)
      • resetCurrentHistograms

        private void resetCurrentHistograms()
      • getCurrentNMI

        private double getCurrentNMI()
      • adjustOrigBins

        private void adjustOrigBins​(int subBin,
                                    int tarBin,
                                    int newBin)
      • getNMIGradients

        private void getNMIGradients​(double[] results,
                                     double[] deltaC)
      • adjustGradientBins

        private void adjustGradientBins​(VabraVolumeCollection subject,
                                        double x,
                                        double y,
                                        double z,
                                        int[] subjectHist,
                                        int[] jointHist,
                                        int targetBins,
                                        int subjectBins)
      • adjustBins

        private void adjustBins​(int[] subjectHist,
                                int[] jointHist,
                                int subBin,
                                int tarBin,
                                int newBin)
      • eval

        public double eval​(double arg0)
        Specified by:
        eval in interface de.jtem.numericalMethods.calculus.function.RealFunctionOfOneVariable