Mira Project Interface (Batch Processing)
The Mira Project Interface automates a
sequence of command dialogs using a
parameter profile for each command. This is a form of
"batch" processing that carries multiple images through multiple
commands. This interface addresses the need to process different
images through the same processing sequence when the versatility
and complexity of a
script is not needed.
A Mira project is intermediate in complexity
between using a single command to process an
Image Set and using a script through the
Mira Scripting Interface. Each command in the
project operates exactly as if run stand-alone.
A project is created simply by performing the
necessary command steps in sequence but adding each command and its
parameter profile to the project. For existing projects, the Mira
Project Manager may be used to remove specific command steps and
select different parameter profiles without having to repeat the
steps to create a new project.
The following table shows how the Mira Project
Interface fits into the hierarchy of bulk processing options in
Mira::
Data Source
|
Operation
|
Requirements
|
Single Image
|
One image is processed by one command.
|
Requires a displayed image.
|
Image Set
|
Multiple images displayed in one window are
processed by one command.
|
Requires one or more images displayed in a single
window.
|
Image Set
|
Multiple images from multiple files are processed
by one command.
|
Uses the dialog's
Select Source Images control to access images
in a single window or in files.
|
Mira Project
|
Multiple commands each process an image or image
set according to each command's profile settings.
|
Image and data sources are controlled by each
dialog's
Profile Control.
|
Script
|
Arbitrary processing or computation for images or
other data that are displayed, in files, or entered manually.
|
The text-based script is created and managed
through the
Mira Scripting Interface.
|
Overview of Mira Projects
Since a project executes a sequence of dialog-based
commands, each of the commands and their parameters must be added
to a project and the project given a name. This is accomplished
using the
Mira Project Selector dialog which is opened
from a dialog's
Profile Control menu. Since each
dialog must have a parameter profile, only
Command Dialogs that have a
Profile Control are eligible to be included in a
project. The collection of projects and their contents may be
edited using the
Mira Project Manager. Remember that a project
simply repeats a processing sequence as if you did it manually, one
command dialog after another.
What to Expect During Project Execution
During project execution, each step is executed by
opening the assigned command dialog and executing its parameter
profile. If the dialog is designed to close at the end of
execution, you will see it briefly flash. A command may fail for
several reasons including errors executing the command itself and
project-specific errors such as a missing profile. One source of
failure involves immediate mode (view) command dialogs which
require a view window (usually an
Image Window) to be top-most when the step is
executed. If this is not the case, the project will terminate. When
a command fails, Mira terminates the project early and displays an
error message.
Command Types Used in Projects
There are three types of
command dialogs that may be used in a Mira Project.
See the list of supported
Mira Project Interface Commands. The available
command types differ in the source of data (e.g., images) used by
the command:
-
Immediate (or "View")
commands operate on images opened in a view such as the
Image Window. A project will abort if it attempts to run an
immediate command and the project was not started with a view
window top-most. These commands appear in a project with
(view) appended to the name.
-
Global Commands
operate on images from various sources. These dialogs normally use
the
Select Source Images parameters of the dialog
to open the images or other data. These commands appear in a
project with (global) appended to the
name.
Structure of a Mira Project
Below is a hypothetical example of a Mira Project
having 3 steps. Notice that the command in each step shows the
label (view), meaning that the command
operates on images displayed in a view window, in this case,
an
Image Window. This means that the
target window containing the image or image set must be top-most
when the project is executed from the
Mira Project Manager. If a
command returns a failure code, the project terminates before
finishing. Failure may result from processing the data or if the
parameter profile does not exist.
Here is a possible sequence for a hypothetical
project that works with displayed images:
-
Step 1: Command:
Image Arithmetic (view)
Parameter Profile: Add second image
-
Step 2: Command:
Value Arithmetic (view)
Parameter Profile: Add offset value
-
Step 3: Command:
Gaussian Filter (view)
Parameter Profile: Smooth 10x10
Remember that the project above shows only
(view) type commands and requires an
Image window to be top-most when it executes. This project could
also use global commands which do not require the images to be
displayed at the time the script is executed. For example, you
might open the global
Create Synthetic Image command from the main
toolbar and add the following step to the same project:
Commands Available to Projects
Each step in a Mira Project is added from a
Command Dialog that uses a
Profile Control to save its parameters. Command
dialogs exist in several forms, depending on the type of data they
use, as described in the
Command Dialogs topic:
-
Immediate Command Dialogs process images
displayed in an
Image Window. In the project, their command name is
tagged with the word "view."
-
Global Command Dialogs process data,
usually images, from files. In the project, their command name is
tagged with the word "global."
-
Some global command dialogs do not process data
from either an
Image Window or a file. In the
project, their command name is also tagged with the word
"global."
Creating a Project
First, decide whether the project will start with
images displayed in an
Image Window. If so, open one or more images into an
Image Window and make it top-most window to enable the image window
menu with its immediate mode command dialogs. If the project will
process only images in files, you do not need to display an
image.
A project is created or extended by opening each
command dialog in turn as you step through your processing
sequence. To add a command to a project, do the following:
-
Open the command you wish to add to the
project.
-
Use the displayed profile or use the profile
history list to open an existing
profile or set parameters and save as a new
profile.
-
Click the
Profile Control button to open its menu. Select the
Add to Project command from the
menu.
-
The
Mira Project Selector opens, showing the
current project in the text field.
-
-
To select the project displayed in the
text field, click [OK].
-
To append to an existing project, select
it from the list and click [OK].
-
To create a new project, enter its name
into the text field and click [+]. Then
click [OK].
-
Close the command dialog.
-
Open the next command dialog and repeat steps 2
through 5.
Note that immediate mode command dialogs can
only process images displayed in an
image window (a "view" window), and starting from a
view window is the only way to add (view) type commands to a project. However, a
project can mix both immediate mode and global mode commands. A
project that includes immediate mode (view) commands must be executed after an Image
Window containing the sources images is made top-most. If the view
window is not top-most, a project containing "view" commands will
abort with an error.
Related Topics
Mira Project Manager
Mira Project Selector
Mira Project Interface Commands
Mira Scripting Interface
Contents
Mira Pro x64 8.71 User's Guide, Copyright Ⓒ 2024 Mirametrics, Inc.
All Rights Reserved.
|