Skip to content

Workflows

pete edited this page Oct 4, 2016 · 1 revision

QuPath uses Workflows to represent sequences of steps that are run whenever an image is being analyzed.

This includes not only the commands that are run (e.g. Cell detection), but also the parameters that are used.

Workflows therefore provide a way to record and standardize how an image is (or should be) analyzed - both so that it is possible to see how the results were generated, and so the same steps can be applied to other images.

Workflows and the Command history

If you have run any kind of analysis within QuPath, you will already have created a workflow - even if you didn't intend to. This is because QuPath automatically logs many of the commands that are run in a Command history, to keep a record of what has been done within an image.

The Command history can be found by opening the Workflow tab of the Analysis panel.

The Command history within QuPath

Command history within QuPath

The Command history is an example of a workflow that reflects all (or almost all - see below...) of what has been done to the currently-open image.

Whenever a particular command is selected within this list, a table below updates to show any relevant parameters that are associated with the command, along with the values that were used.

However this is useful not only as a record: double-clicking on a command within the list (usually) results in its dialog box being opened with the same parameters - so that the command can be run again interactively if required. It is therefore very useful when trying out a command with various settings, by making it possible to go back and revisit previous settings if needed.

At the time of writing, not all commands can be re-run by double-clicking in the Command history... but this limitation should be addressed in a future software update.

Creating new workflows

Below the Command history is a button Create workflow.

This makes it possible to create a new workflow based on the Command history, but differing from it in one important way: the new workflow can be edited.

In QuPath, as in life, it is neither easy nor wise to rewrite history... because the Command history is supposed to be an accurate log of what was actually applied to an image.

Editing a Workflow

A workflow panel

The new workflow is shown in its own panel. Right-clicking on any entry within a Workflow allows some minor editing, e.g. to remove an entry or shift it up or down.

Working with workflows

At this point, workflows may seem a bit underwhelming. The Command history is useful for reproducibility, but beyond that it is not actually possible to do very much with workflows directly, or even to save edited workflows for posterity. This will hopefully change with a future software update.

However, even now workflows are already extremely important within QuPath because of one important feature: workflows can be turned into scripts.

Since scripts are written in the form of code that is much more computer-friendly than it is human-friendly, they aren't particularly appealing - especially to non-programmers. Future versions of QuPath might try to hide scripts from view more, so that Workflows can be run directly... but currently, I'm afraid it's necessary to go through the process of creating a script to achieve automation.

Clone this wiki locally