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:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class Quaternions extends AlgorithmBase
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.
-
-
Field Summary
Fields Modifier and Type Field Description private double
epsilon
private double
neweps
private ViewUserInterface
UI
-
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 Quaternions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[][]
dcm2q(double[][][] R)
int
isnormq(double[][] q)
int
isq(double[][] q)
double[][][]
q2dcm(double[][] qorg)
double[][]
qconj(double[][] qinorg, boolean warning)
double[][]
qcvq(double[][] qorg, double[][] vorg)
void
qdecomp(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)
void
runAlgorithm()
Actually runs the algorithm.void
test_dcm2q()
void
test_isnormq()
void
test_isq()
void
test_q2dcm()
void
test_qconj()
void
test_qcvq()
void
test_qdecomp()
void
test_qmult()
void
test_qnorm()
void
test_qvqc()
-
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
-
UI
private ViewUserInterface UI
-
epsilon
private double epsilon
-
neweps
private double neweps
-
-
Method Detail
-
runAlgorithm
public void runAlgorithm()
Description copied from class:AlgorithmBase
Actually runs the algorithm. Implemented by inheriting algorithms.- Specified by:
runAlgorithm
in 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)
-
-