Package gov.nih.mipav.model.algorithms
Class DoublyConnectedSC
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.DoublyConnectedSC
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class DoublyConnectedSC extends AlgorithmBase
-
-
Field Summary
Fields Modifier and Type Field Description private double[]
ALFA02
private double[]
ALFA12
private double[]
C2
private double
DLAM
private int
dscfun
private double[][]
FORWARD_POINTS
private int
ICOUNT
private int
IGUESS
private int[]
IND
private double[][]
INVERSE_POINTS
private int
IPOLY
private int
ISHAPE
private int
ISHAPE2
private int
ISOLV
private int
ISPRT
private int
IU
private int
LINEARC
private int
LINEARC2
private java.util.Vector<java.lang.Double>[][]
linhx
private java.util.Vector<java.lang.Double>[][]
linhy
private int[]
M
private int
M2
private double
MACHEP
private int[]
N
private int
N2
private int
NPTQ
private int
NPTQ2
private int
NSHAPE
private double[]
PHI02
private double[]
PHI12
private double[]
QWORK2
private SchwarzChristoffelMapping
scm
private boolean
testRoutine
private double
TOL
private double[]
U2
private double[]
UARY
private double[]
VARY
private double[][]
W02
private double[][]
W12
private double[][]
Z0
private double[][]
Z02
private double[][]
Z1
private double[][]
Z12
-
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, srcImage, threadStopped
-
-
Constructor Summary
Constructors Constructor Description DoublyConnectedSC()
DoublyConnectedSC(int IPOLY, int NPTQ, int ISOLV, int ISPRT)
DoublyConnectedSC(ModelImage destImg, ModelImage srcImg, double[][] Z0, double[][] Z1, int NPTQ, int ISPRT, int IGUESS, int LINEARC, double TOL)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
ANGLES(int MN, double[][] Z01, double[] ALFA01, int I01)
private double
ARGUM(double U1, double[] W01K)
private void
CHECK(double[] ALFA0, double[] ALFA1, int M, int N, int ISHAPE)
private void
CLASS(int N, double ALPHA, double BETA, double[] B, double[] A, double[] MUZERO)
private double
DGAMMA(double X)
private double
DIST(int M, int N, double[][] W0, double[][] W1, double[] W, int KWA, int IC)
private void
DOGLEG(int N, double[] R, int LR, double[] DIAG, double[] QTB, double DELTA, double[] X, double[] WA1, double[] WA2)
private void
DSCDATA(int IPOLY, int[] M, int[] N, double[][] Z0, double[][] Z1, double[] ALFA0, double[] ALFA1)
private void
DSCFUN(int NDIM, double[] X, double[] FVAL, int[] IFLAG)
private void
DSCPRINT(int M, int N, double[] C, double U, double[][] W0, double[][] W1, double[] PHI0, double[] PHI1, double TOL, int NPTQ)
private void
DSCSOLV(double TOL, int IGUESS, int M, int N, double[] U, double[] C, double[][] W0, double[][] W1, double[] PHI0, double[] PHI1, double[][] Z0, double[][] Z1, double[] ALFA0, double[] ALFA1, int NPTQ, double[] QWORK, int ISHAPE, int LINEARC)
private void
DSCTEST(int M, int N, double U, double[] C, double[][] W0, double[][] W1, double[][] Z0, double[][] Z1, double[] ALFA0, double[] ALFA1, int NPTQ, double[] QWORK)
private double
ENORM(int N, double[] X)
private void
FDJAC1(int FCN, int N, double[] X, double[] FVEC, double[][] FJAC, int LDFJAC, int[] IFLAG, int ML, int MU, double EPSFCN, double[] WA1, double[] WA2)
private double
FMAX(int MN, double[] FVAL)
private void
GAUSSJ(int N, double ALPHA, double BETA, double[] B, double[] T, double[] W)
private void
HYBRD(int FCN, int N, double[] X, double[] FVEC, double XTOL, int MAXFEV, int ML, int MU, double EPSFCN, double[] DIAG, int MODE, double FACTOR, int NPRINT, int[] INFO, int[] NFEV, double[][] FJAC, int LDFJAC, double[] R, int LR, double[] QTF, double[] WA1, double[] WA2, double[] WA3, double[] WA4)
private void
IMTQL2(int N, double[] D, double[] E, double[] Z, int[] IERR)
private void
NEARW(int M, int N, double[][] W0, double[][] W1, double[] ALFA0, double[] W, int[] KNEAR, int[] INEAR)
private void
NEARZ(int M, int N, double[][] Z0, double[][] Z1, double[] ALFA0, double[] Z, int[] KNZ, int[] INZ)
private void
plot(double U, double[] R, double[] theta, int num1draw, int num2draw, int yInvert, double[][] W0, double[][] W1, double[][] Z0, double[][] Z1, double[] ALFA0, double[] ALFA1, double[] QWORK, double[] C)
private void
QFORM(int M, int N, double[][] Q, int LDQ, double[] WA)
private void
QINIT(int M, int N, double[] ALFA0, double[] ALFA1, int NPTQ, double[] QWORK)
private void
QRFAC(int M, int N, double[][] A, int LDA, boolean PIVOT, int[] IPVT, int LIPVT, double[] RDIAG, double[] ACNORM, double[] WA)
private void
R1MPYQ(int M, int N, double[][] A, int LDA, double[] V, double[] W)
private void
R1UPDT(int M, int N, double[] S, int LS, double[] U, double[] V, double[] W, boolean[] SING)
void
runAlgorithm()
Actually runs the algorithm.private void
THDATA(double[] U)
private double[]
WDSC(double[] ZZ, int M, int N, double U, double[] C, double[][] W0, double[][] W1, double[][] Z0, double[][] Z1, double[] ALFA0, double[] ALFA1, double[] PHI0, double[] PHI1, int NPTQ, double[] QWORK, double EPS, int IOPT)
private double[]
WPROD(double[] W, int M, int N, double U, double[][] W0, double[][] W1, double[] ALFA0, double[] ALFA1)
private double[]
WQSUM(double[] WA, double PHIA, int KWA, int IC, double[] WB, double PHIB, double RADIUS, int M, int N, double U, double[][] W0, double[][] W1, double[] ALFA0, double[] ALFA1, int NPTQ, double[] QWORK, int LINEARC)
private double[]
WQUAD(double[] WA, double PHIA, int KWA, int ICA, double[] WB, double PHIB, int KWB, int ICB, double RADIUS, int M, int N, double U, double[][] W0, double[][] W1, double[] ALFA0, double[] ALFA1, int NPTQ, double[] QWORK, int LINEARC, int IEVL)
private double[]
WQUAD1(double[] WA, double PHIA, int KWA, int IC, double[] WB, double PHIB, double RADIUS, int M, int N, double U, double[][] W0, double[][] W1, double[] ALFA0, double[] ALFA1, int NPTQ, double[] QWORK, int LINEARC)
private double[]
WTHETA(double U, double[] W)
private void
XWTRAN(int M, int N, double[] X, double[] U, double[] C, double[][] W0, double[][] W1, double[] PHI0, double[] PHI1)
private double[]
ZDSC(double[] WW, int KWW, int IC, int M, int N, double U, double[] C, double[][] W0, double[][] W1, double[][] Z0, double[][] Z1, double[] ALFA0, double[] ALFA1, double[] PHI0, double[] PHI1, int NPTQ, double[] QWORK, int IOPT)
-
Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
actionPerformed, addListener, addProgressChangeListener, calculateImageSize, calculatePrincipleAxis, computeElapsedTime, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, delinkProgressToAlgorithmMulti, displayError, errorCleanUp, finalize, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, generateProgressValues, getDestImage, getElapsedTime, getMask, getMaxProgressValue, getMinProgressValue, getNumberOfThreads, getProgress, getProgressChangeListener, getProgressChangeListeners, getProgressModulus, getProgressStep, getProgressValues, getSrcImage, isCompleted, isImage25D, isMultiThreadingEnabled, isRunningInSeparateThread, isThreadStopped, linkProgressToAlgorithm, linkProgressToAlgorithm, makeProgress, notifyListeners, removeListener, removeProgressChangeListener, run, setCompleted, setImage25D, setMask, setMaxProgressValue, setMinProgressValue, setMultiThreadingEnabled, setNumberOfThreads, setProgress, setProgressModulus, setProgressStep, setProgressValues, setProgressValues, setRunningInSeparateThread, setSrcImage, setStartTime, setThreadStopped, startMethod, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
dscfun
private final int dscfun
- See Also:
- Constant Field Values
-
W02
private double[][] W02
-
W12
private double[][] W12
-
Z02
private double[][] Z02
-
Z12
private double[][] Z12
-
C2
private double[] C2
-
U2
private double[] U2
-
PHI02
private double[] PHI02
-
PHI12
private double[] PHI12
-
ALFA02
private double[] ALFA02
-
ALFA12
private double[] ALFA12
-
QWORK2
private double[] QWORK2
-
M2
private int M2
-
N2
private int N2
-
NPTQ2
private int NPTQ2
-
ISHAPE2
private int ISHAPE2
-
LINEARC2
private int LINEARC2
-
NSHAPE
private int NSHAPE
-
IND
private int[] IND
-
UARY
private double[] UARY
-
VARY
private double[] VARY
-
DLAM
private double DLAM
-
IU
private int IU
-
ISPRT
private int ISPRT
-
ICOUNT
private int ICOUNT
-
scm
private SchwarzChristoffelMapping scm
-
Z0
private double[][] Z0
-
Z1
private double[][] Z1
-
IPOLY
private int IPOLY
-
NPTQ
private int NPTQ
-
ISOLV
private int ISOLV
-
IGUESS
private int IGUESS
-
LINEARC
private int LINEARC
-
TOL
private double TOL
-
INVERSE_POINTS
private double[][] INVERSE_POINTS
-
FORWARD_POINTS
private double[][] FORWARD_POINTS
-
testRoutine
private boolean testRoutine
-
MACHEP
private double MACHEP
-
M
private int[] M
-
N
private int[] N
-
ISHAPE
private int ISHAPE
-
linhx
private java.util.Vector<java.lang.Double>[][] linhx
-
linhy
private java.util.Vector<java.lang.Double>[][] linhy
-
-
Constructor Detail
-
DoublyConnectedSC
public DoublyConnectedSC()
-
DoublyConnectedSC
public DoublyConnectedSC(int IPOLY, int NPTQ, int ISOLV, int ISPRT)
-
DoublyConnectedSC
public DoublyConnectedSC(ModelImage destImg, ModelImage srcImg, double[][] Z0, double[][] Z1, int NPTQ, int ISPRT, int IGUESS, int LINEARC, double TOL)
-
-
Method Detail
-
runAlgorithm
public void runAlgorithm()
Description copied from class:AlgorithmBase
Actually runs the algorithm. Implemented by inheriting algorithms.- Specified by:
runAlgorithm
in classAlgorithmBase
-
plot
private void plot(double U, double[] R, double[] theta, int num1draw, int num2draw, int yInvert, double[][] W0, double[][] W1, double[][] Z0, double[][] Z1, double[] ALFA0, double[] ALFA1, double[] QWORK, double[] C)
-
DSCDATA
private void DSCDATA(int IPOLY, int[] M, int[] N, double[][] Z0, double[][] Z1, double[] ALFA0, double[] ALFA1)
-
THDATA
private void THDATA(double[] U)
-
WTHETA
private double[] WTHETA(double U, double[] W)
-
WPROD
private double[] WPROD(double[] W, int M, int N, double U, double[][] W0, double[][] W1, double[] ALFA0, double[] ALFA1)
-
WQSUM
private double[] WQSUM(double[] WA, double PHIA, int KWA, int IC, double[] WB, double PHIB, double RADIUS, int M, int N, double U, double[][] W0, double[][] W1, double[] ALFA0, double[] ALFA1, int NPTQ, double[] QWORK, int LINEARC)
-
WQUAD1
private double[] WQUAD1(double[] WA, double PHIA, int KWA, int IC, double[] WB, double PHIB, double RADIUS, int M, int N, double U, double[][] W0, double[][] W1, double[] ALFA0, double[] ALFA1, int NPTQ, double[] QWORK, int LINEARC)
-
WQUAD
private double[] WQUAD(double[] WA, double PHIA, int KWA, int ICA, double[] WB, double PHIB, int KWB, int ICB, double RADIUS, int M, int N, double U, double[][] W0, double[][] W1, double[] ALFA0, double[] ALFA1, int NPTQ, double[] QWORK, int LINEARC, int IEVL)
-
XWTRAN
private void XWTRAN(int M, int N, double[] X, double[] U, double[] C, double[][] W0, double[][] W1, double[] PHI0, double[] PHI1)
-
FMAX
private double FMAX(int MN, double[] FVAL)
-
DSCFUN
private void DSCFUN(int NDIM, double[] X, double[] FVAL, int[] IFLAG)
-
DSCSOLV
private void DSCSOLV(double TOL, int IGUESS, int M, int N, double[] U, double[] C, double[][] W0, double[][] W1, double[] PHI0, double[] PHI1, double[][] Z0, double[][] Z1, double[] ALFA0, double[] ALFA1, int NPTQ, double[] QWORK, int ISHAPE, int LINEARC)
-
ZDSC
private double[] ZDSC(double[] WW, int KWW, int IC, int M, int N, double U, double[] C, double[][] W0, double[][] W1, double[][] Z0, double[][] Z1, double[] ALFA0, double[] ALFA1, double[] PHI0, double[] PHI1, int NPTQ, double[] QWORK, int IOPT)
-
WDSC
private double[] WDSC(double[] ZZ, int M, int N, double U, double[] C, double[][] W0, double[][] W1, double[][] Z0, double[][] Z1, double[] ALFA0, double[] ALFA1, double[] PHI0, double[] PHI1, int NPTQ, double[] QWORK, double EPS, int IOPT)
-
ANGLES
private void ANGLES(int MN, double[][] Z01, double[] ALFA01, int I01)
-
ARGUM
private double ARGUM(double U1, double[] W01K)
-
NEARW
private void NEARW(int M, int N, double[][] W0, double[][] W1, double[] ALFA0, double[] W, int[] KNEAR, int[] INEAR)
-
NEARZ
private void NEARZ(int M, int N, double[][] Z0, double[][] Z1, double[] ALFA0, double[] Z, int[] KNZ, int[] INZ)
-
DIST
private double DIST(int M, int N, double[][] W0, double[][] W1, double[] W, int KWA, int IC)
-
CHECK
private void CHECK(double[] ALFA0, double[] ALFA1, int M, int N, int ISHAPE)
-
DSCPRINT
private void DSCPRINT(int M, int N, double[] C, double U, double[][] W0, double[][] W1, double[] PHI0, double[] PHI1, double TOL, int NPTQ)
-
DSCTEST
private void DSCTEST(int M, int N, double U, double[] C, double[][] W0, double[][] W1, double[][] Z0, double[][] Z1, double[] ALFA0, double[] ALFA1, int NPTQ, double[] QWORK)
-
HYBRD
private void HYBRD(int FCN, int N, double[] X, double[] FVEC, double XTOL, int MAXFEV, int ML, int MU, double EPSFCN, double[] DIAG, int MODE, double FACTOR, int NPRINT, int[] INFO, int[] NFEV, double[][] FJAC, int LDFJAC, double[] R, int LR, double[] QTF, double[] WA1, double[] WA2, double[] WA3, double[] WA4)
-
DOGLEG
private void DOGLEG(int N, double[] R, int LR, double[] DIAG, double[] QTB, double DELTA, double[] X, double[] WA1, double[] WA2)
-
QINIT
private void QINIT(int M, int N, double[] ALFA0, double[] ALFA1, int NPTQ, double[] QWORK)
-
R1MPYQ
private void R1MPYQ(int M, int N, double[][] A, int LDA, double[] V, double[] W)
-
R1UPDT
private void R1UPDT(int M, int N, double[] S, int LS, double[] U, double[] V, double[] W, boolean[] SING)
-
GAUSSJ
private void GAUSSJ(int N, double ALPHA, double BETA, double[] B, double[] T, double[] W)
-
CLASS
private void CLASS(int N, double ALPHA, double BETA, double[] B, double[] A, double[] MUZERO)
-
IMTQL2
private void IMTQL2(int N, double[] D, double[] E, double[] Z, int[] IERR)
-
DGAMMA
private double DGAMMA(double X)
-
ENORM
private double ENORM(int N, double[] X)
-
FDJAC1
private void FDJAC1(int FCN, int N, double[] X, double[] FVEC, double[][] FJAC, int LDFJAC, int[] IFLAG, int ML, int MU, double EPSFCN, double[] WA1, double[] WA2)
-
QFORM
private void QFORM(int M, int N, double[][] Q, int LDQ, double[] WA)
-
QRFAC
private void QRFAC(int M, int N, double[][] A, int LDA, boolean PIVOT, int[] IPVT, int LIPVT, double[] RDIAG, double[] ACNORM, double[] WA)
-
-