Ten Tips for Using Mira


Mira offers a number of unique features and capabilities that enhance your ability to work with images. The ten topics below have been selected to help you get up to speed quickly with many of Mira's unique and powerful features.

Mira's Special Folders

Mira installs its files in several "special" folders which you may need to access. These files also include the sample images provided with the software. See the topic Mira's Special Folders. If you are an administrator of a machine on which other users will be using Mira, be sure to read that topic.

View Windows vs Dialogs

Mira displays data, including images, plots, measurements, and text, in View windows. Mira provides a distinct type of window for each type of data, including Image Windows, Plot Windows, 3-D Plot Windows, Report Windows, a Text Editor, and the Image Catalog. When a view window is the top-most window (i.e., it is on top of all other view windows), it loads a pull-down menu of view-specific commands and it accepts mouse clicks and keystrokes. To make a view window top-most, click on its title bar or select its tab from the tab control along the bottom margin of the Mira screen. Right-clicking on the data inside a View window opens a Context Menu of commands for that window. Data in view windows can also be printed, copied, saved and—with the exception of Plot Windows—edited.

The Main Context Menu: As described under View Windows vs. Dialogs, the top-most view window loads its own menu bar and context menus appropriate for that view type. Thus there is no direct access to other commands that may be useful but do not belong to the current view type. Therefore, Mira provides a context menu you can always access, called the Main Context Menu, which contains commands that work no matter what type of view window is top-most. The Main Context Menu is opened by right-clicking on the blank background inside the main Mira window frame.

A Dialog, or Dialog Box, is a window where you have a "conversation" with Mira to enter values or make selections. Many Mira commands operate from dialogs, but dialogs are also used for setting program preferences. There are variations on the basic dialog type of window: For example. a dialog that shows multiple pages accessed by clicking on "tabs" along the top is called a property sheet and the tabbed pages are called property pages. Another type of dialog uses [Show >>] and [<< Hide] buttons to enlarge or shrink the dialog to show more or fewer options that may or may not need to be seen in routine use.

Setup dialogs usually have these buttons along the bottom: [OK], [Cancel], and the optional [Apply] or [Default]. These have their normal Windows purposes. In particular, the [Apply] button saves changes but does not close the dialog.

Command dialogs usually have these buttons along the bottom: [Process], [Close], and the optional [Apply]. The [Process] button in a command dialog is similar to [OK] in a setup dialog, except that it processes the image and may not close the dialog afterward (see the "Close command dialogs" option in the Other Preferences page). Almost all of these dialogs are opened from the Process pull-down menu. The word [Process] is used for two reasons: 1) as a verb to indicate that an action is about to be taken; that you are not merely accepting settings, and 2) to be a uniform button name across commands that do various things. [Close] works like [Cancel] by dismissing the dialog, and [Apply] accepts your changes but does not process the image. Dialogs that open, save, import, or export files use the more obvious [Open], [Save], [Import], or [Export] button in place of [Process].

Some View windows attach Window Toolbars to their borders. Image windows have many different toolbars, including the Image Toolbar, Animation Toolbar, and function toolbars like Image Registration, Photometry, and others. The Image Toolbar, which opens at the top of the window, contains auxiliary views and coordinate readouts for the image plus a number of command buttons. The Image Toolbar is a very rich tool: It has a number of button commands that operate in the taditional way using a left mouse click, as well as some that use right-click commands (you can tell what a button does by letting the mouse pointer hover over it). You may not always want to use the Image Toolbar, so it can be shown or hidden using the checkbox on the Image Preferences page. When hidden, most of its commands are duplicated in the pull-down menus and in the Image Context Menu. Plots are shown in Plot Windows. They have a Plot Toolbar that provide button commands for plot adjustment and a coordinate readout. Plot Windows also have a Plot Animation Toolbar that appears when the window holds more than 1 plot series.

Mira can copy and paste images and plots between windows using the standard Windows clipboard commands. For images, use Copy (Ctrl+C) and Paste (Ctrl+V). For plots, use the similar Copy (Ctrl+C) and Paste (Ctrl+V) commands. Simply make the source and destination windows top-most before doing the copy or paste actions. These commands make it easy to compare images processed in different windows or plots generated using different configurations. For example this makes it easy to make a single plot window showing both a series or rows and the median of those rows (plot all rows in one window, plot a median slice in another window, then copy and paste). Using commands in the Pro Graphics II module, the plots attributes can be changed afterwards to distinguish the data from the separate windows.

Image Sets

Mira can display 1 or more images in a single Image Window. This stack of images is called an Image Set. An Image Window can hold an image set of any size up to the limits of your computer's memory. In fact, Mira's unique Image Set architecture is woven throughout the program, making it both easy and efficient to apply commands and measurements to only a single image or to all the images in the set. The choices to process, measure, or graph one image or the entire image set are held as 3 Image Set Flags (a "flag" controls the on/off state of a value) These choices can be changed for a particular Image Window using the View > Image Set pull-down menu or the Image Set buttons on the Image Toolbar. The default values can be set on the Other Preferences page.

