Class VabraSubjectTargetPairs
java.lang.Object
gov.nih.mipav.model.algorithms.registration.vabra.VabraSubjectTargetPairs
- All Implemented Interfaces:
de.jtem.numericalMethods.calculus.function.RealFunctionOfOneVariable
public class VabraSubjectTargetPairs
extends Object
implements de.jtem.numericalMethods.calculus.function.RealFunctionOfOneVariable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int[]private intprivate int[]private intprivate int[]private float[]private doubleprivate int[]private intprivate intprivate intprivate intprivate VabraVolumeCollectionprivate VabraVolumeCollectionprivate VabraVolumeCollectionprivate int[]private int[]private int[]private int[]private int[]private int[]private int[]private int[]private int[]private int[]private int[]private int[]private double[]private doubleprivate doubleprivate static doubleprivate intprivate double[]private int[]private intprivate intprivate int[]private int[]private ModelImageprivate int[]private ModelImageprivate VabraRBFprivate intprivate floatprivate floatprivate VabraVolumeCollectionprivate VabraVolumeCollectionprivate VabraVolumeCollectionprivate doubleprivate float[]private ModelImage[] -
Constructor Summary
ConstructorsConstructorDescriptionVabraSubjectTargetPairs(ModelImage subjectVols, ModelImage targetVols, float robustMaxT, float robustMinT, int numBins, int interpType, boolean useMNMI, double[] directionsOptmizationWeight, int defFieldUpdateMode) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidadjustBins(int[] subjectHist, int[] jointHist, int subBin, int tarBin, int newBin) private voidadjustGradientBins(VabraVolumeCollection subject, double x, double y, double z, int[] subjectHist, int[] jointHist, int targetBins, int subjectBins) private voidadjustOrigBins(int subBin, int tarBin, int newBin) (package private) voidprivate doublecoarseCostFunction(double coeff) private doublecoarseCostFunctionCommit(double coeff, boolean commitUpdate) voidcoarseGradient(int[] regionCenter, double[] results) intdoublecoarseOptimize(int[] regionCenter, double[] gradient) private int[]copyHist(int[] in) private int[][]copyHist(int[][] in) private int[][][]copyHist(int[][][] vol) voiddispose()doubleeval(double arg0) private double(package private) ModelImage(package private) ModelImagedoubledoubledoubleprivate voidgetNMIGradients(double[] results, double[] deltaC) getRBF()doublegetValue(double c) int[]private voidprivate static final floatrobustMaximum(float[] image, float ratio, int scales, int nx, int ny, int nz) Robust maximum estimationprivate static final floatrobustMinimum(float[] image, float ratio, int scales, int nx, int ny, int nz) Robust maximum estimationvoidsetResolution(float downSampleFactor) private voidprivate voidupdateDefField(int[] regionToUpdate) (package private) voidupdateFromCoarseOptimization(double coeff) private voidupdateHistograms(VabraVolumeCollection normedTarget, VabraVolumeCollection normedDeformedSubject, int[] boundingBox)
-
Field Details
-
maxDimensions
private int maxDimensions -
subject
-
deformedSubject
-
target
-
targetBinned
-
deformedSubjectBinned
-
currentDownSampleFactor
private double currentDownSampleFactor -
boundingBox
private int[] boundingBox -
currentDeformField
private float[] currentDeformField -
totalDeformField
private float[] totalDeformField -
origSubjectList
-
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 -
deformedSubjectCopy
-
totalDeformFieldSplit
-
levelCount
private int levelCount -
resCount
private int resCount -
rbf
-
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 Details
-
VabraSubjectTargetPairs
public VabraSubjectTargetPairs(ModelImage subjectVols, ModelImage targetVols, float robustMaxT, float robustMinT, int numBins, int interpType, boolean useMNMI, double[] directionsOptmizationWeight, int defFieldUpdateMode)
-
-
Method Details
-
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 volumescales- int: the number of times the scale is refined for finding the robust maximumnx- ,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 volumescales- 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) -
threshAtRobustMaxAndMin
-
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) -
getRBF
-
copyHist
private int[] copyHist(int[] in) -
copyHist
private int[][] copyHist(int[][] in) -
copyHist
private int[][][] copyHist(int[][][] vol) -
resetCurrentHistograms
private void resetCurrentHistograms() -
updateHistograms
private void updateHistograms(VabraVolumeCollection normedTarget, VabraVolumeCollection normedDeformedSubject, int[] boundingBox) -
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:
evalin interfacede.jtem.numericalMethods.calculus.function.RealFunctionOfOneVariable
-