next up previous contents index
Next: Using Image Channels Up: Image Displays Previous: Image Displays

   
XWindow display

With the term XWindow display we refer to a bitmapped screen supporting the X-11
Window environment. These displays have less functionality provided in hardware than the ``classical'' peripheral image displays. On the other hand they offer much more flexibility via software. For example, display screens of different sizes may be created and different number of image channels may be connected to any one display.
MIDAS starts up an independent server process, the IDI display server, which owns all X11 related data structures. MIDAS applications do not interact directly with the windows but send messages to the server which then performs the actual task. Like this we can keep the windows alive while the different applications are executed and terminated, one by one.
Also, keep in mind that all interaction with the display will only work while the input focus is in the display window (either enforced by clicking the mouse in that window or just moving the cursor into it - that depends on how your window manager is set up).

 
Depending upon the graphics hardware on your system you can work in PseudoColor mode (8 bits per pixel) or RGB mode (24 bits per pixel). In both modes the values of image pixels are scaled to an integer number in the range [0,255]. That number then serves as an index into a Color Lookup Table (LUT) which determines the actual color of that pixel. In PseudoColor mode that index is the same for the red, green and blue color, whereas in RGB mode we use three image pixels per screen pixel and they serve as independent indices for the three colors. These three image pixels maybe in different planes of the same 3-dim image or in different 2-dim images. Accordingly, we use three image memories (channel 0, 1 and 2) for the red, green and blue component of an image. You set MIDAS to PseudoColor or RGB mode via the command INITIALIZE/DISPLAY (by default PseudoColor mode is set up).
Assuming you have a 3-dim image realima.bdf with the red part in the 1st plane, green part in the 2nd and blue part in the 3rd plane, you can either load each plane individually into the corresponding image channel:

INITIALIZE/DISPLAY p5=RGB
LOAD/IMAGE realima,1 0
LOAD/IMAGE realima,2 1
LOAD/IMAGE realima,3 2
!note that channels begin with 0
or do it in one go:
INITIALIZE/DISPLAY p5=RGB
LOAD/IMAGE realima,1,3 0,...
The red plane is stored in channel 0, the green plane in channel 1 and the blue plane in channel 2. All three planes are combined for the display of the image.

 
With the command RESET/DISPLAY we delete all existing display (and graphics) windows and get back into initial mode, which is PseudoColor.
You can only work within one Color mode at the same time. However, if the hardware supports it, you can run two parallel Midas sessions with one using PseudoColor mode and the other one RGB mode.  
Image displays are created on the screen via the CREATE/DISPLAY command. An ``image display'' is then represented by a window on the bitmapped screen, also called ``display window'' in the following. It may contain one or several image channels (max. 12 currently) in PseudoColor, whereas you always have 3 channels in RGB mode. An overlay channel for graphics and text and an alpha memory are associated with an image display.
The image channels may have the same size as the display window or could be larger. These channels are not realised in hardware (e.g. video memory) like for a peripheral image display, but exist as data structures in main memory.
Images may be displayed (loaded in MIDAS terminology) in image channels and it is also possible to draw graphs and write text into these channels. For the (single) overlay channel only drawing and writing of text is supported which will then be shown on top of the currently active image channel.
The alpha memory is used to display information about the displayed image.

 
Initially each display is provided with a grayscale LUT.
You may create several image displays at the same time on your bitmapped screen even though only one display can be the current active display window at any time. With the command ASSIGN/DISPLAY you switch from one display to the next.  
Each image channel of a display window has independent scroll and zoom (emulated in software). You can also connect a zoom window to a display window. This window can then be used by commands such as GET/CURSOR and VIEW/IMAGE to provide a zoomed view of the subframe pointed at with the mouse.  
The display windows can be moved and resized. After resizing you have to reload the previously loaded (displayed) image again.  
Up to 9 different display windows of differing size can be created in a MIDAS session at a given moment. By running several MIDAS sessions in parallel you can create an unlimited amount of display windows which share the same LUT or not, depending upon the capabilities of your X-display system.  
You can also create display windows on other X-displays within a MIDAS session. A special kind of display windows, so-called shadow displays can be connected to any display window created before. Then, all activity on that display window is replayed on the shadowing window (which could be on an X-display in another room). The most important commands associated with display windows are:
 
INITIALIZE/DISPLAY - setup Color mode, size of LUTs, etc.
CREATE/DISPLAY - create an image display with image channels(s)
ASSIGN/DISPLAY - switch between different display windows
DELETE/DISPLAY - delete a display window
SHOW/DISPLAY - show status of active display
MODIFY/DISPLAY - change display window from full view to icon status
RESET/DISPLAY - delete all windows and get back into inital state



 
next up previous contents index
Next: Using Image Channels Up: Image Displays Previous: Image Displays
http://www.eso.org/midas/midas-support.html
1999-06-09