To display an image set, you simply open more than one image into the same window. You can save the whole set using various commands. When an Image Window contains an image set of 2 or more images, it opens an Animation Toolbar for use in blinking and animating the stack of images. Other Image Set commands allow you to easily add, insert, delete, swap, and re-order the images in the image set.

File Lists

A File List is a text file that contains the path and file name of 1 or more other files. Using a File List makes it easy to organize groups of files either separately or as Image Sets. A File List is treated like other files containing images, text, etc. It can be opened from the Open command or saved from a displayed image set. A File List can be edited and it can contain other File Lists or a mixture of files of various types, even mixed with other File Lists. A File List is created by marking files in the Open dialog or by saving an Image Set as a File List, or by using a text editor. File lists have the file type "axf".

Image Cursor

The Image Cursor is a dedicated rectangle or crosshair marker that retains its position and size on the image independent of the mouse pointer. The image cursor is used for measurements, plotting, and "region of interest" operations such as cropping. It has 4 shapes: Rectangle, Crosshair, Lines, and Hide; all modes except Hide track the coordinate of its center and the coordinates of its maximum extent on the image. These coordinates are used for computing centroid positions, region statistics, and for defining columns and rows to be plotted. By coupling together the normally separate actions of positioning, measuring, and plotting, Mira offers some unique and valuable capabilities that are not possible otherwise.

The Image Cursor can be resized and moved when the image window is in Cursor Mode. It can also be moved without using cursor mode by pressing the Ctrl+D key. In a zoomed image, the image cursor can be finely positioned to subpixel precision using either mouse movements or the arrow keys (provided the image window is top-most so that it has the keyboard focus).

Image Data and Data Types

An image is an organized collection of data consisting of values at locations called pixels (meaning "picture elements"). Mira opens only 2-D images, although it can create 1-D and 3-D plots of 2-D images. In a 2-D image, the variation in pixel values across the image may represent a picture or the result of a mathematical calculation or a numerical model of a physical process. A pixel can have a value like the following: 1000, 600.54, or 255,128,14. The mathematical description of the pixel value is its Data Type. The data type controls the quality of the image by setting limits on its dynamic range, signal to noise ratio, and whether fractional values (e.g., 600.54) may be expressed. The data type can also affect the quality of a processed image or the precision of a measurement. The data type of an image can be changed automatically or by your request during a processing command or you can change it manually (see the Change Data Type command).

Mira works with images having a wide range of data type, including integer or real number values and color values. In particular, Mira can open, process, measure, analyze, and save images having 8, 16, or 32 bit integer pixels, 32 or 64 bit real pixels, and 24 bit color pixels. Both signed and unsigned 16 bit pixels are supported. The pixels of a 24 bit color image store shades of color rather than numerical values. Image that have a numerical pixel type are often called "luminance" images since their pixels measure a physical quantity rather than a color shade.

Palettes and Transfer Functions

To display an image, Mira creates a bitmap showing a visual representation in grayscale, color, or pseudocolor (i.e., false colors assigned to a luminance image). In displaying an image, its pixel values are not changed, but they are used in several mathematical algorithms to create the bitmap. Any time you interrogate the pixel values, make a measurement, or perform any processing, Mira works with the pixel data. However, the screen bitmap is independent and it may be adjusted to allow you to better visualize the pixel data.

Creating and adjusting the screen bitmap is a 2-step process. To display an image, Mira first slices a range of image intensity into 256 discrete levels using a mathematical rule known as a Transfer Function. The primary purpose of the transfer function is to determine the minimum and maximum pixel values that will be displayed, called Zmin and Zmax. Any pixels outside this range are displayed as pure black or pure white and can show no detail. The secondary purpose of the transfer function is to assign the 256 levels between Zmin and Zmax. The levels can be equally spaced or crowded together at one end of the brightness range to emphasize details involving a particular range of brightness. The second step of displaying an image involves assigning a table of colors (a "colormap") to each of the 256 levels using a Palette. If the palette has 256 shades of gray, then the image is displayed in grayscale, like a black & white photograph. However, the palette can use any color for a given level, not just gray, to make a pseudocolor (= false color) display. Pseudocolor is a powerful tool for emphasizing and detecting particular image features that span only a certain range of luminance. Adjusting the transfer function and palette independently during and after image display give you extensive control over how image details are rendered. After an image is displayed, you can make changes using the Transfer Function Properties and Palette Properties dialogs. You can also interactively change the palette using mouse movements; see Adjusting the Palette and The Palette Graph. In general, if you are going to make a large change to the transfer function of an image, it is best to first reset the palette (for example, double right-click inside the Colormap).

Tip: How do you save a pseudocolor image? You must first convert the luminance image to a 24 bit color image and then save that. If you want to recover the luminance image, use undo.

Plot Series

