Class AlgorithmCropTilted
java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.utilities.AlgorithmCropTilted
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
Algorithm to crop a tilted rectangle
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intused for setting rotation(package private) final int(package private) intstatic final intused for setting rotationprivate ModelImageprivate boolean(package private) final int(package private) final intprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleFields 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
ConstructorsConstructorDescriptionAlgorithmCropTilted(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
Modifier and TypeMethodDescriptionvoidActually 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, 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
-
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:
-
VOI_METHOD
final int VOI_METHOD- See Also:
-
MASK_METHOD
final int MASK_METHOD- See Also:
-
method
int method -
resultImage
-
DEGREES
public static final int DEGREESused for setting rotation- See Also:
-
RADIANS
public static final int RADIANSused for setting rotation- See Also:
-
run2D
private boolean run2D
-
-
Constructor Details
-
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 Details
-
runAlgorithm
public void runAlgorithm()Description copied from class:AlgorithmBaseActually runs the algorithm. Implemented by inheriting algorithms.- Specified by:
runAlgorithmin classAlgorithmBase
-
getResultImage
-