Package gov.nih.mipav.model.algorithms
Class Quaternions
java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.Quaternions
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
Copyright (c) 2000-2009, Jay St. Pierre
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the distribution
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsFields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, srcImage, threadStoppedFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[][]dcm2q(double[][][] R) intisnormq(double[][] q) intisq(double[][] q) double[][][]q2dcm(double[][] qorg) double[][]qconj(double[][] qinorg, boolean warning) double[][]qcvq(double[][] qorg, double[][] vorg) voidqdecomp(double[][] v, double[] phi, double[][] qorg) double[][]qmult(double[][] q1org, double[][] q2org) double[][]qnorm(double[][] qinorg) double[][]qvqc(double[][] qorg, double[][] v) double[][]qvrot(double[][] q, double[][] v) double[][]qvxform(double[][] q, double[][] v) voidActually runs the algorithm.voidvoidvoidtest_isq()voidvoidvoidvoidvoidvoidvoidMethods 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, windowOpenedMethods 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, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield
-
Field Details
-
UI
-
epsilon
private double epsilon -
neweps
private double neweps
-
-
Constructor Details
-
Quaternions
public Quaternions()
-
-
Method Details
-
runAlgorithm
public void runAlgorithm()Description copied from class:AlgorithmBaseActually runs the algorithm. Implemented by inheriting algorithms.- Specified by:
runAlgorithmin classAlgorithmBase
-
test_isq
public void test_isq() -
test_isnormq
public void test_isnormq() -
test_qnorm
public void test_qnorm() -
test_qmult
public void test_qmult() -
test_qconj
public void test_qconj() -
test_qcvq
public void test_qcvq() -
test_qvqc
public void test_qvqc() -
test_qdecomp
public void test_qdecomp() -
test_dcm2q
public void test_dcm2q() -
test_q2dcm
public void test_q2dcm() -
isq
public int isq(double[][] q) -
isnormq
public int isnormq(double[][] q) -
qnorm
public double[][] qnorm(double[][] qinorg) -
qmult
public double[][] qmult(double[][] q1org, double[][] q2org) -
qconj
public double[][] qconj(double[][] qinorg, boolean warning) -
qcvq
public double[][] qcvq(double[][] qorg, double[][] vorg) -
qvqc
public double[][] qvqc(double[][] qorg, double[][] v) -
qvxform
public double[][] qvxform(double[][] q, double[][] v) -
qvrot
public double[][] qvrot(double[][] q, double[][] v) -
qdecomp
public void qdecomp(double[][] v, double[] phi, double[][] qorg) -
dcm2q
public double[][] dcm2q(double[][][] R) -
q2dcm
public double[][][] q2dcm(double[][] qorg)
-