Aivia Software
Workflow Processor (Enhanced Batch, Version 11+)
AboutAivia’s Workflow Processor is a powerful way to chain core parts of Aivia together and run the sequence of steps on single or batches of files. The standard way of using the Workflow Processor is to first complete the analysis you want without the Workflow Processor. Then build a workflow using the knowledge and settings you have. Finally batch run the analysis on many files and enjoy the results.  Open Workflow ProcessorTo access the Workflow Processor, at the top left of Aivia choose the Analysis menu, and then the Workflow Processor option. When automatically making a workflow, the Workflow Processor will also open automatically to the Runner section. Main Topics
|
---|
Â
Automatically Create Workflow
Creating your Workflow automatically is possible, as long as your analysis is not too advanced. Fear not, you can also edit the created workflow to improve or advance it. There are two ways to automatically create your workflow. Both require you to first have performed the analysis on a representative image.
Steps
Complete your analysis on a representative image in Aivia using Aivia 11 or later. Prior analysis will not have the required meta data for automatic creation. Any Pixel Classifier or Object Classifier you plan to use in the workflow should be saved to disk.
Automatically create your workflow using either one of these two approaches:
Right click on the object set you want as your output of the workflow.
Or, in the Workflow Processor in the Editor, choose the drop-down arrow next to Create New.
That’s it! You will be taken to the Runner tab, and you can use your workflow immediately. See the Runner for details on using your workflow.
Â
Differences between the two approaches
Create Workflow from Object Set - This approach requires an object set, and does not process past that step. You can select any one of many object sets and the analysis that created it will be pulled into a workflow for you.
Create Workflow from Recent Actions - This approach works even if your results are not objects (ie, a channel), but you are unable to select what actions should be converted into a workflow. It will choose the most recent actions.
Limitations
There are some limits for automatic workflow creation. Please note that if your images you will process with the workflow do not match up with your representative image that was used to make the workflow, you will likely have to manually edit the workflow. Additionally, automatically created workflows only chain together up to one Preprocessing and one Recipe.
In the case that your automatic workflow is not creating the outputs you expect, please Edit the workflow and review the options. See below for more details.
On this page:
|
---|
Â
Editor
The Editor is where most of the settings are picked. This is where parts of Aivia are able to be chained together. Once you are done, save the .workflow file with the Save icon on the right side and you can use those settings over and over.
The Editor includes 4 major areas to fill out: About, Format, Analysis, Decision. There is also a quick link to Run the workflow you are working on, which brings you to the Runner for that workflow.
Note: If any section in the Workflow is invalid, a Red outline will appear. If the workflow has not been saved, a Yellow outline will appear.
About
The About section includes some details you can use to help understand and identify this workflow later.
Prefix: is the prefix of the jobs as they run. You can use this to somewhat group the executed work later. For example, if you are making a workflow that is part of a study, or specific to a person, or a task you can put something in the Prefix field to help you identify them later. If you run your workflow on 3 images later, you will get Job 1, Job 2, Job 3. If you change the Prefix to Leica you will get Leica 1, Leica 2, Leica 3.
Name: The workflow name is also available to be set. It is suggested to put a nice name to help you later identify who/what/where/why. Each work task will list the workflow’s Name.
Format
The Format section helps the workflow understand what you will be giving it to process later.
Image Format: Workflows can process several types of inputs. Almost any file Aivia can open can be processed with a workflow. Choosing the default of Standalone Images indicates that you plan to process one or more whole (x,y,z,t,c) files. Each file contains the entire set of image data for that field. Choose the Single from Many option if your input is a series of 2D files that are to be stacked together to make a single x,y,z,t,c file. This option only processes all the input files stacked together to become a single image. You can check how it works by using Aivia’s File>Import>Image Sequence. The auto detection in Aivia’s Image Sequence importer is how workflows process when using Single from Many, so by changing the file names you can also auto stack them as the first step in a workflow. This is a somewhat advanced option, using the normal image sequence importer is normally better.
Calibration: The Calibration section is optional, and should be setup to align with how the analysis you are going to use expects the image to be calibrated. If you ran your analysis without calibration, you should not choose it here. If you ran your analysis with calibration, you can choose it here. If you are going to process Aivia.tif images that have already had calibration saved to the file(s), you do not need to set it here.
Analysis
The Analysis section is where most workflows will be based around.
Preprocessing
This analysis step is optional. You can select None, or Image Enhancement, or Pixel Classifier. When selecting Pixel Classifier you must have your pre-trained Pixel Classifier loaded into main Aivia to select it here. When running a workflow, the Pixel Classifier does not need to be loaded, but should be locatable by Aivia (either loaded in Aivia or at the same save location on disk from when you built the workflow).
The specific settings for each Type are based on the settings in the Image Enhancement or Pixel Classifier console when you save the workflow. Usually a user will already have run the preprocessing and will have the specific Image Enhancement or Pixel Classifier loaded and can just select it here. Note that if you configure only a Pixel Classifier in the Preprocessing and select None in the Analysis step, the Pixel Classifier will move into the Analysis section upon next load and Preprocessing will turn to None.
Also see the Input Selections below.
Analysis
The analysis step is likely to be the main purpose of using a workflow (though it still optional). A Pixel Classifier or Recipe from the Recipe Console can be selected here. The Pixel Classifier or Recipe should be currently loaded in Aivia with the settings you want to use. Recipes have helpful buttons on the right to load changes or push changes to and from the Recipe Console. In this way you can be sure not to change the Recipe settings unless you intend to, and be sure not to change your Recipe Console settings unless you actually want to load from that workflow. An optional DL model in the .aiviadl format can also be selected (more info here) for preprocessing as input to the Recipe. The Recipe and Pixel Classifier should be loaded into Aivia or available on disk when running the workflow.
Also see the Input Selections below.
Â
Custom Measurements
This an optional, and advanced step. Most users will be happy using the measurements that Recipes include. In case you have specific measurements you want to include, you can save your measurements in the Analysis menu, Measurement Preset Tool. Once you have a Preset in the Measurement Preset Tool (either create or load one), you can select that preset in the Workflow in the Custom Measurements, Recipe area.
Also see the Input Selections below.
Warning: Custom Measurements can be extremely confusing
Â
Input Selections
Each section in the Analysis section can have one or more Input Selections, depending on what you selected. It is here that you describe to the workflow how you want your images to be processed. There are cases where we are unable to know what is desired. For example, the images you are going to process already have results, or will have more/less channels than the one you did you analysis on. Since Aivia has not opened or seen these images, it cannot guess what is desired.
The image is loaded, Preprocessing occurs, and then Analysis, and finally any Custom Measurements. Knowing the format of the input files as well as the required inputs to the processing steps is important in selecting the right values. Many times leaving the input selections at their default will yield the results you are looking for. Other times you may have to adjust some Channel Inputs. The input sector defines which channel is used by the analysis step. If your image has 2 channels, and the Preprocessing step creates a third that you want to use in the Analysis step, choose 3.
Warnings:
Some recipes have a large number of input selectors, please try on a example image to ensure you have the settings right.
It is recommended to not adjust any Object Set inputs unless you are an expert.
Beginners are recommended to use the Automatically Create Workflow method.
Â
Decision
The Decision section let you apply a pre-trained Object Classifier, to classify and/or detect novelties. As before, the Object Classifier needs to be loaded into Aivia in order to select it.
Â
Run
There is a shortcut to the Runner in the breadcrumb trail that takes you directly to processing for the recipe you are working on. Remember to ensure there are no Red or Yellow outlines or warning Exclamations (!), and probably best to save your experiment.
Runner
The runner is where you run workflows. You can load previously created workflows, or select one you have just created. There is an Edit icon on each available workflow which will take you to the Editor.
File Input
Select your files, folders full of files (includes all children in subfolders too), or Aivia Experiment file (see the Experiment Editor [todo: add link]). Any file that Aivia can normally open is processable here. Library files will load all the files and you can filter by removing fields you don’t want. Aivia Experiment files will give you an option of filtering by Conditions that were previously setup in the experiment.
Note: If the workflow had its Image Format set as Single from Many, all selected images will be stacked together into a single image, and you will get one set of results.
Saving
Here you can choose what and where you want your things.
Warning: The Save Folder should be a place with lots of space, and ideally with not too long of a path name. Windows has a 256 character limit, and Workflows will output some folders and files with longer names (assuming you have long named workflows and files). If the save folder + folder structure that workflows make + file names are beyond that limit, the job will fail and you will need to make some changes before running again. There is a rumor of a setting in Windows that allows longer paths, but we haven’t seen that work. Each time you start a workflow it makes a subfolder in the Save Folder with the date and subfolders in that folder for each image/job. Experiments add some additional folders to keep everything organized.
Additional Save Options: Make sure you choose Save Field if you want to save an Aivia.tif with all the objects/measurements on it.
Save Field - Save the processed image, detected objects and measurements to a single Aivia.tif.
Export Measurements to .xlsx - Export in Excel format
Export Measurements to .csv - Export in comma separated format
Export Channels - Each channel in the processed image will be saved to a separate tif file
Export Objects as Masks - Each object set in the processed image will be saved to a labeled tif
Queue
The Queue displays jobs that have yet to start, as well as the currently processing job, along with its status. You can hit Pause to hold the queue. The next job won’t start, but the current job will complete.
You can resort the queue by pressing the Up / Down arrows next to each job, or remove a job by pressing the delete button. There is a Clear Queue button at the bottom that will remove all queued jobs.
Â
History
The History panel shows all the jobs that have completed (or failed). Restarting Aivia will clear the History, or you can push Clear All at the bottom of the history list.
Clicking on an item in the history list will show some details and even a preview if possible. Previews list the centers of all detected objects (if any) with pink dots.
Each Item has some details, and a few buttons:
Save: Saves off a .json file of details about the objects detected.
Open: Opens a Windows File Explorer to that file’s location on disk.
Delete: Removes that history item from the list.
The bottom of the History list has a Clear All button that you can use to remove all history items.
Lastly, in case of any error, the history item will have a red border and clicking on it will tell some details about what happened. Please check Aivia’s log (Aivia > File > Options > Logging) for more details.
Additional Information
Here is some extra info that may help. If in doubt, give it a try, and as always please give us feedback to let us know what you want and what is working well for you or isn’t working all that great.
Components Possible to Connect into a Workflow
Image Importer (limitations apply [1])
Calibration
Image Enhancement
Pixel Classifier
Recipes
DL Model Recipes (limitations apply [2])
Python Recipes (limitations apply [2])
Custom Measurements
Object Classifier
[1] The workflow image importer does not have manual configuration available. Rather it only automatically processes the input files based on filename. To achieve more flexibility and control, please use Aivia’s File > Import > Image Sequence. You can also check how the Workflow Image Importer will behave by using the Import Image Sequence tool and watching how it automatically sorts/orders. By renaming the image files it may be able to automatically sort your input images as you wish. Additionally, when using the workflow importer to stack many images into a single one, that workflow will only process a single many-to-one sequence at a time. You could setup and run the workflow many times, but it wouldn’t be ideal. Please let us know if this is a scenario you face often.
[2] In some cases you may need to load the custom recipe file into Aivia’s Recipe Console, and then select it again in the Workflow Edit panel before running the workflow.
Formats that Workflows can Process
Any image format that Aivia can open normally
Leica .lif files and similar Library files
Aivia Experiment files (eg, wellplates)
Tips
Here we will share some ideas, tips, tricks and steps to helping you get the most out of Aivia’s Workflows
Editing the Recipe settings used in an existing Workflow
If you have an existing workflow, and want to change the Recipe settings that are used, follow these steps:
Ensure the Recipe and Recipe’s settings are in the recipe console as you want them used in the workflow. Normally you would have just run the Recipe and like the results, so you can then update the workflow immediately.
Open and Edit the Workflow you want to make changes to. Go to the Analysis section.
Click the Load Settings from Recipe Console button
Save workflow
Done!
Â
Sharing Workflows with Friends
Workflows currently need a few extra files to be passed, along with the workflow file itself. If your workflow uses any of the following, make sure you share them also with your friends:
Pixel Classifier
Object Classifier
Custom Measurement Recipe
Custom Recipe
Custom DL model
These additional files should be loaded into Aivia before Running the workflow. Or they can be located at the same location on disk though that is often more difficult to perform. For example, a common network drive path would work, but the user’s desktop probably wouldn’t. In case a required file is missed, Aivia will inform you and you can go ask your friend.
Â
Â
Â
Â
Â
Â