Package gov.nih.mipav.model.algorithms
Class MotionDetection
- java.lang.Object
- 
- java.lang.Thread
- 
- gov.nih.mipav.model.algorithms.AlgorithmBase
- 
- gov.nih.mipav.model.algorithms.MotionDetection
 
 
 
- 
- All Implemented Interfaces:
- AlgorithmInterface,- java.awt.event.ActionListener,- java.awt.event.WindowListener,- java.lang.Runnable,- java.util.EventListener
 
 public class MotionDetection extends AlgorithmBase implements AlgorithmInterface MIT License Copyright (c) 2021 Jitendra Singh Bisht Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Port of motion_detection.py
- 
- 
Field SummaryFields Modifier and Type Field Description private double[]blurprivate intminPixelsprivate doublethreshValue- 
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBasedestFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, srcImage, threadStopped
 
- 
 - 
Constructor SummaryConstructors Constructor Description MotionDetection(ModelImage srcImg, double threshValue, int minPixels)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidalgorithmPerformed(AlgorithmBase algorithm)Called after an algorithm this listener is registered to exits (maybe successfully, maybe not).voidrunAlgorithm()Actually runs the algorithm.private voidselfTest()- 
Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBaseactionPerformed, 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.ThreadactiveCount, 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
 
- 
 
- 
- 
- 
Constructor Detail- 
MotionDetectionpublic MotionDetection(ModelImage srcImg, double threshValue, int minPixels) 
 
- 
 - 
Method Detail- 
runAlgorithmpublic void runAlgorithm() Description copied from class:AlgorithmBaseActually runs the algorithm. Implemented by inheriting algorithms.- Specified by:
- runAlgorithmin class- AlgorithmBase
 
 - 
algorithmPerformedpublic void algorithmPerformed(AlgorithmBase algorithm) Description copied from interface:AlgorithmInterfaceCalled after an algorithm this listener is registered to exits (maybe successfully, maybe not). If the algorithm is run in a separate thread, this call will be made within that thread. If not, this call will be made from that same, shared thread.- Specified by:
- algorithmPerformedin interface- AlgorithmInterface
- Parameters:
- algorithm- the algorithm which has just completed
 
 - 
selfTestprivate void selfTest() 
 
- 
 
-