Class AlgorithmRegPatientPos
java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.registration.AlgorithmRegPatientPos
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
Use origin and image orientations to align images based on patient position.
- Version:
- 1.0 Sept 2000
- Author:
- Delia McGarry, Zohara Cohen
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate TransMatrixDOCUMENT ME!private int[]DOCUMENT ME!private int[]DOCUMENT ME!private double[]DOCUMENT ME!private double[]DOCUMENT ME!private double[]private double dimA[], resA[];.private booleanDOCUMENT ME!private ModelImageDOCUMENT ME!private ModelImageDOCUMENT ME!private int[]DOCUMENT ME!private int[]DOCUMENT ME!(package private) StringDOCUMENT ME!private TransMatrixDOCUMENT ME!private TransMatrixDOCUMENT ME!private TransMatrixDOCUMENT ME!private TransMatrixDOCUMENT ME!private ModelImageDOCUMENT ME!private double[][]DOCUMENT ME!private double[][]DOCUMENT ME!private double[]private double dimA[], resA[];.private ModelImageDOCUMENT ME!private ModelImageDOCUMENT ME!private int[]DOCUMENT ME!private int[]DOCUMENT ME!private double[]DOCUMENT ME!private double[]DOCUMENT ME!private double[]DOCUMENT ME!private double[]DOCUMENT ME!private double[]DOCUMENT ME!private double[]DOCUMENT ME!Fields 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
ConstructorsConstructorDescriptionAlgorithmRegPatientPos(ModelImage imageA, ModelImage imageB, boolean doMatch) Creates new algorithm. -
Method Summary
Modifier and TypeMethodDescriptionvoidfinalize()Prepares this class for destruction.private voidGet indices for reordering data from Image B to the Axial coordinate system (LPS) and to the coordinate system of Image A.voidgetPatientOrientation(double[] xOrient, double[] yOrient, ModelImage image) Extract orientation info from file header.voidgetPatientPosition(double[] coord, ModelImage image) Extracts the origin from image file info.Accessor that returns the result image.private voidGet transformation matrix from Image B to Image A.private voidAdd image margins to image B, or crop to match Image A.private voidreOrient()Reorient ImageB so that directions will coincide with ImageA.voidStarts the program.(package private) double[]vectorCrossProduct(double[] a, double[] b) Returns orgthogonal vector.Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
actionPerformed, addListener, addProgressChangeListener, calculateImageSize, calculatePrincipleAxis, computeElapsedTime, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, delinkProgressToAlgorithmMulti, displayError, errorCleanUp, 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
-
name
String nameDOCUMENT ME! -
alignmentXfrm
DOCUMENT ME! -
axisDirA
private int[] axisDirADOCUMENT ME! -
axisDirB
private int[] axisDirBDOCUMENT ME! -
coordA
private double[] coordADOCUMENT ME! -
coordB
private double[] coordBDOCUMENT ME! -
dimB
private double[] dimBprivate double dimA[], resA[];. -
resB
private double[] resBprivate double dimA[], resA[];. -
doMatch
private boolean doMatchDOCUMENT ME! -
imageA
DOCUMENT ME! -
imageB
DOCUMENT ME! -
orientedImgB
DOCUMENT ME! -
shiftedImgB
DOCUMENT ME! -
resultImg
DOCUMENT ME! -
index2Axial
private int[] index2AxialDOCUMENT ME! -
index2ImgA
private int[] index2ImgADOCUMENT ME! -
sign2Axial
private int[] sign2AxialDOCUMENT ME! -
sign2ImgA
private int[] sign2ImgADOCUMENT ME! -
orientA
DOCUMENT ME! -
orientB
DOCUMENT ME! -
orientA_inv
DOCUMENT ME! -
orientB_inv
DOCUMENT ME! -
orientMatrixA
private double[][] orientMatrixADOCUMENT ME! -
orientMatrixB
private double[][] orientMatrixBDOCUMENT ME! -
xOrientA
private double[] xOrientADOCUMENT ME! -
yOrientA
private double[] yOrientADOCUMENT ME! -
zOrientA
private double[] zOrientADOCUMENT ME! -
xOrientB
private double[] xOrientBDOCUMENT ME! -
yOrientB
private double[] yOrientBDOCUMENT ME! -
zOrientB
private double[] zOrientBDOCUMENT ME!
-
-
Constructor Details
-
AlgorithmRegPatientPos
Creates new algorithm.- Parameters:
imageA- image AimageB- image B, to be registered to imageAdoMatch- whether to match the image origins
-
-
Method Details
-
finalize
public void finalize()Prepares this class for destruction.- Overrides:
finalizein classAlgorithmBase
-
getPatientOrientation
Extract orientation info from file header.- Parameters:
xOrient- 3D array of directional cosines in xyOrient- 3D array of directional cosines in yimage- image
-
getPatientPosition
Extracts the origin from image file info.- Parameters:
coord- 3D array of patient position x,y,z *image- image
-
getResultImage
Accessor that returns the result image.- Returns:
- result image
-
runAlgorithm
public void runAlgorithm()Starts the program.- Specified by:
runAlgorithmin classAlgorithmBase
-
vectorCrossProduct
double[] vectorCrossProduct(double[] a, double[] b) Returns orgthogonal vector.- Parameters:
a- vectorb- vector- Returns:
- vector orthogonal to a invalid input: '&' b
-
getIndices
private void getIndices()Get indices for reordering data from Image B to the Axial coordinate system (LPS) and to the coordinate system of Image A. -
getTransform
private void getTransform()Get transformation matrix from Image B to Image A. -
matchOrigin
private void matchOrigin()Add image margins to image B, or crop to match Image A. -
reOrient
private void reOrient()Reorient ImageB so that directions will coincide with ImageA.
-