Package qupath.lib.plugins
Class CommandLineTaskRunner.CommandLineProgressMonitor
java.lang.Object
qupath.lib.plugins.CommandLineTaskRunner.CommandLineProgressMonitor
- All Implemented Interfaces:
SimpleProgressMonitor
- Enclosing class:
- CommandLineTaskRunner
public static class CommandLineTaskRunner.CommandLineProgressMonitor
extends Object
implements SimpleProgressMonitor
A
SimpleProgressMonitor that sends progress to a log.- Author:
- Pete Bankhead
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if cancel has been requested, for example by the user pressing a 'cancel' button.voidpluginCompleted(String message) Notify the monitor that the plugin has completed its work.voidstartMonitoring(String message, int maxProgress, boolean mayCancel) Set the plugin to monitor, and begin monitoring.voidupdateProgress(int increment, String message, ImageRegion region) Update the displayed progress, and optionally inform the PluginRunner that data related to a specified image region has been updated.
-
Constructor Details
-
CommandLineProgressMonitor
public CommandLineProgressMonitor()
-
-
Method Details
-
startMonitoring
Description copied from interface:SimpleProgressMonitorSet the plugin to monitor, and begin monitoring. Note that since SimpleProgressMonitor are not intended for reuse, this method should only be called once.- Specified by:
startMonitoringin interfaceSimpleProgressMonitor- Parameters:
message- The message to displaymaxProgress- The progress value considered complete.
-
updateProgress
Description copied from interface:SimpleProgressMonitorUpdate the displayed progress, and optionally inform the PluginRunner that data related to a specified image region has been updated. If progress >= 1 this indicates that the task is finished, and the monitor may stop.- Specified by:
updateProgressin interfaceSimpleProgressMonitor- Parameters:
increment- update progress by the specified incrementmessage- optional message that may be displayed to reflect the current progress status.region- optional region of the image that has been changed; in interactive mode, this region may be repainted.
-
pluginCompleted
Description copied from interface:SimpleProgressMonitorNotify the monitor that the plugin has completed its work. This is called automatically by updateProgress if progress >= 1, but may also be called if the plugin was cancelled or otherwise terminated abnormally.- Specified by:
pluginCompletedin interfaceSimpleProgressMonitor- Parameters:
message- message to show upon completion.
-
cancelled
public boolean cancelled()Description copied from interface:SimpleProgressMonitorReturns true if cancel has been requested, for example by the user pressing a 'cancel' button.- Specified by:
cancelledin interfaceSimpleProgressMonitor- Returns:
-