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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if cancel has been requested, for example by the user pressing a 'cancel' button.void
pluginCompleted
(String message) Notify the monitor that the plugin has completed its work.void
startMonitoring
(String message, int maxProgress, boolean mayCancel) Set the plugin to monitor, and begin monitoring.void
updateProgress
(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:SimpleProgressMonitor
Set 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:
startMonitoring
in interfaceSimpleProgressMonitor
- Parameters:
message
- The message to displaymaxProgress
- The progress value considered complete.mayCancel
-
-
updateProgress
Description copied from interface:SimpleProgressMonitor
Update 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:
updateProgress
in 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:SimpleProgressMonitor
Notify 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:
pluginCompleted
in interfaceSimpleProgressMonitor
- Parameters:
message
- message to show upon completion.
-
cancelled
public boolean cancelled()Description copied from interface:SimpleProgressMonitor
Returns true if cancel has been requested, for example by the user pressing a 'cancel' button.- Specified by:
cancelled
in interfaceSimpleProgressMonitor
- Returns:
-