Class AlgorithmCropTilted
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.utilities.AlgorithmCropTilted
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmCropTilted extends AlgorithmBase
Algorithm to crop a tilted rectangle
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEGREES
used for setting rotation(package private) int
MASK_METHOD
(package private) int
method
static int
RADIANS
used for setting rotationprivate ModelImage
resultImage
private boolean
run2D
(package private) int
VERTICES_METHOD
(package private) int
VOI_METHOD
private double
x1
private double
x2
private double
x3
private double
x4
private double
x5
private double
x6
private double
x7
private double
x8
private double
y1
private double
y2
private double
y3
private double
y4
private double
y5
private double
y6
private double
y7
private double
y8
private double
z1
private double
z2
private double
z3
private double
z4
private double
z5
private double
z6
private double
z7
private double
z8
-
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 AlgorithmCropTilted(ModelImage srcImage, double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, double x4, double y4, double z4, double x5, double y5, double z5, double x6, double y6, double z6, double x7, double y7, double z7, double x8, double y8, double z8, int method)
Rotate tilted cuboid to remove tilt and crop cuboid.AlgorithmCropTilted(ModelImage srcImage, double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, int method)
Rotate tilted rectangle to remove tilt and crop rectangle.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModelImage
getResultImage()
void
runAlgorithm()
Actually runs the algorithm.-
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
-
x1
private double x1
-
x2
private double x2
-
x3
private double x3
-
x4
private double x4
-
x5
private double x5
-
x6
private double x6
-
x7
private double x7
-
x8
private double x8
-
y1
private double y1
-
y2
private double y2
-
y3
private double y3
-
y4
private double y4
-
y5
private double y5
-
y6
private double y6
-
y7
private double y7
-
y8
private double y8
-
z1
private double z1
-
z2
private double z2
-
z3
private double z3
-
z4
private double z4
-
z5
private double z5
-
z6
private double z6
-
z7
private double z7
-
z8
private double z8
-
VERTICES_METHOD
final int VERTICES_METHOD
- See Also:
- Constant Field Values
-
VOI_METHOD
final int VOI_METHOD
- See Also:
- Constant Field Values
-
MASK_METHOD
final int MASK_METHOD
- See Also:
- Constant Field Values
-
method
int method
-
resultImage
private ModelImage resultImage
-
DEGREES
public static final int DEGREES
used for setting rotation- See Also:
- Constant Field Values
-
RADIANS
public static final int RADIANS
used for setting rotation- See Also:
- Constant Field Values
-
run2D
private boolean run2D
-
-
Constructor Detail
-
AlgorithmCropTilted
public AlgorithmCropTilted(ModelImage srcImage, double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, int method)
Rotate tilted rectangle to remove tilt and crop rectangle.- Parameters:
srcImage
- original imagex1
-y1
-x2
-y2
-x3
-y3
-x4
-y4
-
-
AlgorithmCropTilted
public AlgorithmCropTilted(ModelImage srcImage, double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, double x4, double y4, double z4, double x5, double y5, double z5, double x6, double y6, double z6, double x7, double y7, double z7, double x8, double y8, double z8, int method)
Rotate tilted cuboid to remove tilt and crop cuboid.- Parameters:
srcImage
- original imagex1
-y1
-z1
-x2
-y2
-z2
-x3
-y3
-z3
-x4
-y4
-z4
-x5
-y5
-z5
-x6
-y6
-z6
-x7
-y7
-z7
-x8
-y8
-z8
-
-
-
Method Detail
-
runAlgorithm
public void runAlgorithm()
Description copied from class:AlgorithmBase
Actually runs the algorithm. Implemented by inheriting algorithms.- Specified by:
runAlgorithm
in classAlgorithmBase
-
getResultImage
public ModelImage getResultImage()
-
-