Getting Started | Documentation | Glish | Learn More | Programming | Contact Us |
Version 1.9 Build 1488 |
|
Package | general | |
Module | images | |
Tool | image |
parent | in | Parent frame to embed display in | |
Allowed: | Glish/Tk frame agent | ||
Default: | F | ||
raster | in | Display as a raster | |
Allowed: | unset, T or F | ||
Default: | Last value (T if first) | ||
contour | in | Display as contours | |
Allowed: | unset, T or F | ||
Default: | Last value (F is first) | ||
vector | in | Display as vectors | |
Allowed: | unset, T or F | ||
Default: | Last value (F is first) | ||
marker | in | Display as marker | |
Allowed: | unset, T or F | ||
Default: | Last value (F is first) | ||
region | in | Region of interest | |
Allowed: | Region tool | ||
Default: | Last value (whole image if first) | ||
mask | in | OTF mask | |
Allowed: | Boolean LEL expression or mask region | ||
Default: | None | ||
model | in | Componentlist | |
Allowed: | Componentlist tool | ||
Default: | None | ||
adjust | in | Start adjustment GUI ? | |
Allowed: | T or F | ||
Default: | T | ||
axislabels | in | Display axis labels | |
Allowed: | unset, T, F | ||
Default: | Last value (F if first) | ||
includepix | in | Pixel range | |
Allowed: | unset or Vector of float (length 1 or 2) | ||
Default: | Full range | ||
order | in | Order to display axes in | |
Allowed: | unset or vector integer | ||
Default: | Last value (natural if first) | ||
activatebreak | in | Activate the break button | |
Allowed: | unset, T, F | ||
Default: | unset | ||
hasdimiss | in | Add Dismiss button | |
Allowed: | T, F | ||
Default: | T | ||
widgetset | in | The widgetset to use for the GUI | |
Allowed: | A widgetserver tool | ||
Default: | ddlws |
This function displays the image with the viewer. The viewer is built with the Display Library.
This function displays the image as one or more of a raster display, contour map, vector map or marker map. The default behaviour is to display first as a raster. If raster, contour, vector or marker is left unset, then the behaviour is to leave the raster or contour or vector display, respectively, as they were last time. You can set these arguments to T or F explicitly to get what you want otherwise.
You can embed the display panel it creates in an existing frame if you wish (parent). You can optionally start the adjustment control (adjust=T) GUI (one for each of the raster or contour displays) which gives you control over things like axis labels, contour levels etc.
You can specify the region-of-interest you want to see with the region argument. By default, you see the whole image. If you call this function again without specifying the region argument, then you get whatever region-of-interest you last displayed. You must explicitly over-ride region to change the displayed region-of-interest.
You can specify the pixel range used to map to the display colors via the includepix argument. If unset (the default) the full range is taken. Otherwise you can specify 1 or 2 arguments. If you only give one value for either of these vectors, say includepix=[b], then this is interpreted as includepix=[-abs(b),abs(b)]. If you give two values, then these are the data minimum and maximum
The argument order allows you to control the initial display order of the axes in the image. For example, if your image has axes RA,DEC,Stokes,Frequency and you set order=[4,1,2] then the x-axis will be Frequency, the y-axis RA and the z-axis (movie axis) DEC. You can specify at most three axes. The hidden axes will sort themselves out. The first time, by default you get the natural order. Thereafter, if orer is unset you get the order you last specified.
The argument hasdismiss controls whether a Dismiss button is added to the GUI or not. It always has a Done button. This is argument is not for general user use.
If you dismiss the display panel (press dismiss button) call the view function again to bring it back. If you destroy the display panel (press done button) it will be recreated next time you run the view function (takes longer than just redisplaying the GUI of course).
An example display from this function as well as a full description of most of it's GUI elements is shown here.
In this case, the 2D image is shown as a raster image with the default `Rainbow 1' transfer function. The axis labels are are turned on and because the image is 2D the animation tapedeck is deactivated.
Here are a few extra notes on the functionality.
The standard viewerdisplaypanel control box control box is found along the left-hand side (zoom, pan, colormap control and region making).
There is an additional button at the bottom:
The menus along the top are a standard service provided by the viewerdisplaypanel tool. See it for discussion of the menu items if they are unclear.
Note in particular, that the "DisplayData" menu item can be used to toggle on and off the raster and contour displays, regardless of the values you gave the view function for arguments raster and contour).
The animation tapedeck along the right is a standard service provided by the viewerdisplaypanel tool. See it for discussion of the tapedeck interface if is unclear.
If you set vector=T then the image will be displayed as a grid of vectors (all of the same amplitude). The image pixel values are interpreted as the position angle. If the image brightness unit (brightnessunit) is not angular, degrees will be assumed. You can set the brightness units with the Image tool function (setbrightnessunit)
The position angle is measured positive North through East when you display a plane holding a celestial coordinate (the usual astronomical convention). For other axis/coordinate combinations, a positive position angle is measured from +x to +y in the absolute world coordinate frame.
To make Vector map displays where the amplitude is also provided, you need a Complex image and the basic Viewer gui interface. For more details, see the discussion in the Getting Results document. See also the Imagepol tool which has a function makecomplex to make Complex images from amplitude/phase or real/imaginary Float images.
The menu bar of the viewerdisplaypanel provides you with a submenu Tools. This has an item ImageAnalysis. If you select this menu item, you are presented with some rollups which give access to image analysis functions, such as interactive regions, positions and profiles, statistics and summary. These rollups are described in the viewerdisplaypanel documentation.
A number of events are generated by the view function and emitted by the Image tool. You can catch these yourself if you like, just like any Glish event.
- im := image('hcn') - whenever im->* do { + print $name, $value + }This example catches all events from the Image tool im and prints out the event names and values.
Most of the events are simply forwarded from the viewerdisplaypanel, but image.view provides a few extra events.
This event is not of general user interest.
The activatebreak argument of the view function is not intended for general user use (use the default value). However, if it is set to T, then the `break' button on the displaypanel is activated. If it is set to F, the button is deactivated. If left unset, the button state is left unchanged. When the button is pressed, or when you change its state via the call sequence, an event called breakfromviewer is emitted. The $value of the event are either T (break deactivated) or F (break activated).
This event is not of general user interest.
The view function generates its own private Viewer tool with which it makes the display. When this private Viewer is destroyed (e.g. the user presses the done button) an event called viewerdone is emitted. Its $value is T.
im := image('hcn') im.view(raster=T, contour=T, adjust=T)
Displays the image as a raster and overlays contours. The adjustment
panels (one for each display of the image) are shown as well.