Package qupath.lib.plugins.workflow
Class Workflow
java.lang.Object
qupath.lib.plugins.workflow.Workflow
- All Implemented Interfaces:
- Externalizable,- Serializable
A collection of steps that relate to how an image has been - or should be - processed.
 
This can also be used to implement a 'command history'.
Where the WorkflowSteps contained in the Workflow are scriptable, then a script can be created automatically.
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddStep(WorkflowStep step) Append a new step to the end of the workflow, firing an update event.voidaddSteps(Collection<WorkflowStep> steps) Append multiple steps to the end of the workflow, firing a single update event.voidaddWorkflowListener(WorkflowListener listener) Add a listener for changes to the workflow.voidclear()Remove all steps, firing an update event if the workflow was not previously empty.Generate a script from the current workflow steps.protected voidGet the last WorkflowStep in the workflow, or null if no steps are available.getSteps()Get an unmodifiable list of the steps.booleanisEmpty()Returns true if the workflow does not contain any steps.voidvoidremoveStep(int ind) Remove a single step, identified by its list index.voidremoveStep(WorkflowStep step) Remove a single step, firing an update event if the step was successfully removed.voidremoveSteps(Collection<WorkflowStep> steps) Remove a collection of steps, firing an update event if the workflow was changed.voidremoveWorkflowListener(WorkflowListener listener) Remove a listener for changes to the workflow.voidreplaceLastStep(WorkflowStep step) Replace the most recently added step with this one.intsize()Total number of steps in the workflow.void
- 
Constructor Details- 
Workflowpublic Workflow()
 
- 
- 
Method Details- 
getStepsGet an unmodifiable list of the steps.- Returns:
 
- 
getLastStepGet the last WorkflowStep in the workflow, or null if no steps are available.- Returns:
 
- 
addStepAppend a new step to the end of the workflow, firing an update event.- Parameters:
- step-
 
- 
addStepsAppend multiple steps to the end of the workflow, firing a single update event.- Parameters:
- steps-
 
- 
removeSteppublic void removeStep(int ind) Remove a single step, identified by its list index.- Parameters:
- ind-
 
- 
removeStepRemove a single step, firing an update event if the step was successfully removed.- Parameters:
- step-
 
- 
removeStepsRemove a collection of steps, firing an update event if the workflow was changed.- Parameters:
- steps-
 
- 
replaceLastStepReplace the most recently added step with this one.- Parameters:
- step-
 
- 
sizepublic int size()Total number of steps in the workflow.- Returns:
 
- 
isEmptypublic boolean isEmpty()Returns true if the workflow does not contain any steps.- Returns:
 
- 
clearpublic void clear()Remove all steps, firing an update event if the workflow was not previously empty.
- 
fireWorkflowUpdatedEventprotected void fireWorkflowUpdatedEvent()
- 
addWorkflowListenerAdd a listener for changes to the workflow.- Parameters:
- listener-
 
- 
removeWorkflowListenerRemove a listener for changes to the workflow.- Parameters:
- listener-
 
- 
createScriptGenerate a script from the current workflow steps.- Returns:
 
- 
writeExternal- Specified by:
- writeExternalin interface- Externalizable
- Throws:
- IOException
 
- 
readExternal- Specified by:
- readExternalin interface- Externalizable
- Throws:
- IOException
- ClassNotFoundException
 
 
-