Creating a Simple Script

Overview of Mira Pro Script


The Pro Script Module is a high-level program extension language for the Mira Pro software platform. Pro Script is designed for processing images and other data using scripts inside the Mira Pro environment. Pro Script is based on the Lua Programming Language and it offers the following advantages in scientific and technical applications:

The Lua Programming Language was chosen as a scripting engine for Mira because it provides a unique combination of simplicity, flexibility, robustness, and power. Yet scientific and technical users with just modest experience programming in C, C++, Pascal, Perl, or even Basic will find it rather easy to write scripts that do serious work. To the user of Pro Script, these attributes lead to simpler scripts that do more, require less debugging time, and provide exceptional crash resistance. In addition, Lua is one of the fastest executing script languages known. Working in the Mira environment, the resulting combination of interactive development, testing, and execution of scripted procedures is unique within the framework of image processing software.

Beyond baseline constructs such as dynamic typing, block structuring, looping, and functions, Lua also provides advanced capabilities that are there if you need them, but not required if you don't. Advanced concepts like associative sets, lexical scoping, overloading are at the core of the language, and object oriented capabilities such as classes, privacy, inheritance, and polymorphism are also available. The Pro Script module implements these advanced features by providing a class interface that is relatively simple to use, yet extraordinarily powerful in image processing applications. The language is indefinitely extensible so that you can create you own new functions and classes independently or based upon the functionality contained in the standard distribution.

Related Topics

Contents, Working with Scripts, Creating a Simple Script, Creating Classes, Comparison with C and C++, Naming Conventions, Error Messages, Going Further with Lua