Class ImageJMacroRunner
- All Implemented Interfaces:
PathPlugin<BufferedImage>
- Author:
- Pete Bankhead
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addRunnableTasks
(ImageData<BufferedImage> imageData, PathObject parentObject, List<Runnable> tasks) For a specified parent object, generate a task to run.Get a brief description of the plugin's purpose & operation.(Optional) short one-line description of the results, e.g.getName()
Get the name of the plugin for display.protected Collection
<? extends PathObject> getParentObjects
(ImageData<BufferedImage> imageData) Get a collection of objects to process, based on the contents of the PluginRunner.protected Collection
<Class<? extends PathObject>> protected boolean
parseArgument
(ImageData<BufferedImage> imageData, String arg) Parse the input argument, returning 'true' if the argument is valid and it's possible to run the plugin.boolean
runPlugin
(TaskRunner runner, ImageData<BufferedImage> imageData, String arg) Run the plugin.Methods inherited from class qupath.lib.plugins.AbstractPlugin
addWorkflowStep, getTasks, postprocess, preprocess, rearrangeByStride, requestHierarchyUpdate
-
Constructor Details
-
ImageJMacroRunner
Constructor.- Parameters:
qupath
- QuPath instance where the command should be installed.
-
-
Method Details
-
getName
Description copied from interface:PathPlugin
Get the name of the plugin for display.This should be descriptive and, above all, short - as it may be used for menu item names & dialog box titles.
- Returns:
-
getDescription
Description copied from interface:PathPlugin
Get a brief description of the plugin's purpose & operation.If no description is provided, this may return null.
- Returns:
-
runPlugin
Description copied from interface:PathPlugin
Run the plugin. A PluginRunner may be provided that this plugin can use to update the user on its progress.Note: This command should block until it has completed processing.
- Specified by:
runPlugin
in interfacePathPlugin<BufferedImage>
- Overrides:
runPlugin
in classAbstractPlugin<BufferedImage>
- Parameters:
runner
-arg
-- Returns:
-
parseArgument
Description copied from class:AbstractPlugin
Parse the input argument, returning 'true' if the argument is valid and it's possible to run the plugin.This is called from within runPlugin. If it returns 'true', getTasks will be called and then runTasks will submit these to the plugin runner to run. If it returns 'false', runPlugin will immediately abort and return false as well. Since this could result in some internal variables changed (e.g. a ParameterList), implementing classes can't be assumed to be thread-safe; plugins should be created and called from a single thread, although they may use multiple threads (via a PluginRunner) to complete their tasks.
- Specified by:
parseArgument
in classAbstractPlugin<BufferedImage>
- Parameters:
imageData
-arg
-- Returns:
-
getLastResultsDescription
Description copied from interface:PathPlugin
(Optional) short one-line description of the results, e.g. to say how many objects detected. GUIs may choose to display this on a label during interactive processing.- Returns:
-
getSupportedParentObjectClasses
-
addRunnableTasks
protected void addRunnableTasks(ImageData<BufferedImage> imageData, PathObject parentObject, List<Runnable> tasks) Description copied from class:AbstractPlugin
For a specified parent object, generate a task to run. In practice, this method can be overridden to return anything/nothing if getTasks is overridden instead.- Specified by:
addRunnableTasks
in classAbstractPlugin<BufferedImage>
- Parameters:
imageData
-parentObject
-tasks
-
-
getParentObjects
Description copied from class:AbstractPlugin
Get a collection of objects to process, based on the contents of the PluginRunner. This could (for example) return the selected object, the root object, all detection objects... depending upon what the plugin does. Each object this returns will be passed to addRunnableTasks to create a task to run. In practice, this method can be overridden to return anything/nothing if getTasks is overridden instead.- Specified by:
getParentObjects
in classAbstractPlugin<BufferedImage>
- Parameters:
imageData
-- Returns:
-