Scripting in Mira

Creating powerful scripts for repetitive tasks, custom analysis, or specialized image processing has never been easier!


This Brief describes Mira's scripting language which is integrated into Mira MX Ultimate Edition and Mira Pro Ultimate Edition. Scripting is available for Mira Pro and Mira MX by doing a platform upgrade to the Ultimate Edition software.

Scripting is implemented through the Pro Script module. Pro Script actually is a program extension language that provides more than 600 classes and functions for working with images and other data as well as other tasks unrelated to data or the Mira software. Using Pro Script you can develop and implement custom analyses and processing procedures that run at the speed of your machine rather than at the speed of an interpreted language.

Mira scripts have access to tools in the Mira GUI but also may be independent of the GUI. Your script might operate on displayed images or plots or it could perform specialized image processing and display the result. Alternatively, a script also can perform computations that do not involve other Mira features. For example, you might setup a customized image processing pipeline that works with images in files. Or you might perform some particular type of filtering or measurement of a displayed image set, then analyze and plot the results. You might even write a simple script that updates the calendar for your class syllabus.

Prototyping and implementing custom image processing solutions has never been easier. Using Pro Script. you spend less time learning a language and more time analyzing results. With Mira Pro Script, scientific and technical users with even modest experience in C, C++, Java, Perl, or even Basic will find it surprisingly easy to write scripts that do serious work.

The Pro Script module is far more than just a script interpreter supplemented by "toolkit". By extending the Lua programming language with Mira's rich core of advanced image processing tools, Pro Script makes it both faster and easier for you to get to the bottom line: RESULTS. Lua provides a rich syntax with advanced capabilities that are there if you need them, but not required if you don't. In addition, when used as a scripting language, Lua has been shown to be one of the fastest available.

Pro Script greatly reduces the "learning curve" required of competing products, helping scientists and engineers to create powerful, effective software solutions with minimal effort "getting up to speed". All tools provided in Pro Script are pre-compiled for maximum performance and user scripts are compiled in real time to execute procedures that run at top speed a huge benefit for mission critical applications and computations involving large images and image sets.

Script Classes and Functions   Listing Image Information    Applying a Filter Kernel to an Image

Key Benefits

Mira Pro Script is designed for scientists and engineers in image processing applications. Working from within Mira, Pro Script helps you implement complex procedures with less time learning a language, fewer bugs, and with faster execution than with any competing platform.

  • Pro Script is designed around the premise that the typical user is trained in a technical field but is not a software engineer. Within minutes of first use, a typical Pro Script user can be writing scripts that actually do something useful. Never would you think that so much could be done with so little code!
  • Pro Script implements the Lua language, which is a full-featured programming language. Lua has been shown to be one of the fastest executing script languages available.
  • Scripts access Mira's extensive core of fast, optimized mathematical algorithms and array processing code.
  • Provides outstanding GUI-level interaction between scripts and Mira's rich collection of data processing and visualization tools.
  • Scripts can include code from external packages and extension modules on the fly, drawing from a rapidly expanding collection of commercial and open source tools.
  • Pro Script accelerates the creation of complex procedures. Scripts compile on the fly and run with minimal processing overhead.
  • Pro Script is truly feature-rich. In addition to the core capabilities of the Lua language, Pro Script adds dozens of built-in classes and more than 600 methods and global functions for processing, displaying, calibrating, and measuring images and other data.
  • Dozens of useful scripts samples are included to get you up to speed. These can be modified and used as templates for your own scripts.

What's Included with Pro Script?

The following items are included with the Pro Script Module.

  • Mira Pro Script Software Module. Mira Pro Script is integrated into the Mira Pro and Mira MX software platforms, including an interactive development environment.
  • Electronic "Help" Documentation. For detailed on-screen help, Pro Script includes a standalone User's Guide in the Windows' standard CHTML format.
  • Sample Scripts. To help you get up to speed fast with Pro Script, the module includes dozens of profusely commented sample scripts that do useful things to illustrate the Pro Script tools. These scripts can be used as a template by modifying them to meet your own scripting needs. The samples range from simple to complex and demonstrate a broad spectrum of applications.
  • Mira Pro Script User's Guide. This optional 500+ page guide to Mira Pro Script documents more than 600 script functions, classes, and methods, plus several hundred script examples. The Pro Script electronic documentation includes similar content. Available as an option

Recommended Reference (not included)

Programming in Lua, Second Edition, ISBN 85-903798-2-5, by Roberto Ierusalimschy. This authoritative guide to the Lua language was written by its principle architect. Disarmingly straightforward and easy to follow, this masterful work is a "must have" for learning the power of the Lua language.


Home     Products     Briefs     Tech Notes     Support     Purchase     News     Web Tools     Info     Contact

Copyright © 2010, Mirametrics, Inc. All rights reserved.