A Plot Window can hold multiple graphs at the same time in much the same way an Image Window holds multiple images as an Image Set. Each of the graphs in this "plot set" is called a Plot Series. Plot series are used when plotting the intensity profile over a range of columns or rows and for overplotting multiple line profiles made along parallel lines. For example, if you plot a row profile for an image set of 5 images, then the Plot Window will contain 5 plot series. If you plot a range of rows and the Image Cursor is 46 pixels tall, then the Plot Window will contain 46 plot series. When the Plot Window contains multiple series and it is in Animate Mode, it uses the Plot Animation Toolbar for selecting and animating the series. The Plot Window can also be switched to Overplot Mode which displays all series at one time on the same set of axes. For details about plot modes, see Creating Plots from Images, Column Profile Plot, and Row Profile Plot (Tip: In Animate Mode, you can also step through the plot series using the [Tab] key when the Plot Window has focus, even if the Plot Animation Toolbar is hidden).

Image Coordinates and World Coordinates

Mira displays, measures, and plots data using both pixel coordinates (i.e., columns and rows) and world coordinates. The first pixel of an image is defined as (column,row) = (1,1). However, positions can be measured much more precisely than this. Coordinates inside a pixel are defined as in the FITS data format: a pixel extends from -0.5 to +0.5 relative to its integral (i.e., whole number) coordinate. For example, pixel (1,1) extends over the coordinate range (0.5:1.5, 0.5:1.5), as written in the form (column1:column2, row1:row2). This notation is used throughout this document. A 2-D image having m columns and n rows therefore has integral pixel coordinates in the range (1:m, 1:n), and its data extend from 0.5 pixels before that to 0.5 pixels after that, over the range (0.5:m+0.5, 0.5:n+0.5).

World coordinates relate image positions to an external coordinate system such as microns, kilometers, or equatorial coordinates such as Right Ascension and Declination. This capability uses the FITS World Coordinate System ("WCS") extension to the FITS data format. The mathematics used by the WCS allows measurements and plots to use meaningful units of measure rather than just column, row, or pixel number. In addition, the measurement of angles and areas are controlled by the coordinate system and the image format. If the image is opened from a FITS image having a WCS calibration, then world coordinates are automatically available (Mira either shows both or allows you to choose). As you roam the crosshair over a displayed image you will see precise subpixel coordinates displayed on the Image Toolbar. Pixel coordinates are indicated by C and R, for Column and Row. World coordinates, which may have any units from one image to the next, are indicated by X and Y. The position (X,Y) is the world coordinate of pixel position (C,R). If the image does not have a WCS calibration, then X = C and Y = R.

Once displayed, you can create or change the WCS of an image—even a color image, which is not directly supported by FITS format. The View > Coordinates pull-down menu contains several commands for working with world coordinate systems. For example, Mira can create a linear scale or an angular arcsecond scale as a world coordinate system. You also can interactively mark a known distance to get a calibration in world units using the Calibrate Image Scale command. Mira preserves and updates the WCS through geometric processing such as cropping and image rotation. If an image having a WCS calibration is saved to FITS format, then the calibration saves with it. Unfortunately, other image formats do not provide support for a world coordinate system. Thus if you create a WCS calibration for a color image, or one opened from TIFF, JPG, or BMP format, then you can save the calibration if you first convert the color image to a luminance image (e.g., 16 bit) and save the luminance image in FITS format. See Image Coordinate Systems and Plot Coordinate Systems for more information.

Mira Preferences

Mira organizes many program settings, or "preferences", into the pages of the Mira Preferences dialog opened from the View pull-down menu or by using the Ctrl+R accelerator. Here you will find the settings that control image display, creating plots from images, plotting histograms, measuring centroid positions, FWHM and Radial Profile Plots, using the Image Cursor, and miscellaneous settings. Most of these preferences affect Image Windows. Settings in this (and other) preference dialogs can be changed for the current image window or globally, as the default for future image windows.

Many preference dialogs show both an [Apply] button and a [Default] button. The [Apply] button saves changes to the parent window from which the dialog was opened. The [Default] button saves changes as default values for future use. For example, consider setting the Cursor Mode to "Hide" on the Cursor Preferences page. If you click [Apply] or [OK], then this setting affects only the Image Window from which the Cursor Preferences page was opened. If you click [Default], then the Image Cursor will be hidden when future images are opened.

Profile Control

The Profile Control is a single control that manages the parameters of a command when the command has many possible settings. For example, the Combine Images command has a large number of settings, or parameters that you may need to use for particular purposes, and there are many possible purposes that each have a specific set of parameter values. The Profile Control makes this situation easier by allowing a name to be assigned to each particular parameter set. You then just work with the profile by name. As a security feature, a profile may be "locked" so you have to take an extra step to unlock it before you can change, delete, or save over its settings. Other dialogs that use profiles include Palette Properties and Transfer Function Properties.

Related Topics

Glossary of Terms, Contents, Getting Started