Package gov.nih.mipav.model.algorithms
Class AlgorithmTalairachTransform
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.AlgorithmTalairachTransform
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmTalairachTransform extends AlgorithmBase
Performs original to ACPC, original to Talairach, ACPC to original, ACPC to Talairach, Talairach to original, or Talairach to ACPC transformation.- Version:
- May 26, 2005
- Author:
- Pilou Bazin
-
-
Field Summary
Fields Modifier and Type Field Description static int
ACPC_TO_ORIG
DOCUMENT ME!static int
ACPC_TO_TLRC
DOCUMENT ME!static int
BILINEAR
Biilinear interpolation.private AlgorithmBSpline
Bspline
DOCUMENT ME!static int
BSPLINE3
Cubic bspline interpolation.static int
BSPLINE4
Quadratic bspline interpolation.private AlgorithmCubicLagrangian
CLag
DOCUMENT ME!static int
CUBIC_LAGRANGIAN
Cubic lagrangian interpolation.(package private) boolean
doClip
DOCUMENT ME!(package private) boolean
doVOI
DOCUMENT ME!static int
HEPTIC_LAGRANGIAN
Heptic lagrangian interpolation.private AlgorithmHepticLagrangian
HLag
DOCUMENT ME!(package private) int
interpolation
DOCUMENT ME!private int[]
inVolExtents
DOCUMENT ME!static int
NEAREST_NEIGHBOR
Nearest neighbor interpolation.private int
nix
DOCUMENT ME!private int
niy
DOCUMENT ME!private int
niz
DOCUMENT ME!private int
nrx
DOCUMENT ME!private int
nry
DOCUMENT ME!private int
nrz
DOCUMENT ME!static int
ORIG_TO_ACPC
DOCUMENT ME!static int
ORIG_TO_TLRC
DOCUMENT ME!private AlgorithmQuinticLagrangian
QLag
DOCUMENT ME!static int
QUINTIC_LAGRANGIAN
Quintic lagrangian interpolation.(package private) java.lang.String
suffix
DOCUMENT ME!private TalairachTransformInfo
tInfo
DOCUMENT ME!static int
TLRC_TO_ACPC
DOCUMENT ME!static int
TLRC_TO_ORIG
DOCUMENT ME!(package private) int
transformType
DOCUMENT ME!(package private) java.lang.String
transformTypeName
DOCUMENT ME!static int
TRILINEAR
Trilinear interpolation.private AlgorithmWSinc
WSinc
DOCUMENT ME!static int
WSINC
Windowed sinc interpolation.-
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 AlgorithmTalairachTransform(ModelImage destImage, ModelImage srcImage, TalairachTransformInfo tInfo, int transformType, int interpolation, boolean doClip, boolean doVOI)
Creates a new AlgorithmTalairachTransform object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
computeBSplineImage(float xi, float yi, float zi, float[] result, int xr, int yr, int zr)
DOCUMENT ME!private void
computeCubicLagrangian(float xi, float yi, float zi, float[] result, int xr, int yr, int zr)
DOCUMENT ME!private void
computeHepticLagrangian(float xi, float yi, float zi, float[] result, int xr, int yr, int zr)
DOCUMENT ME!private void
computeNearestImage(double[] img, float xi, float yi, float zi, float[] result, int xr, int yr, int zr)
Transforms and resamples volume using nearest neighbor interpolation.private void
computeQuinticLagrangian(float xi, float yi, float zi, float[] result, int xr, int yr, int zr)
DOCUMENT ME!private void
computeTrilinearImage(double[] img, float xi, float yi, float zi, float[] result, int xr, int yr, int zr)
Transforms and resamples volume using trilinear interpolation.private void
computeWSincImage(float xi, float yi, float zi, float[] result, int xr, int yr, int zr)
DOCUMENT ME!void
disposeLocal()
Dispose of local variables that may be taking up lots of room.private VOI
generateVOI(VOI obj, java.util.BitSet mask)
extract a VOI from a binary mask image.void
runAlgorithm()
DOCUMENT ME!private void
transformTalairachVolume(double[] img, float[] result)
computes the selected Talairach transform.-
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
-
TRILINEAR
public static final int TRILINEAR
Trilinear interpolation.- See Also:
- Constant Field Values
-
BILINEAR
public static final int BILINEAR
Biilinear interpolation.- See Also:
- Constant Field Values
-
NEAREST_NEIGHBOR
public static final int NEAREST_NEIGHBOR
Nearest neighbor interpolation.- See Also:
- Constant Field Values
-
BSPLINE3
public static final int BSPLINE3
Cubic bspline interpolation.- See Also:
- Constant Field Values
-
BSPLINE4
public static final int BSPLINE4
Quadratic bspline interpolation.- See Also:
- Constant Field Values
-
CUBIC_LAGRANGIAN
public static final int CUBIC_LAGRANGIAN
Cubic lagrangian interpolation.- See Also:
- Constant Field Values
-
QUINTIC_LAGRANGIAN
public static final int QUINTIC_LAGRANGIAN
Quintic lagrangian interpolation.- See Also:
- Constant Field Values
-
HEPTIC_LAGRANGIAN
public static final int HEPTIC_LAGRANGIAN
Heptic lagrangian interpolation.- See Also:
- Constant Field Values
-
WSINC
public static final int WSINC
Windowed sinc interpolation.- See Also:
- Constant Field Values
-
ORIG_TO_ACPC
public static final int ORIG_TO_ACPC
DOCUMENT ME!- See Also:
- Constant Field Values
-
ORIG_TO_TLRC
public static final int ORIG_TO_TLRC
DOCUMENT ME!- See Also:
- Constant Field Values
-
ACPC_TO_TLRC
public static final int ACPC_TO_TLRC
DOCUMENT ME!- See Also:
- Constant Field Values
-
TLRC_TO_ACPC
public static final int TLRC_TO_ACPC
DOCUMENT ME!- See Also:
- Constant Field Values
-
TLRC_TO_ORIG
public static final int TLRC_TO_ORIG
DOCUMENT ME!- See Also:
- Constant Field Values
-
ACPC_TO_ORIG
public static final int ACPC_TO_ORIG
DOCUMENT ME!- See Also:
- Constant Field Values
-
doClip
boolean doClip
DOCUMENT ME!
-
doVOI
boolean doVOI
DOCUMENT ME!
-
interpolation
int interpolation
DOCUMENT ME!
-
suffix
java.lang.String suffix
DOCUMENT ME!
-
transformType
int transformType
DOCUMENT ME!
-
transformTypeName
java.lang.String transformTypeName
DOCUMENT ME!
-
Bspline
private AlgorithmBSpline Bspline
DOCUMENT ME!
-
CLag
private AlgorithmCubicLagrangian CLag
DOCUMENT ME!
-
HLag
private AlgorithmHepticLagrangian HLag
DOCUMENT ME!
-
inVolExtents
private int[] inVolExtents
DOCUMENT ME!
-
nix
private int nix
DOCUMENT ME!
-
niy
private int niy
DOCUMENT ME!
-
niz
private int niz
DOCUMENT ME!
-
nrx
private int nrx
DOCUMENT ME!
-
nry
private int nry
DOCUMENT ME!
-
nrz
private int nrz
DOCUMENT ME!
-
QLag
private AlgorithmQuinticLagrangian QLag
DOCUMENT ME!
-
tInfo
private TalairachTransformInfo tInfo
DOCUMENT ME!
-
WSinc
private AlgorithmWSinc WSinc
DOCUMENT ME!
-
-
Constructor Detail
-
AlgorithmTalairachTransform
public AlgorithmTalairachTransform(ModelImage destImage, ModelImage srcImage, TalairachTransformInfo tInfo, int transformType, int interpolation, boolean doClip, boolean doVOI)
Creates a new AlgorithmTalairachTransform object.- Parameters:
destImage
- DOCUMENT ME!srcImage
- DOCUMENT ME!tInfo
- DOCUMENT ME!transformType
- DOCUMENT ME!interpolation
- DOCUMENT ME!doClip
- DOCUMENT ME!doVOI
- DOCUMENT ME!
-
-
Method Detail
-
disposeLocal
public void disposeLocal()
Dispose of local variables that may be taking up lots of room.
-
runAlgorithm
public void runAlgorithm()
DOCUMENT ME!- Specified by:
runAlgorithm
in classAlgorithmBase
-
computeBSplineImage
private void computeBSplineImage(float xi, float yi, float zi, float[] result, int xr, int yr, int zr)
DOCUMENT ME!- Parameters:
xi
- DOCUMENT ME!yi
- DOCUMENT ME!zi
- DOCUMENT ME!result
- DOCUMENT ME!xr
- DOCUMENT ME!yr
- DOCUMENT ME!zr
- DOCUMENT ME!
-
computeCubicLagrangian
private void computeCubicLagrangian(float xi, float yi, float zi, float[] result, int xr, int yr, int zr)
DOCUMENT ME!- Parameters:
xi
- DOCUMENT ME!yi
- DOCUMENT ME!zi
- DOCUMENT ME!result
- DOCUMENT ME!xr
- DOCUMENT ME!yr
- DOCUMENT ME!zr
- DOCUMENT ME!
-
computeHepticLagrangian
private void computeHepticLagrangian(float xi, float yi, float zi, float[] result, int xr, int yr, int zr)
DOCUMENT ME!- Parameters:
xi
- DOCUMENT ME!yi
- DOCUMENT ME!zi
- DOCUMENT ME!result
- DOCUMENT ME!xr
- DOCUMENT ME!yr
- DOCUMENT ME!zr
- DOCUMENT ME!
-
computeNearestImage
private void computeNearestImage(double[] img, float xi, float yi, float zi, float[] result, int xr, int yr, int zr)
Transforms and resamples volume using nearest neighbor interpolation.- Parameters:
img
- DOCUMENT ME!xi
- DOCUMENT ME!yi
- DOCUMENT ME!zi
- DOCUMENT ME!result
- DOCUMENT ME!xr
- DOCUMENT ME!yr
- DOCUMENT ME!zr
- DOCUMENT ME!
-
computeQuinticLagrangian
private void computeQuinticLagrangian(float xi, float yi, float zi, float[] result, int xr, int yr, int zr)
DOCUMENT ME!- Parameters:
xi
- DOCUMENT ME!yi
- DOCUMENT ME!zi
- DOCUMENT ME!result
- DOCUMENT ME!xr
- DOCUMENT ME!yr
- DOCUMENT ME!zr
- DOCUMENT ME!
-
computeTrilinearImage
private void computeTrilinearImage(double[] img, float xi, float yi, float zi, float[] result, int xr, int yr, int zr)
Transforms and resamples volume using trilinear interpolation.- Parameters:
img
- DOCUMENT ME!xi
- DOCUMENT ME!yi
- DOCUMENT ME!zi
- DOCUMENT ME!result
- DOCUMENT ME!xr
- DOCUMENT ME!yr
- DOCUMENT ME!zr
- DOCUMENT ME!
-
computeWSincImage
private void computeWSincImage(float xi, float yi, float zi, float[] result, int xr, int yr, int zr)
DOCUMENT ME!- Parameters:
xi
- DOCUMENT ME!yi
- DOCUMENT ME!zi
- DOCUMENT ME!result
- DOCUMENT ME!xr
- DOCUMENT ME!yr
- DOCUMENT ME!zr
- DOCUMENT ME!
-
generateVOI
private VOI generateVOI(VOI obj, java.util.BitSet mask)
extract a VOI from a binary mask image.- Parameters:
obj
- DOCUMENT ME!mask
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
transformTalairachVolume
private void transformTalairachVolume(double[] img, float[] result)
computes the selected Talairach transform.- Parameters:
img
- the original imageresult
- the transformed image
-
-