diff options
Diffstat (limited to 'vendor/x11iraf/ximtool/OLD')
-rw-r--r-- | vendor/x11iraf/ximtool/OLD/ximtool-0.5.info | 798 | ||||
-rw-r--r-- | vendor/x11iraf/ximtool/OLD/ximtool-alt.man | 1568 | ||||
-rwxr-xr-x | vendor/x11iraf/ximtool/OLD/ximtool-mag | 5494 | ||||
-rw-r--r-- | vendor/x11iraf/ximtool/OLD/ximtool-mag.c | 419 | ||||
-rw-r--r-- | vendor/x11iraf/ximtool/OLD/ximtool-mag.gui | 5388 | ||||
-rw-r--r-- | vendor/x11iraf/ximtool/OLD/ximtool-mag.html | 697 | ||||
-rw-r--r-- | vendor/x11iraf/ximtool/OLD/ximtool-mag.man | 1493 | ||||
-rw-r--r-- | vendor/x11iraf/ximtool/OLD/ximtool-mag.ps | 10025 |
8 files changed, 25882 insertions, 0 deletions
diff --git a/vendor/x11iraf/ximtool/OLD/ximtool-0.5.info b/vendor/x11iraf/ximtool/OLD/ximtool-0.5.info new file mode 100644 index 00000000..c9346675 --- /dev/null +++ b/vendor/x11iraf/ximtool/OLD/ximtool-0.5.info @@ -0,0 +1,798 @@ +Path: iraf!irafmail-gateway +From: tody@noao.edu (Doug Tody) +Newsgroups: adass.iraf.announce +Subject: XImtool version 0.5 released +Date: 24 May 1994 00:26:46 -0700 +Organization: IRAF Project, National Optical Astronomy Observatories +Lines: 787 +Sender: daemon@iraf.noao.edu +Message-ID: <9405240726.AA11099@lepus.tuc.noao.edu> +NNTP-Posting-Host: tucana.tuc.noao.edu + + XIMTOOL VERSION 0.5 + May 22 1994 + + +Version 0.5 of the alpha test ximtool is now available in pub/v2103-beta +on iraf.noao.edu and consists of the following files: + + 1589248 May 22 15:14 ximtool-0.5 # executable + +Anyone using an earlier version of ximtool is encouraged to update to the +new version, which is a major new version. Keep the old version around in +case you run into any problems. + +This is ALPHA TEST software. This means that the software is still under +development and may lack planned features. The software is only partially +tested and can be expected to have some bugs. Anyone using an alpha test +version of ximtool is asked to update to version 1.0 when it becomes +available. + + +INSTALLATION + +To install ximtool, download the executable, rename it "ximtool" and place +it somewhere in your search path (e.g. /usr/bin/X11 or /usr/local/bin). +An app-defaults file is not required to run ximtool. + +Don't install the new version while someone is using ximtool, or you will +crash their session. The simplest way to avoid this is to "mv" the old +executable to change the name, e.g. "mv ximtool ximtool.old". + +Since this is still alpha test software, all we are releasing is a snapshot +from our development system, which is a Sun sparc running SunOS. Hence only +a Sun binary is available at this time (unless someone wants to hack the +sources and generate their own binary for a new platform). + + +BASIC USAGE + +Ximtool is an image display server. To view images with it you need some +client software, such as IRAF, to load images into the display. Ximtool is +upwards compatible with older display servers such as SAOimage and imtool. +For example, to use ximtool instead of SAOimage, start up ximtool instead of +SAOimage and display in the usual fashion. + +You shouldn't need much documentation to be able to use ximtool effectively. +Just start it up, load images into one or more frames, and experiment with +the GUI to see what can be done to manipulate the display. Most of the +controls are obvious, but here are a few things which might not be obvious: + + o Clicking and dragging MB1 (mouse button 1) in the main image + window creates a rectangular region marker, used to select a + region of the image. If you do this accidentally and don't want + the marker, put the pointer in the marker and type DELETE or + BACKSPACE to delete the marker. With the pointer in the marker, + MB3 will call up a menu listing some thing you can do with the + marker, like zoom the outlined region. MB1 can be used to drag + or resize the marker. + + o Clicking on MB2 in the main image window pans (one click) or + zooms (two clicks) the image. Further clicks cycle through the + builtin zoom factors. Moving the pointer to a new location and + clicking moves the feature under the pointer to the center of + the display window. + + o MB3 is used to adjust the contrast and brightness of the displayed + image. The position of the pointer within the display window + determines the contrast and brightness values. Click once to + set the values corresponding to the pointer location, or click + and drag to continuously adjust the display. + + o Ctrl-f, Ctrl-b can be used to move forward or backward through + the current set of frame buffers. + + A frame buffer is an image (picture) stored in the display server. + Ximtool supports up to four frame buffers. Frame buffers can be any + size; the size is set by the client when an image is loaded into a + frame. For example, in IRAF "set stdimage = imt800" would set the + frame buffer size to 800x800 pixels. Changing the frame buffer size + forces an initialize of the display server. In IRAF the command + "gdev" will list the frame buffer configurations defined on your + system. + +Ximtool has a control panel which can be used to exercise most the +capabilities the program has for image display. The control panel can be +accessed either via the Options menu from the main window menubar, or by +pressing the leftmost button in the row of buttons at the upper right side +of the display. + +A more detailed overview of the ximtool capabilities and usage is given +below. + + +THINGS TO WATCH OUT FOR + + o It is possible to run multiple ximtools, or ximtool and other + display servers such as saoimage, imtool, skyview, etc., + simultaneously on the same computer, but don't attempt this unless + you know how to set the servers up on different i/o ports. In the + default configuration there will be conflicts with multiple servers + trying to listen on the same port. + + o Most workstations have a single 8 bit, 256 element colortable per + screen. This means that only 256 unique colors can be displayed at + any one time. Image display programs like ximtool (or SAOimage, or + xv, xloadimage, mosaic, etc.) need a lot of colortable entries in + order to display smoothly varying images. If you try to run + multiple image display programs at the same time you are likely to + run out of colortable space. This may result in warning messages + when a program starts up, cause images to be displayed funny, + causing flashing when the pointer moves in and out of image display + windows, and so on. + + It is best to avoid these problems by killing off any other display + programs when running ximtool. If you do run out of colortable + space when using ximtool this is harmless, but the image won't be + displayed correctly when the pointer is not in the image window. To + correct this condition, free up some colortable space (by killing + off some other X programs, especially any display programs) and then + move the pointer into the ximtool image window and back out. This + will cause ximtool to update the default colormap of the display and + in most cases will make the ximtool image display correctly. + Ximtool will always display correctly when the pointer is in the + image window, the problem occurs only when the pointer (colormap + focus) is in other windows. + + +WHAT'S NEW? + +Ximtool 0.5, while still incomplete, is a major new version, probably the +first really usable version of ximtool. Major new features in this version +include the following: + + o A popup control panel, providing control over frame selection, + zoom and pan, colortable selection from a list (including user + defined colortables), contrast and brightness display and controls, + blink control, including blink frames and blink rate, and option + control. (The ximtool control panel uses the new widgets and other + OBM enhancements discussed in the Xgterm 0.11 announcement.) + + o An option called the "panner". The panner displays a reduced + version of the entire frame buffer, with the region currently + displayed outlined with a marker. One can pan and zoom within + the panner window, e.g. by dragging the panner region marker, + to pan or zoom the main image window. This is useful when viewing + images too large to fit on the screen. + + o Autoscale option. If autoscale is enabled then at zoom=1, the + frame buffer will be automatically scaled to fit within the display + window. With autoscale disabled (the default), the image scale + is more predictable, but the image may be clipped by the display + window, or may not fill the display window. + + o Integer zoom. Ximtool supports both fractional zoom and integer + zoom. Fractional zoom uses a non-integer scale factor to scale an + image region as necessary to fill the display window. Integer zoom + ensures that each frame buffer pixel is displayed as exactly N + display pixels. Integer zoom is slightly faster than a fractional + zoom. + + o Antialiasing. When dezooming an image, i.e., displaying a large + image in a smaller display window, antialiasing causes all the + data to be used to compute the displayed image. If antialiasing + is disabled then image is subsampled to compute the displayed image. + Antialiasing can prevent subsampling from omitting image features + that don't fall in the sample grid, but it is significantly slower + than dezooming via subsampling. The default is no antialising. + + o Tile frames. The default display mode is to view one frame at a + time. In tile frames mode, 2 or 4 frames may be viewed + simultaneously in the display window. All the usual operations + (zoom and pan, colortable enhancement, cursor readback, etc.) + still work for each frame even when in tile frames mode. + + o Fitframe now works. Fitframe resizes the display window to the + same size as the frame buffer. + + o Ximtool allows clients to connect in any of the following ways: + + fifo pipes The traditional approach. The default, + global /dev/imt1[io] pipes may be used, + or a private set of fifos. + + tcp/ip socket Clients connect via a tcp/ip socket. + There is a default port, or a custom port + may be specified. This permits connecting + to the server over a remote network + connection anywhere on the Internet. + + unix domain socket Like a tcp/ip socket, but limited to a + single host system. Usually faster than a + tcp/ip socket, and comparable to a fifo. By + default each user gets their own unix domain + socket, so this option allows multiple users + to run ximtools on the same host without + having to customize things. + + By default ximtool listens simultaneously for client connctions on + all three types of ports. + + o Ximtool now supports multiple simultaneous client connections. + For example, one can be using the IRAF imexamine task to interact + with the image displayed in frame 1, while some other program + simultaneously displays an image in frame 2 (or any frame, including + the frame being examined). + + o An improved set of builtin colormaps are now provided. The user + can define additional custom colormaps when ximtool is started. + +There were many additional minor changes and bug fixes not worth going into +here. + + +TECHNICAL NOTES + +This isn't the place to write a detailed comprehensive reference manual for +ximtool, but since there isn't any such manual yet (this is still prerelease +software) some additional information on a few selected topics will probably +be useful. + + +COMMAND LINE OPTIONS + +This prerelease version of ximtool doesn't support general command line +options yet (except for the -defgui option described below). However, one +can accomplish the same thing by setting resources on the command line. For +example, + + ximtool \ + -xrm "*port:0" \ + -xrm "*input_fifo:none" \ + -xrm "*userCmapDir1:/user/smith/cmaps" \ + -xrm "*displayPanner:false" + +would start up ximtool with tcp/ip sockets and fifos disabled (leaving +only unix sockets for client connections). Ximtool will look for user +colormaps in the directory /user/smith/cmaps. The panner option will be +disabled at startup. + + +RESOURCES + +Ximtool has a ton of resources (hundreds of them), but in practice only a +few are likely to be useful at the user level. + +BUILTIN RESOURCES + + Resource Name Default Value + + defConfig: 1 + defNFrames: 0 + tileBorderWidth: 3 + tileBorderColor: 9 + autoscale: false + antialias: false + tileFrames: false + highlightFrames: true + gui: default + imtoolrc: /usr/local/lib/imtoolrc + memModel: fast + cmap1: none + cmap2: none + cmapDir1: none + cmapDir2: /usr/local/lib/imtoolcmap + input_fifo: /dev/imt1i + output_fifo: /dev/imt1o + unixaddr: /tmp/.IMT%d + port: 5137 + +All of these are application resources, hence they would be specified in +the .Xdefaults file as, e.g., "XImtool.autoscale: true", etc. + + +Description of ximtool client resources: + + defConfig Default frame buffer configuration on startup. + + defNFrames Default number of frames on startup. Set to zero + to use value from imtoolrc file. There isn't a + whole lot of reason to preallocate frames here, + since new frames will be created on demand if needed. + + tileBorderWidth Used by the tile frames option. Specifies how far + tileBorderColor apart to space the frames in tile frames mode. + Color "9" refers to the Gterm widget resource color9, + which is assigned a color with its own resource. + + autoscale Enable/disable the autoscale option. + antialias Enable/disable the antialias option. + tileFrames Enable/disable the tile frames option. + + highlightFrames Determines whether the current frame is highlighted + when in tile frames mode. + + gui The GUI to be executed. "default" refers to the + default, builtin ximtool GUI. You can replace this + with your own GUI file if you are bold enough, and + completely change the look and functionality of + the GUI if desired. + + imtoolrc Where to find the imtoolrc file. This defines the + recognized frame buffer configurations. + + memModel Determines how ximtool uses memory in the ximtool + client and the X server. The options are "fast", + "beNiceToServer", and "small". The default is fast, + which uses server pixmaps to make frame blink fast. + This is recommended unless server memory is very + limited. Note that even in fast mode, the server + pixmap is only the size of the display window, so + memory usage is reasonable even if the frame buffer + is very large. + + cmap1 User colormap files. The intent here is to allow + cmap2 individual colormaps to be conveniently specified + on the command line. + + cmapDir1 User or system colormap directories. By default + cmapDir2 cmapDir2 points to the system directory + /usr/local/lib/imtoolcmap, allowing a set of site + default colormaps to be defined here. This leaves + cmapDir1 available to a user colormap directory. + + input_fifo The input and output fifos for fifo i/o. "Input" + output_fifo and "output" are from the client's point of view. + Note that only one display server can use a + fifo-pair at one time. + + unixaddr Template address for unix domain socket. The user + must have write permission on this directory, or + the file must already exist. %d, if given, is + replaced by the user's UID. + + port TCP/IP port for the server. Note that only one + server can listen on a port at one time, so if + multiple ximtool servers are desired on the same + machine, they should be given different ports. + + +GUI RESOURCES + +In principle ximtool can have any number of different GUIs, each of which +defines its own set of resources. GUIs typically define a great many +resources, but most of these are not really intended for modification by +the user (although one can modify them if desired). + +The following are some of the more useful resources used by the default +ximtool GUI. + + Resource Name Default Value + + .geometry: + *controlShell.geometry: + *info.geometry: 420x120 + + *cmapName: image + *basePixel: 64 + *maxColors: 216 + + *imagewin.warpCursor: true + *imagewin.raiseWindow: true + *imagewin.deiconifyWindow: true + *imagewin.ginmodeCursor: circle + *imagewin.ginmodeBlinkInterval: 500 + *imagewin.color8: #7c8498 + *imagewin.color9: steelblue + + *autoscale: True + *zoomfactors: 1 2 4 8 + *displayCoords: True + *displayPanner: True + *blinkRate: 1.0 + *pannerArea: 150*150 + *pannerGeom: -5+5 + *wcsboxGeom: -5-5 + *maxContrast: 5.0 + *warnings: True + + +Description of selected resources: + + .geometry Geometry of main image window + *controlShell.geometry Geometry of control panel shell + *info.geometry Geometry of info box + + *cmapName Name used for private colormap. + The default for all IRAF imaging + applications is "image". Gterm + widget based imaging applications + which have the same value of cmapName + will share the same colormap, + minimizing colormap flashing and + allowing multiple applications to be + run at the same time. + + *basePixel These two resources determine the + *maxColors region of colormap space used to + render image pixels. + + *imagewin.warpCursor Warp pointer into image window when + initiating a cursor read. + *imagewin.raiseWindow Raise image window when initiating + a cursor read. + *imagewin.deiconifyWindow Deiconify image window if necessary + when initiating a cursor read. + + *imagewin.ginmodeCursor Type of cursor when a cursor read + is in progress. The default is a + circle. Any selection from the X + cursor font can be used. A special + case is "full_crosshair" which is + the full crosshair cursor of the + Gterm widget. + + *imagewin.ginmodeBlinkInterval Determines whether the cursor blinks + when a cursor read is in progress. + The value is given in milliseconds. + + *imagewin.color8 Color assigned the panner window. + *imagewin.color9 Color used for the tileFrames highlight. + + *pannerArea Area in pixels of the panner window. + *pannerGeom Where to place the panner window. + *wcsboxGeom Where to place the coords box. + *maxContrast Maximum contrast value. + +For a complete description of the ximtool resources, refer to the GUI file. +The "appInitialize" command contains the full resource list for the GUI. + + +CONTROL PANEL NOTES + +VIEW CONTROLS + + o The "Frame" box will list only the frame buffers you currently have + defined. Currently, the only way to destroy a frame buffer is to + change the frame buffer configuration. + + o The text display gives the field X,Y center, X,Y scale factors, and + the X,Y zoom factors. The scale factor and the zoom factor will be + the same unless autoscale is enabled. The scale is in units of + display pixels per frame buffer pixel, and is an absolute measure + (it doesn't matter whether or not autoscale is enabled). Zoom is + relative to the autoscale factor, which is 1.0 if autoscaling is + disabled. + + o The numbers in the Zoom box are zoom factors. Blue numbers zoom, + red numbers dezoom. Zoom In and Zoom Out may be used to go to + larger or smaller zoom factors, e.g. "5" followed by "Zoom In" will + get you to zoom factor 10. Center centers the field. Toggle Zoom + toggles between the current zoom/center values, and the unzoomed + image. + + o Aspect recomputes the view so that the aspect ratio is 1.0. Aspect + also integerizes the zoom factor (use the version in the View menu + if you don't want integerization). + + o Fit Frame makes the display window the same size as the frame buffer. + Note that autoscale has much the same effect, and allows you to + resize the display window to any size you want, or view images to + large to fit on the screen. + + +ENHANCEMENT CONTROLS + + o At the top is a scrolled list of all the available colormaps. Click + on the one you want to load it. You can add your own custom colormaps + to this list. + + o The two sliders adjust the contrast (upper slider) and brightness + (lower slider) of the display. The Invert button inverts the + colormap (multiples the contrast by -1.0). Note that due to the use + of the private colormap the sliders are a bit sluggish when dragged + to window the display. If this is annoying, using MB3 in the + display window is faster. + + o The Normalize button (on the bottom of the control panel) will + normalize the enhancement, i.e. set the contrast and brightness to + the default one-to-one values (1.0, 0.5). This is the preferred + setting for many of the pseudocolor colortables. + + +BLINK CONTROLS + + o Blink frames is the list of frames to be blink. When blink mode is + in effect ximtool just cycles through these frames endlessly, + pausing "blink rate" seconds between each frame. The same frame + can be entered in the list more than once. To program an arbitrary + list of blink frames, hit the Reset button and click on each blink + frame button until it is set to the desired frame number. + + o The blink rate can be adjusted as slow or as fast as you want using + the arrow buttons. If you set the blink rate small enough it will + go to zero, enabling single step mode (see below). + + o The Register button registers all the blink frames with the current + display frame. Frames not in the blink list are not affected. + + o The Match LUTs button sets the enhancement of all blink frames to + the same values as the display frame. Frames not in the blink list + are not affected. + + o The Blink button turns blink on and off. When the blink rate is + set to zero the Blink button will single step through the blink + frames, one frame per button press. + + NOTE: you can blink no matter what ximtool options are in effect, but + many of these will slow blink down. To get the fastest blink you may + want to turn off the panner and coords box, and match the LUTs of all + the blink frames. All the ximtool controls are fully active during + blink mode, plus you can load frames etc. + + +OPTIONS CONTROLS + + o The options box contains a set of option toggles. If the toggle + is yellow the option is in effect. + + +OTHER + + o Initialize initializes ximtool. This resets a lot of things, but + tries to not change the view. Select Reset in the File menu on the + main window menubar to fully reset things. + + o Normalize normalizes the view for the current display frame. + + o Done makes the control panel go away. + + +CUSTOM COLOR TABLES + +The cmap[12] and cmapDir[12] resources are used to tell ximtool where to +look for colortables. The colortables are loaded when ximtool starts up, or +when it is reinitialized (e.g. by pressing the Initialize button in the +control panel). Ximtool will ignore any files in the colormap directory +which do not look like colortables. + +The format of a user lookup table is very simple: each row defines one +colortable entry, and consists of three columns defining the red, green, +and blue values scaled to the range 0.0 (off) to 1.0 (full intensity). + + R G B + R G B + (etc.) + +Blank lines and comment lines (# ...) are ignored. + +Usually 256 rows are provided, but the number may actually be anything in +the range 1 to 256. Ximtool will interpolate the table as necessary to +compute the colortable values used in Ximtool. Ximtool uses only 201 colors +to render pixel data, so it is usually necessary to interpolate the table +when it is loaded. + +Tables are loaded into Ximtool by setting one of the user colormap directory +resources. When Ximtool starts up it will read all the files in the +colormap directory, disregarding any files that are unreadable or that do +not appear to be colortables. The name of the colortable as it will appear +in the Ximtool control panel is the root name of the file, e.g., if the file +is "rainbow.lut" the colortable name will be "rainbow". Lower case names +are suggested to avoid name collisions with the builtin colortables. If the +same colortable file appears in multiple user colortable directories, the +first one will be used. + +The directory "luts" in the ximtool source directory contains a sample set +of colortable files. This can be installed as /usr/local/lib/imtoolcmap +when ximtool is installed. + + +THE MARKER MENU + + o MB3 (mouse button 3) calls up the marker menu (by default). + + o Zoom does an equal aspect zoom of the region outlined by the marker. + In this way you can mark a region of the image and zoom it up. + + o Fill exactly zooms the area outlined by the marker, making it fill + the display window. Since the marker is not likely to be exactly + square, the aspect ratio of the resultant image will not be unitary. + + o Print prints a description of the marked region. The text is printed + in the Info box. + + o Unrotate unrotates a rotated marker. + + o Color is a menu of possible marker colors. + + o Type is a menu of possible marker types. This is still a little + buggy and it isn't very useful, but you can use it to play with + different types of markers. + + o Destroy destroys the marker. You can also hit the delete or + backspace key in a marker to destroy the marker. + + +MORE ON GRAPHICS MARKERS + +Although ximtool doesn't do much with markers currently, they are a general +feature of the Gterm widget and are used more extensively in other programs +(e.g. the prototype IRAF science GUI applications). Ximtool uses markers +for the marker zoom feature discussed above, and also for the panner and the +coords box. All markers share some of the same characteristics, so it is +worthwhile learning basic marker manipulation keystrokes. + + o MB1 anywhere inside a marker may be used to drag the marker. + + o MB1 near a marker corner or edge, depending on the type of marker, + resizes the marker. + + o Shift-MB1 on the corner of most markers will rotate the marker. + + o Markers stack, if you have several markers and you put one on top + of the other. The active marker is highlighted to tell you which + of the stacked markers is active. If the markers overlap, this + will be marker "on top" in the stacking order. + + o MB2 in the body of a marker "lowers" the marker, i.e. moves it to + the bottom of the stacking order. + + o Delete or backspace in a marker deletes the marker. + +For example, try placing the pointer anywhere in the coords box, then press +MB1 and hold it down, and drag the coords box marker somewhere else on the +screen. You can also resize the coords box by dragging a corner, or delete +it with the delete or backspace key. (The Initialize button will get the +original coords box back). + + +NOTES ON THE PANNER + +The panner window always displays the full frame buffer. Try setting the +frame buffer configuration to a nonsquare frame buffer (e.g. imtcryo) and +then displaying a square image (e.g. dev$pix) and the panner will show you +exactly where the image has been loaded into the frame. + +The panner window uses two markers, one for the window border and one to +mark the displayed region of the frame. Most of the usual marker keystrokes +mentioned above apply to these markers as well, e.g. you can use MB1 to +reposition on the panner window within the main image display window, or to +drag the region marker within the panner (pan the image). Resizing the +region marker zooms the image; this is a non-aspect constrained zoom. +The panner window itself can be resized by dragging a corner with MB1. +Typing delete or backspace anywhere in the panner window deletes the panner. + +A special case is MB2. Typing MB2 anywhere in the panner window pans the +image to that point. This is analogous to typing MB2 in the main display +window to pan the image. + + +THE COORDS BOX + +Ximtool provides a limited notion of world coordinates, allowing frame +buffer pixel coordinates and pixel values to be converted to some arbitrary +client defined coordinate system. The coords box feature is used to display +these world coordinates as the pointer is moved about in the image window. + +The quantities displayed in the coords box are X, Y, and Z: the X,Y world +coordinates of the pointer, and Z, the world equivalent of the pixel value +under the pointer. All coordinate systems are linear. The precision of a +displayed quantity is limited by the range of values of the associated raw +frame buffer value. For example, if the display window is 512x512 only 512 +coordinate values are possible in either axis (the positional precision can +be increased however by zooming the image). More seriously, at most about +200 pixel values can be displayed since this is the limit on the range of +pixel values loaded into the frame buffer. If a display pixel is saturated +a "+" will be displayed after the intensity value. + +The coords box is a marker (text marker) and it can be moved and resized +with the pointer like any other marker. + + +VIEWING THE IMAGE TITLE + +The title of the image loaded into the current display frame is displayed +centered in the control area at the top of the main display window. If the +title string is too long to be fully displayed it will be clipped at either +end. To see the full title string, either resize the display window, or +pop up the Info box. The Info box always displays the full image title. + + +NOTES ON CLIENT-SERVER I/O + +As mentioned earlier ximtool allows clients to connect using any of three +different communications domains: fifos, tcp/ip sockets, and unix domain +sockets. + +By default ximtool will listen and accept connections on all three types of +ports. This is fine if there is only one display server running on a host, +but conflicts arise if multiple display servers try to listen on the same +port. If this happens one needs to either disable a port, or change the +address. + + FIFOs The default fifos are /dev/imt1i and /dev/imt1o. + The resources input_fifo and output_fifo may be + set to use a different set of fifos. To disable + the fifo port entirely set input_fifo=none. The + fifos must be created and must have read and write + permission, before starting ximtool. + + TCP/IP socket The default tcp/ip port is 5137. The resource + "port" may be set to set a different port. To + disable tcp/ip sockets completely set port=0. + If ximtool is terminated it may take a couple of + minutes before unix allows ximtool to use the + port again. + + UNIX socket The default unix domain socket is /tmp/.IMT%d, + where %d is the user's UID number. Hence, each user + has a private unix domain socket, allowing multiple + ximtools to be run on the same host (but only one + per user unless the addresss is changed). To + disable unix domain sockets set unixaddr=none. The + server will automatically create and delete the unix + domain socket if none exists. + +In 2.10.3 beta-3 and later versions of IRAF the default action when +connecting to the display server is to first try a unix domain socket +connection using the socket /tmp/.IMT%d. If this fails the IRAF client +tries to connect via the old style FIFOs /dev/imt1[io]. Hence, if ximtool +is being used with only newer versions of IRAF and all connections are +local, FIFOs and tcp/ip sockets can be disabled and different users can +transparently run ximtool on the same host system. + +IRAF 2.10.3 or later uses the new ZFIOND network driver (described +elsewhere) to connect to the server. The graphcap file defines how to +connect to the server. This can be overridden however, by defining IMTDEV +in the host environment. For example to connect to a TCP/IP socket on host +foo.bar.edu, one could define + + setenv IMTDEV inet:5137:foo.bar.edu + +before logging into IRAF. + + +CUSTOM GUIs + +The default GUI of ximtool can be viewed by running ximtool as follows: + + ximtool -defgui + +This will print the default builtin GUI to the standard output. If this +output is saved in a file one can set the "gui" resource to point to this +file, and when ximtool starts up it will use this GUI file instead of the +builtin default GUI. The user can modify the GUI file as desired to +customize the GUI. Since the full GUI of ximtool is encapsulated in the GUI +file, ths is a very powerful option; one can generate quite a different +program merely by modifying the GUI file, without need to recompile any code. + + +PLANNED FUTURE WORK + +The following items are on the near term TODO list for ximtool. + + o Print dialog. Will be used to print whatever is displayed in the + main image window, generating a variety of types of output. + + o File load/save. For standalone use it is desirable to be able to + load the display from a disk file. The plan is to support at least + FITS for file input. + + o Info box. The info box is due for a major rewrite (the existing + one isn't very useful). + + o TclShell. This will allow experienced users to type Tcl commands + directly into the OBM interpreter at the heart of ximtool. + + o Add global translation actions for a variety of GUI functions, so + that the user can bind keystrokes and function keys to these actions. + + o Implement online help (question mark button in main window). + + o "Snap to equal aspect" feature for use when resizing panner. + +There are still quite a few useful features that could be implemented. +For example, a magnifier window (similar to the panner but displays a +magnified view of the region under the cursor). Similarly, one could have +a magnifier which pops up under the pointer. Split screen would be useful +for comparing multiple frame buffers. A window into an alternate frame +would be a useful alternative to frame blink. The Optimize button in the +Enhancement portion of the control panel will be used to automatically +compute the optimum contrast and brightness valus for the region for the +image in the main display window. + +More dramatically, alternate, completely different GUIs for ximtool are +possible, merely by loading a different GUI file. The planned SAOtng user +interface (being developed by SAO) is an example of this. SAOtng will +also provide enhanced client-server communications via an alternative, +more general communications protocol based on the X selection mechanism. diff --git a/vendor/x11iraf/ximtool/OLD/ximtool-alt.man b/vendor/x11iraf/ximtool/OLD/ximtool-alt.man new file mode 100644 index 00000000..4ca5b8a7 --- /dev/null +++ b/vendor/x11iraf/ximtool/OLD/ximtool-alt.man @@ -0,0 +1,1568 @@ +.\" @(#)ximtool.1 1.1 10-Dec-96 MJF +.TH XIMTOOL-ALT 1 "10 Dec 1996" "X11IRAF Project" +.SH NAME +ximtool-alt \- interactive image display program for the X Window System with experimental GUI +.SH SYNOPSIS +.B "ximtool-alt" [\-\fItoolkitoption\fP ...] [ \fIoptions\fP ...] [\fIimagename\fP] +.SH OPTIONS +.TP 5 +.B "-basePixel \fIN\fP" +The base colormap cell used by the colormap. This essentially allows you +to reserve \fIbasePixel\fP colors in the global colormap for other applications. +The default is 64, if changed you'll need to also specify the +\fI-cmapInitialize\fP option or resource. +.TP 5 +.B "-cmap1 \fIfile\fP" +User colormap 1. This flag allows you to specify a colormap to be made +available at task startup. +.TP 5 +.B "-cmap2 \fIfile\fP" +User colormap 2. This flag allows you to specify a second colormap to be +made available at task startup. +.TP 5 +.B "-cmapDir1 \fIdir\fP" +User colormap directory 1. Specifies a directory to be searched for colormaps. +.TP 5 +.B "-cmapDir2 \fIdir\fP" +User colormap directory 2. Specifies a directory to be searched for colormaps. +By default this points to the system directory /usr/local/lib/imtoolcmap, +allowing a set of site default colormaps to be defined here. +.TP 5 +.B "-cmapInitialize \fIbool\fP" +Initialize the ximtool colormap at startup. When setting the \fIbasePixel\fP +option or resource this is required in order to force the Gterm widget to +update its global colormap resource in the X server. The default is +\fIfalse\fP. +.TP 5 +.B "-cmapName \fIname\fP" +Name used for private colormap. The default for all IRAF imaging +applications is \fIimage\fP. Gterm widget based imaging applications +which have the same value of cmapName will share the same colormap, +minimizing colormap flashing and allowing multiple applications to be +run at the same time. +.TP 5 +.B "-config \fIN\fP" +Initial frame buffer configuration number. The default value is 1, indicating +a 512x512 frame buffer with 2 frames. See below for information on the frame +buffers. +.TP 5 +.B "-defgui" +Print the default GUI to the stdout. The GUI is a Tcl program that may be +customized by the user and reloaded using the \fI-gui\fP option or +the \fIgui\fP resource parameter. +.TP 5 +.B "-displayPanner \fIbool\fP" +Display panner marker window at startup. If set, a panner window showing +the full frame buffer will appear in the upper-right side of the main display +window. +.TP 5 +.B "-displayMagnifier \fIbool\fP" +Display magnifier marker window at startup. If set, a magnifier window showing +a zoomed section around the cursor will appear in the upper-left side of the +mail display window. +.TP 5 +.B "-displayCoords \fIbool\fP" +Display WCS coordinate marker window at startup. If set, a coordinate +readout text marker showing will appear in the lower-right side of the main +display window. +.TP 5 +.B "-fifo \fIpipe\fP" +Specifies the name of the fifo pipe to be used, the \fIi\fP +and \fIo\fP suffixes will be added automatically. The default pipe names +will be /dev/imt1i (input pipe) and /dev/imt1o (output pipe). +.TP 5 +.B "-fifo_only" +If set, only fifo pipes will be used for communication with a client program, +sockets will be disabled. +.TP 5 +.B "-gui \fIfile\fP" +Specifies the GUI file to be used. +.TP 5 +.B "-help" +Print a summary of command line options to the screen. +.TP 5 +.B "-imtoolrc \fIfile\fP" +Specifies the frame buffer configuration file to be used. See below for +information on frame buffers. +.TP 5 +.B "-inet_only" +If set, only inet sockets will be used for communication with a client program, +fifo pipes and unix sockets will be disabled. +.TP 5 +.B "-invert" +Start XImtool using inverted colormaps. When set, a "normalized" display +will always be the inverse of the selected colormap. +.TP 5 +.B "-maxColors \fIN\fP" +Specify the max number of colors to be used for the display. +.TP 5 +.B "-memModel \fItype\fP" +Determines how ximtool uses memory in the ximtool client and the X server. +The options are \fIfast\fP, \fIbeNiceToServer\fP, and \fIsmall\fP. The +default is \fIfast\fP, which uses server pixmaps to make frame blink fast. +This is recommended unless server memory is very limited. Note that even in +fast mode, the server pixmap is only the size of the display window, so memory +usage is reasonable even if the frame buffer is very large. +.TP 5 +.B "-nframes \fIN\fP" +Specifies the number of frame buffers to configure at startup. By default +there will be 2 frames available, a maximum of 4 frames are allowed. +.TP 5 +.B "-port \fIN\fP" +Specifies the port number to use when connecting through an inet socket. +.TP 5 +.B "-port_only" +Same as \fI-inet_only\fP option. If set, only inet sockets will be used for +communication with a client program. +.TP 5 +.B "-printConfig \fIname\fP" +Specifies the printer configuration file to use. By default this will be +/usr/local/lib/ximprint.cfg. See below for more information on configuring +output devices. +.TP 5 +.B "-showToolBar" +Show the Toolbox menubar at startup. +.TP 5 +.B "-showPanelBar" +Show the Panels menubar at startup. +.TP 5 +.B "-tile" +The default display mode is to view one frame at a time. In tile frames mode, +2 or 4 frames may be viewed simultaneously in the display window. All the +usual operations (zoom and pan, colortable enhancement, cursor readback, etc.) +still work for each frame even when in tile frames mode. +.TP 5 +.B "-unix \fIname\fP" +Specifies the unix domain socket name to use. A "%d" in the filename will +be replaced with the user id. +.TP 5 +.B "-unix_only" +If set, only unix domain sockets will be used for communication with a client +program, inet sockets and fifos will be disabled. + +.SH "RESOURCES" +XImtool is implemented as a client program which is responsible for loading +the frame buffers/colormaps, communicating with clients, etc, and a +user-modifiable GUI file written as a Tcl script which handles all the user +interface details. The \fIclient resources\fP described below will be common +to any user-defined GUI, the \fIgui resources\fP may change depending on how +extensively the GUI has been modified by the user. Each of these components +has its own set of resources, but to the user setting them is the same as +with any other application. + +\fIGterm\fP widget resources (i.e. those for the main image window or +colorbar) may be set as either client or GUI resources. See the +\fIxgterm(1)\fP man page for a complete description of \fIGterm\fP widget +resources. + +.SS "CLIENT RESOURCES" +The client resources generally define the initial state of the application +or set configuration parameters. +.RS +.TP 25 +.B "Resource Name" +\fBDefault Value\fP +.sp -0.5 +.TP 25 +defConfig +1 +.sp -0.5 +.TP 25 +defNFrames +0 +.sp -0.5 +.TP 25 +tileBorderWidth +3 +.sp -0.5 +.TP 25 +tileBorderColor +9 +.sp -0.5 +.TP 25 +autoscale +false +.sp -0.5 +.TP 25 +antialias +false +.sp -0.5 +.TP 25 +antialiasType +boxcar +.sp -0.5 +.TP 25 +tileFrames +false +.sp -0.5 +.TP 25 +highlightFrames +true +.sp -0.5 +.TP 25 +gui +default +.sp -0.5 +.TP 25 +imtoolrc +/usr/local/lib/imtoolrc +.sp -0.5 +.TP 25 +invert +false +.sp -0.5 +.TP 25 +memModel +fast +.sp -0.5 +.TP 25 +basePixel: +64 +.sp -0.5 +.TP 25 +maxColors: +216 +.sp -0.5 +.TP 25 +cmapInitialize: +false +.sp -0.5 +.TP 25 +cmap1 +none +.sp -0.5 +.TP 25 +cmap2 +none +.sp -0.5 +.TP 25 +cmapDir1 +none +.sp -0.5 +.TP 25 +cmapDir2 +/usr/local/lib/imtoolcmap +.sp -0.5 +.TP 25 +input_fifo +/dev/imt1i +.sp -0.5 +.TP 25 +output_fifo +/dev/imt1o +.sp -0.5 +.TP 25 +unixaddr +/tmp/.IMT%d +.sp -0.5 +.TP 25 +port +5137 +.RE +.LP +Description of ximtool client resources: + +.TP 18 +.B "defConfig" +Default frame buffer configuration number on startup. See below for more +information on frame buffers. +.TP 18 +.B "defNFrames" +Default number of frames on startup. Set to zero to use the value from +the frame buffer configuration (\fIimtoolrc\fP) file. +.TP 18 +.B "tileBorderWidth" +.sp -0.5 +.TP 18 +.B "tileBorderColor" +Used by the tile frames option. Specifies how far +apart to space the frames in tile frames mode. +Color "9" refers to the Gterm widget resource color9, +which is assigned a color with its own resource. +.TP 18 +.B "autoscale" +Enable/disable the autoscale option. +.TP 18 +.B "antialias" +Enable/disable the antialias option. +.TP 18 +.B "antialiasType" +Type of antialiasing. +.TP 18 +.B "tileFrames" +Enable/disable the tile frames option. +.TP 18 +.B "highlightFrames" +Determines whether the current frame is highlighted when in tile frames mode. +.TP 18 +.B "gui" +The GUI to be executed. "default" refers to the default, builtin ximtool GUI. +You can replace this with your own GUI file if you are bold enough, and +completely change the look and functionality of the GUI if desired. +.TP 18 +.B "imtoolrc" +Where to find the imtoolrc file. This defines the +recognized frame buffer configurations. +.TP 18 +.B "invert" +Start Ximtool using an inverted colormap. When set, a "normalized" display +will always be the inverse of the selected colormap. +.TP 18 +.B "memModel" +Determines how ximtool uses memory in the ximtool client and the X server. +The options are "fast", "beNiceToServer", and "small". The default is fast, +which uses server pixmaps to make frame blink fast. This is recommended +unless server memory is very limited. Note that even in fast mode, the server +pixmap is only the size of the display window, so memory usage is reasonable +even if the frame buffer is very large. +.sp -0.5 +.TP 18 +.B "basePixel" +.sp -0.5 +.TP 18 +.B "maxColors" +These two resources determine the region of colormap space used to +render image pixels. +.TP 18 +.B "cmapInitialize" +Initialize the ximtool colormap at startup. This is sometimes necessary to +clear a previous ximtool colormap allowing a new basePixel and maxColors to +take effect. +.TP 18 +.B "cmap1" +.sp -0.5 +.TP 18 +.B "cmap2" +User colormap files. The intent here is to allow individual colormaps to be +conveniently specified as a resource. +.TP 18 +.B "cmapDir1" +.sp -0.5 +.TP 18 +.B "cmapDir2" +User or system colormap directories. By default cmapDir2 points to the system +directory /usr/local/lib/imtoolcmap, allowing a set of site default colormaps +to be defined here. This leaves cmapDir1 available to a user colormap +directory. +.TP 18 +.B "input_fifo" +.sp -0.5 +.TP 18 +.B "output_fifo" +The input and output fifos for fifo i/o. "Input" and "output" are from the +client's point of view. Note that only one display server can use a +fifo-pair at one time. +.TP 18 +.B "unixaddr" +Template address for unix domain socket. The user must have write permission +on this directory, or the file must already exist. %d, if given, is +replaced by the user's UID. +.TP 18 +.B "port" +TCP/IP port for the server. Note that only one server can listen on a port +at one time, so if multiple ximtool servers are desired on the same +machine, they should be given different ports. + +.SS "GUI RESOURCES" + +In principle ximtool can have any number of different GUIs, each of which +defines its own set of resources. GUIs typically define a great many +resources, but most of these are not really intended for modification by +the user (although one can modify them if desired). + +The following are some of the more useful resources used by the default +ximtool GUI. The \fIimagewin\fR resources are Gterm widget resources. +.RS +.TP 35 +.B " Resource Name" +\fBDefault Value\fP +.sp -0.5 +.TP 35 + .geometry: + +.sp -0.5 +.TP 35 + *controlShell.geometry: + +.sp -0.5 +.TP 35 + *info.geometry: +420x240 +.sp -0.5 +.TP 35 + *load_panel.geometry: + +.sp -0.5 +.TP 35 + *save_panel.geometry: + +.sp -0.5 +.TP 35 + *print_panel.geometry: + +.sp -0.5 +.TP 35 + *help_panel.geometry: + +.sp -0.5 +.TP 35 + *cmapName: +image +.sp -0.5 +.TP 35 + *basePixel: +64 +.sp -0.5 +.TP 35 + *imagewin.warpCursor: +true +.sp -0.5 +.TP 35 + *imagewin.raiseWindow: +true +.sp -0.5 +.TP 35 + *imagewin.deiconifyWindow: +true +.sp -0.5 +.TP 35 + *imagewin.ginmodeCursor: +circle +.sp -0.5 +.TP 35 + *imagewin.ginmodeBlinkInterval: +500 +.sp -0.5 +.TP 35 + *imagewin.color0: +black +.sp -0.5 +.TP 35 + *imagewin.color1: +white +.sp -0.5 +.TP 35 + *imagewin.color8: +#7c8498 +.sp -0.5 +.TP 35 + *imagewin.color9: +steelblue +.sp -0.5 +.TP 35 + *imagewin.width: +512 +.sp -0.5 +.TP 35 + *imagewin.height: +512 +.sp -0.5 +.TP 35 + *autoscale: +True +.sp -0.5 +.TP 35 + *zoomfactors: +1 2 4 8 +.sp -0.5 +.TP 35 + *displayCoords: +True +.sp -0.5 +.TP 35 + *displayPanner: +True +.sp -0.5 +.TP 35 + *displayMagnifier: +False +.sp -0.5 +.TP 35 + *showToolBar: +False +.sp -0.5 +.TP 35 + *showPanelBar: +False +.sp -0.5 +.TP 35 +.TP 35 + *blinkRate: +1.0 +.sp -0.5 +.TP 35 + *pannerArea: +150*150 +.sp -0.5 +.TP 35 + *pannerGeom: +-5+5 +.sp -0.5 +.TP 35 + *magnifierArea: +100*100 +.sp -0.5 +.TP 35 + *magnifierGeom: ++5+5 +.sp -0.5 +.TP 35 + *wcsboxGeom: +-5-5 +.sp -0.5 +.TP 35 + *maxContrast: +5.0 +.sp -0.5 +.TP 35 + *warnings: +True +.RE +.LP +Description of selected resources: + +.TP 22 +.B ".geometry" +Geometry of main image window. +.TP 22 +.B "*controlShell.geometry" +Geometry of control panel shell. +.TP 22 +.B "*info.geometry" +Geometry of info box. +.TP 22 +.B "*load_panel.geometry" +Geometry of file load panel. +.TP 22 +.B "*save_panel.geometry" +Geometry of save control panel. +.TP 22 +.B "*print_panel.geometry" +Geometry of print control panel. +.TP 22 +.B "*help_panel.geometry" +Geometry of help box. +.TP 22 +.B "*cmapName" +Name used for private colormap. The default for all IRAF imaging applications +is "image". Gterm widget based imaging applications which have the same value +of cmapName will share the same colormap, minimizing colormap flashing and +allowing multiple applications to be run at the same time. +.TP 22 +.B "*basePixel" +The base colormap cell used by the display colormap. +.TP 22 +.B "*imagewin.warpCursor" +Warp pointer into image window when initiating a cursor read. +.TP 22 +.B "*imagewin.raiseWindow" +Raise image window when initiating a cursor read. +.TP 22 +.B "*imagewin.deiconifyWindow" +Deiconify image window if necessary when initiating a cursor read. +.TP 22 +.B "*imagewin.ginmodeCursor" +Type of cursor when a cursor read is in progress. The default is a +circle. Any selection from the X cursor font can be used. A special +case is "full_crosshair" which is the full crosshair cursor of the +Gterm widget. +.TP 22 +.B "*imagewin.ginmodeBlinkInterval" +Determines whether the cursor blinks when a cursor read is in progress. +The value is given in milliseconds. +.TP 22 +.B "*imagewin.color0" +Background color. +.TP 22 +.B "*imagewin.color1" +Foreground color. +.TP 22 +.B "*imagewin.color8" +Color assigned the panner window. +.TP 22 +.B "*imagewin.color9" +Color used for the tileFrames highlight. +.TP 22 +.B "*imagewin.width" +Width of the main image window. +.TP 22 +.B "*imagewin.height" +Height of the main image window. +.TP 22 +.B "*pannerArea" +Area in pixels of the panner/magnifier window. +.TP 22 +.B "*pannerGeom" +Where to place the panner/magnifier window. +.TP 22 +.B "*magnifierArea" +Area in pixels of the magnifier window. +.TP 22 +.B "*magnifierGeom" +Where to place the magnifier window. +.TP 22 +.B "*wcsboxGeom" +Where to place the coords box. +.TP 22 +.B "*maxContrast" +Maximum contrast value. +.TP 22 +.B "*showToolBar" +Show the Toolbox menubar on startup. +.TP 22 +.B "*showPanelBar" +Show the Panels menubar on startup. + +.sp +.SH DESCRIPTION +.LP +As a display server, XImtool is started as a separate process from client +software such as IRAF. Once it is running it will accept client connections +simultaneously on fifo pipes, unix domain sockets, or inet sockets. A +display client like the IRAF \fIDISPLAY\fP task makes a connection and sends +the image across using an IIS protocol. Once the image is loaded in the +display buffer it may be enhanced, saved to a disk file in a number of +different formats, or printed as Encapsulated Postscript to a printer or +disk file. Up to four frame buffers are allowed, these may be displayed +simultaneously in a tiled mode, or blinked frame-to-frame. Each frame may +have its own colormap or brightness/contrast enhancement. Pan/Zoom and +cursor readout are permitted using \fImarkers\fP, on-line help is also +available. + +When run in standalone mode, images (currently IRAF OIF, GIF, Sun Rasterfiles +or simple FITS formats are permitted) may be loaded on the command line or by +using the Load Panel. This allows you to browse images and perform the same +manipulations as if they had been displayed by a client. + +.SS "GUI OVERVIEW" + +The GUI consists of a large image display window and a number of smaller +pannels that control various specific functions such as image Load, Save +and Print as well as a general purpose Control Panel. The main window +menubar has several menu buttons to the left: the \fIFiles\fR menu is used +to load/save/print an image as well as quit the task. The \fIView\fR menu +let's you select the image orientation, zoom, colormap or frame. The +\fIOptions\fR menu allows you to call up control panels, toggle markers +or blinking etc. Some of this functionality is duplicated elsewhere in +the GUI. + +The right side of the menubar contains command buttons to flip the +image as well as buttons for frame selection. The \fIToolbox Button\fR is +labelled with a 'T', when this is enabled a second menubar appears below +the main one containing a number of command buttons providing quick access +to functions otherwise found elsewhere in the GUI. From the left these +buttons include: +.nf + + symbol - zoom in + Magnify - set zoom factor 1 + - symbol - zoom out + Inv - Invert contrast + Norm - Normalize colormap + Match - Match LUTs + Reg - Register + Cntr - Center frame + < arrow - decrease blink interval + Blink - Toggle frame blink + > arrow - inrease blink interval + <-> symbol - X-flip and Y-flip + |+| symbol - Tile Frame toggle + < arrow - previous frame + <number> - select frame + > arrow - next frame +.fi +The image flip and +frame selection buttons are also moved from the main menubar to provide +more space for the image title. Next to the toolbox toggle is the +\fIControl Panels\fR button which operates in a similar manner. When enabled +a second menubar appears with more buttons: on the left side are two icons +used as accelerators for a disk save (the floppy icon) and print function +(the printer icon), the parameters used for these operations are those which +have seen set through their respective control panel or the task resources. +The middle two sections of buttons are toggles which manage the control +panels for each function or the main imagewindow markers. Finally a help +and a quit button for the task. By default these two extra menubars are +disabled to provide more screen space for the image, they are controlled +by the task \fI*showToolBar\fR and \fI*showPanelBar\fR resources or the +\fI-showToolBar\fR and \fI-showPanelBar\fR command line flags. + +For more detailed information on the operation of the control panels please +see the on-line help (i.e. use the '?' button or Alt-h keystroke in the +main image window). + +.SS "MOUSE OPERATIONS" + +Clicking and dragging MB1 (mouse button 1) in the main image window creates +a rectangular region marker, used to select a region of the image. If you do +this accidentally and don't want the marker, put the pointer in the marker +and type DELETE or BACKSPACE to delete the marker. With the pointer in the +marker, MB3 will call up a marker menu listing some things you can do with +the marker, like zoom the outlined region. MB1 can be used to drag or resize +the marker. See below for more information on markers. + +Clicking on MB2 in the main image window pans (one click) or zooms (two +clicks) the image. Further clicks cycle through the builtin zoom factors. +Moving the pointer to a new location and clicking moves the feature under +the pointer to the center of the display window. Holding down the Shift +key while clicking MB2 will cause a full-screen crosshair cursor to appear +until the button is released, this can be useful for fine positioning of the +cursor. + +MB3 is used to adjust the contrast and brightness of the displayed image. +The position of the pointer within the display window determines the +contrast and brightness values. Click once to set the values corresponding +to the pointer location, or click and drag to continuously adjust the +display. + +.SS "KEYSTROKE ACCELERATORS" + +The following keystrokes are currently defined in the GUI: + +.TP 12 +.B "Ctrl-b" +Backward frame +.sp -0.5 +.TP 12 +.B "Ctrl-c" +Center frame +.sp -0.5 +.TP 12 +.B "Ctrl-f" +Forward frame +.sp -0.5 +.TP 12 +.B "Ctrl-i" +Invert +.sp -0.5 +.TP 12 +.B "Ctrl-m" +Toggle magnifier +.sp -0.5 +.TP 12 +.B "Ctrl-n" +Normalize +.sp -0.5 +.TP 12 +.B "Ctrl-p" +Toggle panner +.sp -0.5 +.TP 12 +.B "Ctrl-r" +Register +.sp -0.5 +.TP 12 +.B "Ctrl-s" +Match LUT scaling +.sp -0.5 +.TP 12 +.B "Ctrl-t" +Tile frames toggle +.sp -0.5 +.TP 12 +.B "Ctrl-u" +Unzoom (zoom=1) +.sp -0.5 +.TP 12 +.B "Ctrl-x" +Flip X +.sp -0.5 +.TP 12 +.B "Ctrl-y" +Flip Y + +.TP 12 +.B "Alt-b" +Blink frames (toggle) +.sp -0.5 +.TP 12 +.B "Alt-c" +Control panel (toggle) +.sp -0.5 +.TP 12 +.B "Alt-h" +Help popup (toggle) +.sp -0.5 +.TP 12 +.B "Alt-i" +Info box popup (toggle) +.sp -0.5 +.TP 12 +.B "Alt-l" +Load file popup (toggle) +.sp -0.5 +.TP 12 +.B "Alt-p" +Print popup (toggle) +.sp -0.5 +.TP 12 +.B "Alt-s" +Save popup (toggle) +.sp -0.5 +.TP 12 +.B "Alt-t" +TclShell popup (toggle) + +.TP 12 +.B "Ctrl-Alt-q" +Quit +.sp -0.5 +.TP 12 +.B "Ctrl-Alt-f" +Fitframe + +.TP 12 +.B "Ctrl-=" +Print using current setup +.sp -0.5 +.TP 12 +.B "Ctrl-<" +Decrease blink rate (blink faster) +.sp -0.5 +.TP 12 +.B "Ctrl->" +Increase blink rate (blink slower) +.sp -0.5 +.TP 12 +.B "Ctrl-+" +Zoom in +.sp -0.5 +.TP 12 +.B "Ctrl--" +Zoom out + +.TP 12 +.B "Ctrl-[hjkl] or <arrow_key>" +Move cursor one pixel in each direction +.sp -0.5 +.TP 12 +.B "Ctrl-Shift-[hjkl] or Shift-<arrow_key>" +Move cursor ten pixels in each direction +.sp -0.5 +.TP 12 +.B "Ctrl-<arrow_key>" +Move one full panner frame in each direction +.sp -0.5 +.TP 12 +.B "Ctrl-Alt-<arrow_key>" +Move one half panner frame in each direction +.sp -0.5 +.TP 12 +.B "Alt-1 thru Alt-4" +Set frame displayed +.sp -0.5 +.TP 12 +.B "Ctrl-1 thru Ctrl-9" +Set integer zoom factor + +.LP +\fBNOTE:\fP These keystrokes only work with the cursor in the main image window, +not on the subwindows or in markers since they are implemented as +\fIimagewin\fP translations. If a command does not work, check the cursor +location. + +.SH "CLIENT CONNECTIONS" +.LP +XImtool allows clients to connect in any of the following ways: +.TP 5 +.B "fifo pipes" +The traditional approach. The default global /dev/imt1[io] +pipes may be used, or a private set of fifos can be specified using the +\fI-fifo\fP command line argument or \fI*fifo\fP resource. Values should +be specified as the root pathname to a pair of fifo pipes whose last +character is 'i' or 'o', these characters will be added automatically when +opening the pipes. For example, to use the default pipes the path would +be specified as simply "/dev/imt1". A value of "none" disables this connection. +.TP 5 +.B "tcp/ip sockets" +Clients connect via a tcp/ip socket. The default port is \fI5137\fP, or a +custom port may be specified using the \fI-port\fP command line switch or +a \fI*port\fP resource. This permits connecting to the server +over a remote network connection anywhere on the Internet. +A port number of 0 (zero) disables this connection. +.TP 5 +.B "unix domain sockets" +Like a tcp/ip socket, but limited to a single host system. Usually faster +than a tcp/ip socket, and comparable to a fifo. By default each user gets +their own unix domain socket, so this option allows multiple users to run +ximtools on the same host without having to customize things. The default +value is "/tmp/.IMT%d", other sockets may be defined using the \fI-unix\fP +command line switch or the \fI*unixaddr\fR resource. Legal values +should be specified as a filename to be used for the socket, up to two "%d" +fields are allowed and will be replaced by the userid. An empty string value +disables this connection. +.LP +By default ximtool listens simultaneously for client connections on all three +types of ports. Clients may connect simultaneously by different +means allowing up to three different displays to be loading at the same +time into different frames. + +.SS "COMMUNICATIONS PROTOCOL" + +Clients communicate with XImtool using a protocol developed originally for +IIS (International Imaging Systems) Frame Buffer hardware, the so-called +"IIS protocol"; other more modern protocols will likely be supported in the +future. The IIS protocol is basically a command packet stream with a header +describing the operation to be performed (select frame, load display, read +cursor, etc), and an optional data packet containing e.g. pixels. It is beyond +the scope of this document to describe fully the details of the protocol; +interested users should contact \fIiraf@noao.edu\fP for further information. + +.SH "FRAME BUFFERS" + +XImtool starts up using default frame buffer size of 512x512 pixels, two +(of four possible) frames will be created. When loading +disk images (i.e. run in standalone mode) the frame buffer configuration file +will be searched for a defined frame buffer that is the same size or larger +than the current image, if no suitable buffer can be found a custom frame +buffer the same size as the image will be created in an unused portion of +the configuration table. When used as a display server the frame buffer +configuration number is passed in by the client and loaded explicitly even +if it means clipping the image. If a new frame buffer is +a different size than previously defined frames, all available frames +will be initialized and cleared prior to the display. The default frame buffer +configuration file is /usr/local/lib/imtoolrc, +this can be overridden by defining a IMTOOLRC environment variable naming +the file to be used, by creating a .imtoolrc file in your home directory, or +a new file may be specified using the \fI-imtoolrc\fR command line flag or +\fIimtoolrc\fR application resource. + +The format of the frame buffer configuration file is + + \fIconfigno nframes width height [extra fields]\fP + e.g. + 1 2 512 512 + 2 2 800 800 + 3 1 1024 1024 # comment + : : : : + +At most 128 frame buffer sizes may be defined, each configuration may define +up to 4 frames, configuration numbers need not be sequential. + +\fBNOTE:\fR When defining a new frame buffer for use with client software +such as IRAF the user must also remember to define those frame buffers in +the IRAF \fIdev$graphcap\fR file. + +.SH "MARKERS" + +Although ximtool doesn't do much with markers currently, they are a general +feature of the \fIGterm\fP widget and are used more extensively in other +programs (e.g. the prototype IRAF science GUI applications). XImtool uses +markers for the marker zoom feature discussed above, and also for the panner, +magnifier and the coordinates box. All markers share some of the same +characteristics, so it is worthwhile learning basic marker manipulation +keystrokes. +.TP 3 +\fBo\fP +MB1 anywhere inside a marker may be used to drag the marker. +.TP 3 +\fBo\fP +MB1 near a marker corner or edge, depending on the type of marker, +resizes the marker. +.TP 3 +\fBo\fP +Shift-MB1 on the corner of most markers will rotate the marker. +.TP 3 +\fBo\fP +Markers stack, if you have several markers and you put one on top of +the other. The active marker is highlighted to tell you which of the +stacked markers is active. If the markers overlap, this will be marker +"on top" in the stacking order. +.TP 3 +\fBo\fP +MB2 in the body of a marker "lowers" the marker, i.e. moves it to the +bottom of the stacking order. +.TP 3 +\fBo\fP +Delete or backspace in a marker deletes it. +.TP 3 +\fBo\fP +Markers have their own translation resources and so the default +keystroke commands will not be recognized when the cursor is in a marker. +.LP +For example, try placing the pointer anywhere in the coords box, then press +MB1 and hold it down, and drag the coords box marker somewhere else on the +screen. You can also resize the coords box by dragging a corner, or delete +it with the delete or backspace key. (The Initialize button will get the +original coords box back if you delete it, or you can reset the toggle in +the control panel). + +.SS "PANNER MARKER" + +The panner window always displays the full frame buffer. Try setting the +frame buffer configuration to a nonsquare frame buffer (e.g. imtcryo) and +then displaying a square image (e.g. dev$pix) and the panner will show you +exactly where the image has been loaded into the frame. + +The panner window uses two markers, one for the window border and one to +mark the displayed region of the frame. Most of the usual marker keystrokes +mentioned below apply to these markers as well, e.g. you can use MB1 to +reposition on the panner window within the main image display window, or to +drag the region marker within the panner (pan the image). Resizing the +region marker zooms the image; this is a non-aspect constrained zoom. The +panner window itself can be resized by dragging a corner with MB1. Typing +delete or backspace anywhere in the panner window deletes the panner. + +A special case is MB2. Hitting MB2 anywhere in the panner window pans the +image to that point. This is analogous to hitting MB2 in the main display +window to pan the image. + +The panner marker can be disabled by defining the \fIdisplayPanner\fP +GUI resource, its size and location can be controlled using the +\fIpannerArea\fP and \fIpannerGeom\fP GUI resources respectively. + +.SS "MAGNIFIER MARKER" + +The magnifier marker can be used to zoom in on a small area around the cursor. +It will be updated as the cursor moves but only for small motions (either +mouse movement or with the cursor movement keystrokes) to minimize the +impact on the system. The zoom factor is expressed as some fraction of the +size of the magnifier marker itself. The default zoom is 4, i.e. the area +in the marker represents and area in the image that's one-fourth the size +of the marker. Other zoom factors may be selected using the popup menu +created by hitting MB1 in the marker. + +By default the magnifier marker is not visible, to toggle it select the +\fIMagnifier\fR option from the \fIOptions\fR menubar button. Alternatively, +for just a quick look holding down the Shift and MB1 buttons will display +the marker until the button is released. + +The magnifier marker can be disabled by defining the \fIdisplayMagnifier\fP +GUI resource, its size and location can be controlled using the +\fImagnifierArea\fP and \fImagnifierGeom\fP GUI resources respectively. + +.SS "COORDS BOX MARKER" + +XImtool provides a limited notion of world coordinates, allowing frame +buffer pixel coordinates and pixel values to be converted to some arbitrary +linear client-defined coordinate system. The coords box feature is used to +display these world coordinates as the pointer is moved about in the image +window. + +The quantities displayed in the coords box are X, Y, and Z: the X,Y world +coordinates of the pointer, and Z, the world equivalent of the pixel value +under the pointer. All coordinate systems are linear. The precision of a +displayed quantity is limited by the range of values of the associated raw +frame buffer value. For example, if the display window is 512x512 only 512 +coordinate values are possible in either axis (the positional precision can +be increased however by zooming the image). More seriously, at most about +200 pixel values can be displayed since this is the limit on the range of +pixel values loaded into the frame buffer. If a display pixel is saturated a +"+" will be displayed after the intensity value. + +The coords box is a text marker, it can be moved and resized +with the pointer like any other marker. The coords box marker can be +disabled by defining the \fIdisplayCoords\fP GUI resource, its location +can be controlled by the \fIwcsboxGeom\fP GUI resource. + +.SS "MARKER MENU OPTIONS" + +Except for the panner and WCS markers, MB3 (mouse button 3) calls up the +marker menu providing a limited set of functions common to all markers: +.TP 3 +\fBo +Zoom\fP does an equal aspect zoom of the region outlined by the marker. In +this way you can mark a region of the image and zoom it up. +.TP 3 +\fBo +Fill\fP exactly zooms the area outlined by the marker, making it fill the +display window. Since the marker is not likely to be exactly square, +the aspect ratio of the resultant image will not be unitary. +.TP 3 +\fBo +Print\fP prints the region outlined by the marker to the printer or file +currently configured by the Print Panel. +.TP 3 +\fBo +Save\fP saves the region outlined by the marker to the file currently +configured by the Save Panel. +.TP 3 +\fBo +Info\fP prints a description of the marked region. The text is printed in +the Info Panel. +.TP 3 +\fBo +Unrotate\fP unrotates a rotated marker. +.TP 3 +\fBo +Color\fP is a menu of possible marker colors. +.TP 3 +\fBo +Type\fP is a menu of possible marker types. This is still a little buggy +and it isn't very useful, but you can use it to play with different +types of markers. +.TP 3 +\fBo +Destroy\fP destroys the marker. You can also hit the delete or backspace +key in a marker to destroy the marker. + +.SH "CONTROL PANEL" + +XImtool has a control panel which can be used to exercise most of the +capabilities the program has for image display. The control panel can be +accessed either via the \fBOptions\fP menu from the main window menubar, or by +pressing the leftmost button in the row of buttons at the upper right side +of the display. + +.SS "VIEW CONTROLS" + +The \fBFrame box\fP will list only the frame buffers you currently have +defined. Currently, the only way to destroy a frame buffer is to change the +frame buffer configuration, new frame buffers (up to 4) will be created +automatically if requested by the client. The number of frame buffers +created at startup can be controlled using the \fI-nframes\fP command-line +switch or the \fIdefNFrames\fP resource. + +The \fBtext display\fP window gives the field X,Y center, X,Y scale factors, +and the X,Y zoom factors. The scale factor and the zoom factor will be the same +unless \fIautoscale\fP is enabled. The scale is in units of display pixels per +frame buffer pixel, and is an absolute measure (it doesn't matter whether or +not autoscale is enabled). Zoom is relative to the autoscale factor, which +is 1.0 if autoscaling is disabled. This information is also presented in the +Info panel. + +The numbers in the \fBZoom box\fP are zoom factors. Blue numbers zoom, red +numbers dezoom. \fIZoom In\fP and \fIZoom Out\fP may be used to go to larger +or smaller zoom factors, e.g. "Ctrl-5" followed by "Zoom In" will get you to +zoom factor 10. Specific zoom factors may also be accessed directly as Control +keystrokes, e.g. Ctrl-5 will set zoom factor 5. \fICenter\fP centers the field. +\fIToggle Zoom\fP toggles between the current zoom/center values, and the +unzoomed image. + +\fIAspect\fP recomputes the view so that the aspect ratio is 1.0. Aspect also +integerizes the zoom factor (use the version in the View menu if you don't +want integerization). + +\fIFit Frame\fP makes the display window the same size as the frame buffer. Note +that autoscale has much the same effect, and allows you to resize the +display window to any size you want, or view images too large to fit on the +screen. + +.SS "ENHANCEMENT CONTROLS" + +At the top is a scrolled list of all the available colormaps. Click on the +one you want to load. You can add your own colormaps to this list by +defining the \fIcmap[12]\fP or \fIcmapDir[12]\fP command line flags or +application resources. + +The two sliders adjust the contrast (upper slider) and brightness (lower +slider) of the display. The \fIInvert\fP button inverts the colormap (multiples +the contrast by -1.0). Note that due to the use of the private colormap the +sliders are a bit sluggish when dragged to window the display. If this is +annoying, using MB3 in the display window is faster. + +The \fINormalize\fP button (on the bottom of the control panel) will normalize +the enhancement, i.e. set the contrast and brightness to the default one-to-one +values (1.0, 0.5). This is the preferred setting for many of the pseudocolor +colortables and for private colormaps loaded from disk images. The +\fIInitialize\fP button does a reset of the server. + +.SS "BLINK CONTROLS" + +\fIBlink frames\fP is the list of frames to be blinked. When blink mode is +in effect ximtool just cycles through these frames endlessly, pausing +"blink rate" seconds between each frame. The same frame can be entered +in the list more than once. To program an arbitrary list of blink +frames, hit the Reset button and click on each blink frame button until +it is set to the desired frame number. + +The \fIBlink Rate\fP can be adjusted as slow or as fast as you want using the +arrow buttons. If you set the blink rate small enough it will go to +zero, enabling single step mode (see below). + +The \fIRegister\fP button registers all the blink frames with the current +display frame. Frames not in the blink list are not affected. + +The \fIMatch LUTs\fP button sets the enhancement of all blink frames to the +same values as the display frame. Frames not in the blink list are not affected. + +The \fIBlink\fP button turns blink on and off. When the blink rate is set to +zero the Blink button will single step through the blink frames, one +frame per button press. + +\fBNOTE:\fP You can blink no matter what ximtool options are in effect, but +many of these will slow blink down. To get the fastest blink you may want to +turn off the panner and coords box, and match the LUTs of all the blink frames. +All the ximtool controls are fully active during blink mode, plus you can +load frames etc. + +.SS "OPTIONS:" +.TP 5 +.B "Panner" +Toggles whether to display the panner marker. +.TP 5 +.B "Coords Box" +Toggles whether to display the coordinate box marker. +.TP 5 +.B "Autoscale" +If autoscale is enabled then at zoom=1, the frame buffer will be +automatically scaled to fit within the display window. With autoscale +disabled (the default), the image scale is more predictable, but the +image may be clipped by the display window, or may not fill the display +window. +.TP 5 +.B "Antialiasing" +When dezooming an image, i.e., displaying a large image in a smaller +display window, antialiasing causes all the data to be used to compute +the displayed image. If antialiasing is disabled then image is +subsampled to compute the displayed image. Antialiasing can prevent +subsampling from omitting image features that don't fall in the sample +grid, but it is significantly slower than dezooming via subsampling. +The default is no antialising. +.TP 5 +.B "Tile Frames" +The default display mode is to view one frame at a time. In tile frames +mode, 2 or 4 frames may be viewed simultaneously in the display window. +All the usual operations (zoom and pan, colortable enhancement, cursor +readback, etc.) still work for each frame even when in tile frames mode. +.TP 5 +.B "Warnings" +The warnings options toggles whether you see warning dialog boxes in +situations like overwriting an existing file, clearing the frame +buffer, etc. + +.SH "COLORMAP SELECTION" + +By default XImtool will display images using either a grayscale colormap (e.g. +if loaded by a client), or a private colormap when loading an image from disk +that contains a colormap. Each frame defines its own colormap so you can +define different colormaps or enhancements for each frame, they will change +automatically as you cycle through the frames. + +.SS "BUILTIN COLORMAPS" + +Once loaded, the colormap may either be changed using the builtin colormap +menu under the View menu button on the main window, or from the Enhancement +box on the control panel. XImtool has about a dozen colormap options +builtin, other user-defined colormaps may optionally be loaded. It is not +presently possible to save colormaps for later use. + +.SS "USER-DEFINED COLORMAPS" + +The \fIcmap[12]\fP and \fIcmapDir[12]\fP resources (or command line arguments) +are used to tell which specific colormaps to make available or where to look +for colortables respectively. The colortables are loaded when ximtool starts +up, or when it is reinitialized (e.g. by pressing the Initialize button in +the control panel). XImtool will ignore any files in the colormap directory +which do not look like colortables. New colortables will also be added +automatically for each image loaded from disk. + +The format of a user lookup table is very simple: each row defines one +colortable entry, and consists of three columns defining the red, green, and +blue values scaled to the range 0.0 (off) to 1.0 (full intensity). + + R G B + R G B + (etc.) + +Blank and comment lines (lines beginning with a '#') are ignored. + +Usually 256 rows are provided, but the number may actually be anything in +the range 1 to 256. XImtool will interpolate the table as necessary to +compute the colortable values used in XImtool. XImtool uses at most 201 +colors to render pixel data, so it is usually necessary to interpolate the +table when it is loaded. + +The name of the colortable as it will appear in the XImtool control panel is +the root name of the file, e.g., if the file is "rainbow.lut" the colortable +name will be "rainbow". Lower case names are suggested to avoid name +collisions with the builtin colortables. Private colormaps for disk images +will be have the same name as the image loaded. If the same colortable file +appears in multiple user colortable directories, the first one found will be +used. + +.SS "MINIMIZING COLORMAP CONFLICTS" + +The Gterm widget used by XImtool (i.e. the main display window) uses a private +global colormap for display, this allows it to have greater control over color +cell allocation but can occasionally also cause "colormap flashing" as the +mouse is moved in and out of the application. The problem here is that +in a system with only an 8-bit colormap (256 colors) all applications must +compete for colors, programs such as XV or Netscape allocate colors from the +default colormap leaving only a few free cells for XImtool. Since XImtool +defines a private global colormap it is still able to allocate the needed +cells rather than failing, but it's allocating cells already used by other +applications. As the mouse moves out of the ximtool window those cells are +once again defined in terms of the default colormap, so the ximtool window +is then using a different colormap. It is this switching of the colormap +context that causes the flashing to occur, but there are a few things that +can be done to help minimize this. + +XImtool logically defines 200 colors which the client image display program +can use to render pixels. However, ximtool may or may not actually allocate +all of those colors. By default it currently allocates only about 192 +colors, to reserve 64 colors for the other windows on the screen. You don't +normally notice this as 1) usually the default screen colormap has enough +free cells to allow ximtool to match the colors, and 2) the extra unallocated +cells correspond to the brightest pixels in the rendered image, and these +colors may not be used or usually only correspond to a few small regions +near the saturated cores of bright objects. + +You can eliminate this problem by setting the \fIbasePixel\fP resource to e.g. +48 instead of 64, which will let the gterm widget allocate all 200 colors. +However, this isn't recommended for normal use as it will increase the +likelihood of colormap flashing. If you change \fIbasePixel\fP, either restart +the X server or set the resource \fIcmapInitialize\fP=\fITrue\fP to force the +gterm widget to update its global colormap resource in the X server. +The colormap resource may also be deleted by using the command + + \fIxprop -root -remove GT_image\fP + +These options may also be set on the command line when first starting up. + +In general one can set the Gterm widget resources \fIbasePixel\fP +and \fImaxColors\fP to specify the region of colormap space to be used for +image display. If you set \fImaxColors\fP to a small value, the 200 logical +colors defined by the widget will be mapped by the imtool color model into +whatever number of colors are actually available to the widget. For example, +in the default setup, 200 color values are really being mapped into 192 color +cells used for display, the remaining colors are used for buttons, menus etc +and are allocated from the default colormap by the X toolkit when the +application starts up. + +Even though the Gterm widget uses a private colormap, it is a private +\fIglobal\fP colormap meaning that all Gterm widgets share the same colormap. +An example of colormap sharing in ximtool is the main image window and the +colorbar window. These are two separate gterm widgets that share the same +colormap. They have to share the same colormap, as otherwise when you +windowed the main image window the colorbar window would not accurately +reflect the modified colormap. By default two separate ximtools would also +share the same colormap meaning contrast enhancements in one window would +affect the other. By resetting the \fIcmapName\fP command line option or +resource you can change the name of the private colormap used causing +separate ximtools to use different colormaps, but note this also creates +colormap flashing between the two windows that cannot easily be avoided. +By setting the \fIcmapName\fR to "default" the widget will allocate colors +from the default colormap, but this is of little use at the moment. + +There are a number of other resources that can be used to modify the behavior +of the Gterm widget color management scheme, but these are the most useful ones. +For question and further information feel free to contact \fIiraf@noao.edu\fP. + +.SH "LOAD PANEL" + +The Load Panel allows you load images from disk directly to the frame +buffer, this is analogous to loading an image on the command line except +that browsing is possible. At present recognized formats include IRAF OIF +format (i.e. \fI.imh\fP extension), simple FITS files, GIF, and Sun rasterfiles. +The task will automatically sense the format of the image and load it +appropriately. Images with private colormaps (such as GIF) will be loaded +using the private colormap (meaning that changing the brightness/contrast +enhancements will render a random-colored image), all others will be loaded +with a grayscale colormap. If the \fIGrayscale\fP button is enabled the image +colormap will be converted to grayscale and loaded as the standard grayscale +colormap. The Load panel will close automatically once the image has loaded +unless the \fIBrowse\fP button has been set. + +When loading new images the frame buffer configuration table will +be searched for a frame buffer that is the same size or larger than the new +image size, if no frame buffer can be found a custom buffer exactly the size +of the image will be created. This means that the image may not fill the +display window when loaded, or you may see a subsection of the image in the +main display window. Setting the \fIautoscale\fP option will scale the entire +image to fit the main display window, the full frame buffer will always be +visible in the Panner marker window. + +Images with more colors than can be displayed will automatically be +quantized to the number of available colors before display, 24-bit formats +are not currently supported (but may be in the future and will be similarly +quantized). + +Formats which permit larger than 8-bit pixels will be sampled on a grid +to determine an optimal range in the data to be used to compute a linear +transformation to the number of display colors. This is the same sampling +and transformation used by the IRAF \fIDISPLAY\fR task when computing the +\fIz1/z2\fP values and provides a much better initial display than simple +truncation to 8-bits. +.TP 5 +.B "Directory Browsing" +The load panel contains a list of files in the current directory that +may be selected for loading by selecting with left mouse button. If the +file is a directory the contents of the new directory will be loaded, +if it's a plain file an attempt will be made to load it as an image +otherwise an error popup will appear. Directories in the list are identified +with a trailing '/' character, you will always see any subdirectories +listed even if a filter is specified. + +The \fIRoot\fP button will reset the current directory to the system root +directory. The \fIHome\fP button will reset the current directory to the +user's login directory, the \fIUp\fP button moves up one directory level, and +\fIRescan\fP reloads the file list by rescanning the directory. The current +working directory is given below the file selection window. +.TP 5 +.B "File Patterns" +By default all files and directories will be listed. You may specify a +filter to e.g. select only those files with a given extension like +"*.fits" to list only files with a ".fits" extension. Directories will +always be seen in the list and are identified with a trailing '/' +character. Any valid unix pattern matching string will be recognized. +.TP 5 +.B "Direct File Load" +If you know exactly which file you wish to load, you may enter its +name in the \fILoad File\fP text box and either hit <cr> or the Load button +to load it. An absolute or relative path name may be given, if a simple +filename is specified it will be searched for in the current working directory. +.TP 5 +.B "Frame Selections" +By default images will be loaded into frame number 1, you may select a +different frame using the Frame menu button to cycle through the available +frames. + +.SH "SAVE PANEL" + +The Save Panel lets you save the current contents of the main display window +to a disk file (including the Panner/Coords markers, any general graphics +markers, or overlay graphics displayed by the client program). Presently, +only the contents of the main display window may be saved, there is no +facility for saving the undisplayed contents of the entire frame buffer +other than to enable the autoscale feature. A limited number of formats are +currently available, others will be added in future versions. +.TP 5 +.B "File Name" +The File Name text box allows you to enter the file name of the saved +file. A "%d" anywhere in the name will be replaced by a sequence number +allowing multiple frames to be saved with unique names. +.TP 5 +.B "Format" +The Format box allows you to choose the format of the image to be +created. Not all formats are currently implemented. +.TP 5 +.B "Color" +The Color box lets you choose the color type of the image to be +created. The options will change depending on the format, e.g. FITS +doesn't allow color so no color options will be allowed. Formats which +allow 24-bit images will be written using the current colormap after +converting to a 24-bit image, pseudocolor images will be written with +the current colormap. + +.SH "PRINT PANEL" + +The Print Panel allows you dump the contents of the main display window as +Encapsulated Postscript to either a named printer device or to a disk file. +The \fIPrint To\fP selects the type of output, the \fIPrint Command\fP box +will adjust accordingly, either as a Unix printer command or as a file name. +A "%d" anywhere in the name for disk output will be replaced by a sequence +number allowing multiple frames to be saved with unique names. Selecting +printers from the installed list will automatically change the command to be +used to generate the output. This command does not necessarily need to be a +printer command, the printer configuration file lets you define any command +string to process the image. + +.SS "COLOR OPTIONS" + +The Color box lets you choose the color type of the image to be created. +PseudoColor or 24-bit postscript will be created using the current colormap +and enhancements. + +.SS "POSTSCRIPT OPTIONS" + +.TP 5 +.B "Orientation" +Set the page orientation. +.TP 5 +.B "Paper Size" +Select the paper size to be used. +.TP 5 +.B "Image Scale" +Set the scale factor used to compute the final image size. No checking is +done to make sure the image will fit correctly on the page. + +.SS "PROCESSING OPTIONS" +.TP 5 +.B "Auto Scale" +Toggles whether or not the image is automatically scaled +to fit the page. If not enabled, the image scale will be used to +determine the output image size, otherwise the image will be scaled down +(if necessary) to fit on the page. +.TP 5 +.B "Auto Rotate" +Determines whether or not the image will be rotated to fit +on the page. When set, an image larger than the current orientation +will be rotated and possibly scaled to fit the page, otherwise the image +may be scaled so that it fits in the current orientation. +.TP 5 +.B "Max Aspect" +Automatically increases the scale so the image fills the page in the current +orientation. +.TP 5 +.B "Annotate" +The annotate option toggles whether or not the final file includes +annotation such as the image title, a colorbar, and axis labels. There is +currently no option for partial annotation. + +.SS "ANNOTATION OPTIONS" + +.TP 5 +.B "Annotate" +Selects whether Postscript image is to be annotated. +.B "Title" +Annotate with a title on the top of the image. +.B "Borders" +Annotate with borders surrounding the image giving image coordinates. +.B "Colorbar" +Annotate with colorbar at the bottom of the image +.B "Title String" +Title string to use when \fItitle\fR is selected. The special value +\fIimtitle\fR will force the title to be the currently displayed image title, +otherwise it will be this user-selected field. + +.SS "PRINTER SELECTION" + +The printer selection list lets choose the printer to be used. The printer +configuration file is /usr/local/lib/ximprint.cfg by default or may be reset +using the \fI-printConfig\fP command line switch or \fIprintConfig\fP +resource. The format of the file is simply + + \fIname\\tcommand\fP + +The \fIname\fP value is what appears in the selection list and may be more +than a single word, the \fIcommand\fP can be any command that accepts EPS +input from a pipe, the two fields must be separated by a tab character. +Normally the command +will be a simple \fIlpr -Pfoo\fP or some such, but can also include converters +or previewers. At most 128 printer commands may be used. + +.SH "INFO PANEL" + +The information panel is underused at present but is meant to provide basic +information about the frame being displayed. It is updated to be current +while changing enhancements, pan/zoom regions, or frame selection. In cases +where the image title string is truncated in the main display window, the +user can always pop up the info window to see the full title. + +.SH "TCLSHELL" + +The \fITclShell\fP allows the user to type commands directly to the TCL +interpreter, letting you send messages to the object manager or execute +specific procedures in the TCL code that makes up the GUI. It is used as a +development or debugging tool for the GUI, but for an example of what it +does, bring it up and type a command such as + + \fIsend helpButton set background red\fP + + +.SH ENVIRONMENT +DISPLAY specifies which display terminal to use +.br +IMTOOLRC frame buffer configuration file +.br +imtoolrc frame buffer configuration file (alternative) + +.SH FILES +/usr/local/lib/imtoolrc default frame buffer configuration file +.br +/usr/local/lib/ximprint.cfg default printer configuration file +.br +/usr/local/lib/imtoolcmap default colormap directory +.br +/dev/imt1i default input fifo +.br +/dev/imt1o default output fifo +.br +/tmp/.IMT%d default unix socket + +.SH BUGS + +.SH SEE ALSO +xgterm(1), xtapemon(1) + +.SH COPYRIGHT +Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. diff --git a/vendor/x11iraf/ximtool/OLD/ximtool-mag b/vendor/x11iraf/ximtool/OLD/ximtool-mag new file mode 100755 index 00000000..8e051fc8 --- /dev/null +++ b/vendor/x11iraf/ximtool/OLD/ximtool-mag @@ -0,0 +1,5494 @@ +#!/bin/csh -f +# +# XIMTOOL-ALT -- Script wrapper to start XImtool using the alternate GUI. +# The GUI file is contained is this script which is created when the system +# is built, it may be used to run any alternate GUI by simply replacing the +# Tcl script making up the GUI at the end of this script or by using the +# "-gui" command line flag. The only configurable item is the path to the +# XImtool binary to be used, by default the one found in the user's path will +# be used. +# Arguments specific to this GUI include: +# +# -displayMagnifier <bool> show magnifier marker on startup +# -showToolBar <bool> show toolbar on startup +# -showPanelBar <bool> show panelbar on startup +# +#---------------------------------------------------------------------------- + +# Configurable parameters +set XIMTOOL = ximtool # Path to default ximtool binary + + +#------------------------------------------------------------------ +#--------------- Do not modify below this line -------------------- +#------------------------------------------------------------------ +unset noclobber +onintr cleanup + +set SKIP = 106 # offset to GUI file + +# Dump the GUI from this script file. +tail +$SKIP $0 > /tmp/_gui.$$ + +# Check for no arguments. +set q = '"' +set cmd = "-gui /tmp/_gui.$$ -title $q XImtool Experimental GUI $q" + +# Process the script arguments, quoting args when necessary. +if ($#argv > 0) then + while ("$1" != "") + if ("$1" == "-xrm") then + if ("$2" != "") then + shift + else + echo "missing argument to '-xrm <resource>' switch" + exit 1 + endif + set cmd = "$cmd -xrm $q$1$q" + else if ("$1" == "-help") then + $XIMTOOL -help + exit 0 + else if ("$1" == "-defgui") then + tail +$SKIP $0 + exit 0 + else if ("$1" == "-displayMagnifier") then + if ("$2" != "") then + shift + else + echo "missing argument to '-displayMagnifier <bool>' switch" + exit 1 + endif + set cmd = "$cmd -xrm $q XImtool.displayMagnifier:$1$q" + else if ("$1" == "-showToolBar") then + if ("$2" != "") then + shift + else + echo "missing argument to '-showToolBar <bool>' switch" + exit 1 + endif + set cmd = "$cmd -xrm $q XImtool.showToolBar:$1$q" + else if ("$1" == "-showPanelBar") then + if ("$2" != "") then + shift + else + echo "missing argument to '-showPanelBar <bool>' switch" + exit 1 + endif + set cmd = "$cmd -xrm $q XImtool.showPanelBar:$1$q" + else + set cmd = "$cmd $1" + endif + + if ("$2" == "") then + break + else + shift + endif + end +endif + +# Run the command. +echo "$XIMTOOL $cmd ; /bin/rm -f /tmp/_gui*.$$" > /tmp/_gui.cmds.$$ +sh /tmp/_gui.cmds.$$ + +cleanup: + /bin/rm -f /tmp/_gui*.$$ + exit 0 + +#-------------------------------------------------------------------------- +#-------------------------- XIMTOOL-ALT.GUI ------------------------------- +#------ ------ +#------ To change the GUI run by this script just delete everything ------ +#------ below here and replace with the new GUI Tcl script. ------ +#------ ------ +#-------------------------------------------------------------------------- +#-------------------------------------------------------------------------- + +#!/usr/local/bin/obmsh +# +# XIMTOOL-MAG.GUI -- Default GUI for the Ximtool-mag image display server. +# +# Version 1.2 -- Released 4/30/2000 + + +reset-server +appInitialize ximtool XImtool { + *objects:\ + toplevel Layout display \ + display Layout menubar \ + menubar MenuButton fileButton \ + menubar MenuButton viewButton \ + menubar MenuButton optionsButton \ + menubar TextBox imageTitle \ + menubar Toggle panelButton \ + menubar Toggle xflipButton \ + menubar Toggle yflipButton \ + menubar Command prevButton \ + menubar MenuButton frameButton \ + menubar Command nextButton \ + menubar Toggle helpButton \ + display Gterm imagewin \ + display Gterm colorbar \ +\ + toplevel TopLevelShell info \ + info Paned infoPanel \ + infoPanel Box infoBox \ + infoBox Command infoDone \ + infoBox Command infoDown \ + infoBox Command infoUp \ + infoBox Command infoSave \ + infoBox Command infoUpdate \ + infoBox Command infoClear \ + infoPanel AsciiText infoText \ +\ + toplevel TopLevelShell controlShell \ + controlShell Layout controlPanel \ + controlPanel Group viewBox \ + controlPanel Group enhancementBox \ + controlPanel Group blinkBox \ + controlPanel Group optionsBox \ + controlPanel Frame controlBox \ +\ + viewBox Layout view \ + view Group frameSelect \ + frameSelect Layout frameBox \ + frameBox TextToggle frame1 \ + frameBox TextToggle frame2 \ + frameBox TextToggle frame3 \ + frameBox TextToggle frame4 \ + frameBox Command prevFrame \ + frameBox Command nextFrame \ + view Frame frameDataBox \ + frameDataBox TextBox frameData \ + view Group zoomBox \ + zoomBox Layout zoom \ + zoom TextButton toggleZoom \ + zoom TextButton zoomIn \ + zoom Command x1 \ + zoom Command z2 \ + zoom Command z3 \ + zoom Command z4 \ + zoom Command z5 \ + zoom Command z8 \ + zoom TextButton zoomOut \ + zoom TextButton centerFrame \ + zoom Command d2 \ + zoom Command d3 \ + zoom Command d4 \ + zoom Command d5 \ + zoom Command d8 \ + view Layout viewButtons \ + viewButtons Command aspect \ + viewButtons Command flipX \ + viewButtons Command flipY \ + viewButtons Command flipXY \ + viewButtons Command clearFrame \ + viewButtons Command fitFrame \ +\ + enhancementBox Layout enhance \ + enhance Scrollbar2 colorlistScroll \ + enhance Frame colorlistFrame \ + colorlistFrame Porthole colorlistPort \ + colorlistPort MultiList colorlist \ + enhance Frame colordataFrame \ + colordataFrame TextBox colordata \ + enhance Label contrastLabel \ + enhance Slider2d contrastSlider \ + enhance Label brightnessLabel \ + enhance Slider2d brightnessSlider \ + enhance Command invertButton \ + enhance Command optimizeButton \ +\ + blinkBox Layout blink \ + blink Label blinkFramesLabel \ + blink Command blinkFrame1 \ + blink Command blinkFrame2 \ + blink Command blinkFrame3 \ + blink Command blinkFrame4 \ + blink Command blinkReset \ + blink Label blinkRateLabel \ + blink Frame BRframe \ + BRframe Layout BRlayout \ + BRlayout Arrow BRdecrease \ + BRlayout TextBox BRtext \ + BRlayout Arrow BRincrease \ + blink Command registerButton \ + blink Command matchButton \ + blink Toggle blinkButton \ +\ + optionsBox TextToggle pannerButton \ + optionsBox TextToggle magnifierButton \ + optionsBox TextToggle coordsBoxButton \ + optionsBox TextToggle autoscaleButton \ + optionsBox TextToggle antialiasButton \ + optionsBox TextToggle tileFramesButton \ + optionsBox TextToggle warningsButton \ +\ + controlBox Layout control \ + control Command initializeButton \ + control Command normalizeButton \ + control Command doneButton \ +\ + toplevel TopLevelShell tclShell\ + tclShell Paned tclPanel\ + tclPanel Box tclForm\ + tclForm Label tclLabel\ + tclForm Command tclClear\ + tclForm Command tclExecute\ + tclForm Command tclcloseButton\ + tclPanel AsciiText tclEntry\ +\ + toplevel TransientShell warning \ + warning Layout warn \ + warn Frame warnFrame \ + warnFrame Layout WFlayout \ + WFlayout Icon warnIcon \ + WFlayout TextBox warnText \ + warn TextButton warnOk \ + warn TextButton warnCancel \ + warn TextButton warnHelp \ +\ + toplevel TopLevelShell print_panel\ + print_panel Layout printLayout\ +\ + printLayout Group printCmdGroup\ + printLayout Group optGroup\ + printLayout Group cmdGroup\ +\ + printCmdGroup Layout printCmdLayout\ + printCmdLayout Layout labelLayout\ + labelLayout Label toLabel\ + labelLayout Label printerLabel\ + printCmdLayout Layout inputLayout\ + inputLayout TextToggle toPrinter\ + inputLayout TextToggle toFile\ + inputLayout Frame printcmdFrame\ + printcmdFrame AsciiText printcmd\ +\ + optGroup Layout optLayout\ + optLayout Group epsPageGroup\ + optLayout Group optionsGroup\ + optLayout Group printColorGroup\ + optLayout Group printerGroup\ +\ + epsPageGroup Layout epsPage\ + epsPage Label epsOrientLabel\ + epsPage TextToggle epsPortButton\ + epsPage TextToggle epsLandButton\ + epsPage Label epsSizeLabel\ + epsPage TextToggle epsLetterButton\ + epsPage TextToggle epsLegalButton\ + epsPage TextToggle epsA4Button\ + epsPage Label epsScaleLabel\ + epsPage Frame ScaleFrame \ + ScaleFrame Layout ScaleLayout \ + ScaleLayout Arrow SCdecrease \ + ScaleLayout TextBox SCtext \ + ScaleLayout Arrow SCincrease \ +\ + optionsGroup Layout options\ + options TextToggle epsscaleButton\ + options TextToggle autorotateButton\ + options TextToggle aspectButton\ + options TextToggle annotateButton\ + options TextToggle compressButton\ +\ + printColorGroup Layout printColor\ + printColor TextToggle prGrayButton\ + printColor TextToggle prPseudoButton\ + printColor TextToggle prRGBButton\ +\ + printerGroup Layout printers \ + printers Scrollbar2 printlistScroll \ + printers Frame printlistFrame \ + printlistFrame Porthole printlistPort \ + printlistPort MultiList printlist \ +\ + cmdGroup Layout cmdLayout\ + cmdLayout TextButton okayPrint\ + cmdLayout Label printStatus\ + cmdLayout TextButton donePrint\ +\ + toplevel TopLevelShell save_panel\ + save_panel Layout saveLayout\ +\ + saveLayout Group saveNameGroup\ + saveLayout Group saveOptGroup\ + saveLayout Group saveCmdGroup\ +\ + saveNameGroup Layout saveNameLayout\ + saveNameLayout Label saveLabel\ + saveNameLayout Frame fnameFrame\ + fnameFrame AsciiText saveFile\ +\ + saveOptGroup Layout saveOptLayout\ + saveOptLayout Group fmtGroup\ + saveOptLayout Group saveColorGroup\ + saveOptLayout Frame saveDataBox \ + saveDataBox TextBox saveData \ +\ + fmtGroup Layout formats\ + formats TextToggle rasButton\ + formats TextToggle gifButton\ + formats TextToggle jpegButton\ + formats TextToggle tiffButton\ + formats TextToggle fitsButton\ + formats TextToggle x11Button\ + formats TextToggle pnmButton\ + formats TextToggle rawButton\ +\ + saveColorGroup Layout saveColor\ + saveColor TextToggle svGrayButton\ + saveColor TextToggle svPseudoButton\ + saveColor TextToggle svRGBButton\ +\ + saveCmdGroup Layout saveCmdLayout\ + saveCmdLayout TextButton okaySave\ + saveCmdLayout Label saveStatus\ + saveCmdLayout TextButton doneSave\ +\ + toplevel TopLevelShell load_panel \ + load_panel Layout filesLayout \ + filesLayout Group imagesGroup \ + imagesGroup Layout imagesLayout \ + imagesLayout Label imtemplateLabel \ + imagesLayout Frame imtemplateFrame \ + imtemplateFrame AsciiText imtemplateText \ + imagesLayout Scrollbar2 imlistScrollbar \ + imagesLayout Frame imlistFrame \ + imlistFrame Porthole imlistPorthole \ + imlistPorthole MultiList imageList \ + imagesLayout TextButton rootButton \ + imagesLayout TextButton homeButton \ + imagesLayout TextButton upButton \ + imagesLayout TextButton rescanButton \ + imagesLayout TextToggle grayToggle \ + imagesLayout TextToggle browseToggle \ + imagesLayout Label dirLabel \ + imagesLayout Label fnameLabel \ + imagesLayout Frame filnamFrame \ + imagesLayout Label frameLabel \ + imagesLayout Command frameFrame \ + filnamFrame AsciiText fnameText \ +\ + filesLayout Group fbuttonsGroup \ + fbuttonsGroup Layout fbuttonsLayout \ + fbuttonsLayout Command filesLoadButton \ + fbuttonsLayout Label filesStatus \ + fbuttonsLayout Command filesCloseButton \ +\ + toplevel TopLevelShell help_panel \ + help_panel Layout helpLayout \ + helpLayout Layout helpMenuLayout \ + helpLayout Layout helpInfoLayout \ +\ + helpMenuLayout Command helpBack \ + helpMenuLayout Command helpForward \ + helpMenuLayout Command helpHome \ + helpMenuLayout Command helpClose \ +\ + helpLayout Frame helpTextFrame\ + helpTextFrame HTML helpText \ +\ + helpInfoLayout Label helpIRAFLogo \ + helpInfoLayout Label helpInfo1 \ + helpInfoLayout Label helpInfo2 \ + helpInfoLayout Label helpInfo3 \ + helpInfoLayout Label helpNOAOLogo \ +\ + toplevel Parameter ximtool\ + ximtool Parameter alert\ + ximtool Parameter initialize\ + ximtool Parameter resize\ + ximtool Parameter frame\ + ximtool Parameter nframes\ + ximtool Parameter frameSize\ + ximtool Parameter frameRegion\ + ximtool Parameter frameView\ + ximtool Parameter frameTitle\ + ximtool Parameter frameFit\ + ximtool Parameter enhancement\ + ximtool Parameter colortables\ + ximtool Parameter autoscale\ + ximtool Parameter antialias\ + ximtool Parameter tileFrames\ + ximtool Parameter cursorMode\ + ximtool Parameter xflip\ + ximtool Parameter yflip\ + ximtool Parameter printerList\ + ximtool Parameter printOptions\ + ximtool Parameter loadOptions\ + ximtool Parameter saveOptions\ + ximtool Parameter filelist\ + ximtool Parameter help + + + ! Main image window resources. + ! ------------------------------- + *allowShellResize: True + *beNiceToColormap: False + *menuLabel.foreground: Gold + *markerMenu.foreground: Black + *markerMenu.background: SteelBlue + *markerMenu*SimpleMenu.foreground: Black + *markerMenu*SimpleMenu.background: SteelBlue + *markerColor.SmeBSB.leftMargin: 64 + *markerColor.SmeBSB.rightMargin: 0 + *markerColor.menuLabel.leftMargin: 5 + *markerColor.menuLabel.rightMargin: 5 + + *display.background: gray + *display.borderWidth: 0 + + *display.debug: False + *display.layout: horizontal { \ + -1 \ + vertical { \ + 3 \ + menubar < +inf -inf * > \ + 3 \ + imagewin < +inf -inf * +inf - inf > \ + 3 \ + colorbar < +inf -inf * > \ + } \ + -1 \ + } + + *menubar.layout: horizontal { \ + 1 < -1 > \ + fileButton 1 < -1 > viewButton 1 < -1 > optionsButton \ + 1 < -1 > \ + imageTitle < +inff -inff * > \ + 1 < -1 > \ + panelButton 1 < -1 > \ + 1 < -1 > \ + xflipButton 1 < -1 > yflipButton \ + 1 < -1 > \ + prevButton 1 < -1 > frameButton 1 < -1 > nextButton \ + 1 < -1 > \ + helpButton \ + 1 < -1 > \ + } + + *menubar*SimpleMenu.foreground: Black + *menubar*SimpleMenu.background: gray65 + *menubar*SimpleMenu.borderColor: Black + *menubar*SimpleMenu.borderWidth: 1 + *SmeBSB.vertSpace: 10 + + *SimpleMenu*font: -adobe-times-bold-r-normal-*-12-*-*-*-*-*-iso8859-1 + *fileButton.font: -adobe-times-bold-i-normal-*-12-*-*-*-*-*-iso8859-1 + *optionsButton.font: -adobe-times-bold-i-normal-*-12-*-*-*-*-*-iso8859-1 + *viewButton.font: -adobe-times-bold-i-normal-*-12-*-*-*-*-*-iso8859-1 + + *menubar.width: 512 + *menubar*background: gray + *menubar*foreground: black + *menubar*borderWidth: 0 + *menubar*Command.label: x + *menubar*Command.internalWidth: 0 + *menubar*Command.borderWidth: 0 + *menubar*Toggle.label: x + *menubar*Toggle.internalWidth: 0 + *menubar*Toggle.borderWidth: 0 + + *fileButton.label: File + *fileButton.menuName: fileMenu + *viewButton.label: View + *viewButton.menuName: viewMenu + *optionsButton.label: Options + *optionsButton.menuName: optionsMenu + *imageTitle*font: *times-bold-r*12* + *imageTitle.width: 40 + *imageTitle.height: 20 + *frameButton.menuName: frameMenu + *frameButton.label: 1 + *frameButton.width: 20 + + *Gterm.cmapName: image + *Gterm.basePixel: 64 + *imagewin.warpCursor: true + *imagewin.raiseWindow: true + *imagewin.deiconifyWindow: true + *imagewin.ginmodeCursor: circle + *imagewin.ginmodeBlinkInterval: 500 + *imagewin.resizable: true + *imagewin.copyOnResize: false + *imagewin.width: 512 + *imagewin.height: 512 + *imagewin.color8: #7c8498 + *imagewin.color9: steelblue + + *imagewin.translations: \ + None<Key>Left: call(move_cursor,-1,0) \n\ + None<Key>Down: call(move_cursor,0,1) \n\ + None<Key>Up: call(move_cursor,0,-1) \n\ + None<Key>Right: call(move_cursor,1,0) \n\ + !Shift <Key>Left: call(move_cursor,-10,0) \n\ + !Shift <Key>Down: call(move_cursor,0,10) \n\ + !Shift <Key>Up: call(move_cursor,0,-10) \n\ + !Shift <Key>Right: call(move_cursor,10,0) \n\ + !Ctrl <Key>h: call(move_cursor,-1,0) \n\ + !Ctrl <Key>j: call(move_cursor,0,1) \n\ + !Ctrl <Key>k: call(move_cursor,0,-1) \n\ + !Ctrl <Key>l: call(move_cursor,1,0) \n\ + !Ctrl Shift <Key>h: call(move_cursor,-10,0) \n\ + !Ctrl Shift <Key>j: call(move_cursor,0,10) \n\ + !Ctrl Shift <Key>k: call(move_cursor,0,-10) \n\ + !Ctrl Shift <Key>l: call(move_cursor,10,0) \n\ + !Alt <Key>1: call(cpSetFrame,frame1) \n\ + !Alt <Key>2: call(cpSetFrame,frame2) \n\ + !Alt <Key>3: call(cpSetFrame,frame3) \n\ + !Alt <Key>4: call(cpSetFrame,frame4) \n\ + !Ctrl <Key>1: call(cpZoom,1,1,fixed) \n\ + !Ctrl <Key>2: call(cpZoom,2,2,fixed) \n\ + !Ctrl <Key>3: call(cpZoom,3,3,fixed) \n\ + !Ctrl <Key>4: call(cpZoom,4,4,fixed) \n\ + !Ctrl <Key>5: call(cpZoom,5,5,fixed) \n\ + !Ctrl <Key>6: call(cpZoom,6,6,fixed) \n\ + !Ctrl <Key>7: call(cpZoom,7,7,fixed) \n\ + !Ctrl <Key>8: call(cpZoom,8,8,fixed) \n\ + !Ctrl <Key>9: call(cpZoom,9,9,fixed) \n\ + !Ctrl <Key>b: call(prevFrame,$name) \n\ + !Ctrl <Key>c: call(cpZoomAction,centerFrame) \n\ + !Ctrl <Key>f: call(nextFrame,$name) \n\ + !Ctrl <Key>i: call(cpInvert) \n\ + !Ctrl <Key>n: call(normalize) \n\ + !Ctrl <Key>m: call(toggleMagnifier) \n\ + !Ctrl <Key>p: call(togglePanner) \n\ + !Ctrl Alt <Key>q: call(Quit) \n\ + !Ctrl <Key>r: call(cpRegisterFrames) \n\ + !Ctrl <Key>s: call(cpMatchFrames) \n\ + !Ctrl <Key>t: call(tileFramesToggle) \n\ + !Ctrl <Key>u: call(cpZoom,1,1,fixed) \n\ + !Ctrl <Key>x: call(cpFrameAction,flipX) \n\ + !Ctrl <Key>y: call(cpFrameAction,flipY) \n\ + !Ctrl Alt <Key>=: call(Print) \n\ + Ctrl <Key>+: call(cpZoom,2.0,2.0,relative) \n\ + Ctrl <Key>-: call(cpZoom,0.5,0.5,relative) \n\ + Ctrl <Key>\<: call(cpSetBlinkRate,BRdecrease) \n\ + Ctrl <Key>\>: call(cpSetBlinkRate,BRincrease) \n\ + !Alt <Key>b: call(toggleBlink) \n\ + !Alt <Key>c: call(panel) \n\ + !Ctrl Alt <Key>f: call(fitFrame) \n\ + !Alt <Key>h: call(Help) \n\ + !Alt <Key>i: call(infoPanel) \n\ + !Alt <Key>l: call(loadPanel) \n\ + !Alt <Key>p: call(printPanel) \n\ + !Alt <Key>s: call(savePanel) \n\ + !Alt <Key>t: call(tclPanel) \n\ + !Shift<Btn1Down>: call(setDynamicMagnifier,1) \n\ + !Shift<Btn1Up>: call(setDynamicMagnifier,0) \n\ + !<Btn1Down>: call(makeMarker,$name,$x,$y) m_create() \n\ + !Shift <Btn2Down>: crosshair(on) \n\ + !Shift <Btn2Motion>: crosshair(on) \n\ + !Shift<Btn2Up>: crosshair(off) \n\ + !<Btn2Up>: crosshair(off) \n\ + !<Btn2Down>: call(zoom,$x,$y) \n\ + !<Btn3Down>: call(windowColormap,$x,$y) \n\ + !<Btn3Motion>: call(windowColormap,$x,$y) \n\ + <EnterWindow>: enter-window() \n\ + <LeaveWindow>: leave-window() \n\ + <KeyPress>: graphics-input() \n\ + <Motion>: track-cursor() call(wcsUpdate,$x,$y) call(magnifierMapImage,$x,$y) + +! The following translations can be used to enable windowing of the +! individual RGB components of the colormap. It's not very useful but +! included here for those that may wish to use it. +!-------------------------------------------------------------------------- +! !Ctrl <Btn1Down>: call(windowRGB,1,$x,$y,0) \n\ +! !Ctrl <Btn1Motion>: call(windowRGB,1,$x,$y,0) \n\ +! !Ctrl <Btn1Up>: call(windowRGB,1,$x,$y,1) \n\ +! !Ctrl <Btn2Down>: call(windowRGB,2,$x,$y,0) \n\ +! !Ctrl <Btn2Motion>: call(windowRGB,2,$x,$y,0) \n\ +! !Ctrl <Btn2Up>: call(windowRGB,2,$x,$y,1) \n\ +! !Ctrl <Btn3Down>: call(windowRGB,3,$x,$y,0) \n\ +! !Ctrl <Btn3Motion>: call(windowRGB,3,$x,$y,0) \n\ +! !Ctrl <Btn3Up>: call(windowRGB,3,$x,$y,1) \n\ + + *colorbar.maxRasters: 1 + *colorbar.maxMappings: 1 + *colorbar.width: 512 + *colorbar.height: 10 + + ! INFO box resources. + ! ------------------------------ + *info.geometry: 420x240 + *info.title: Information Panel + *info*Command.font: 7x13bold + *infoPanel*background: gray + *infoDone.label: Done + *infoDown.label: Down + *infoDown.sensitive: False + *infoUp.label: Up + *infoUp.sensitive: False + *infoSave.label: Save + *infoSave.sensitive: False + *infoUpdate.label: Update + *infoClear.label: Clear + *infoText*scrollVertical: always + *infoText*scrollHorizontal: whenNeeded + *infoText*displayCaret: False + *infoText*editType: append + *info*ScrollbarBackground: #c0c0c0 + *info*Scrollbar*background: #c0c0c0 + *info*Scrollbar*width: 17 + *info*Scrollbar*height: 17 + *info*Scrollbar*shadowWidth: 2 + *info*Scrollbar*cursorName: top_left_arrow + *info*Scrollbar*pushThumb: true + + + ! Main Control Panel. + ! ------------------------------ + *controlShell.title: XImtool Control + *controlShell.iconName: XimCon + *controlPanel*background: gray + *controlPanel*foreground: black + *controlPanel*TextBox.background: gray63 + *controlPanel*internalWidth: 0 + *controlPanel*borderWidth: 0 + *controlPanel*Command.highlightThickness: 0 + + *TextBox.font: 7x13bold + *TextToggle.font: -adobe-times-medium-r-normal-*-12-*-*-*-*-*-iso8859-1 + *Command.font: -adobe-times-medium-r-normal-*-12-*-*-*-*-*-iso8859-1 + *Toggle.font: -adobe-times-medium-r-normal-*-12-*-*-*-*-*-iso8859-1 + *Label.font: -*-helvetica-medium-r-normal-*-12-*-iso8859-1 + *MultiList.font: -adobe-times-medium-r-normal-*-12-*-*-*-*-*-iso8859-1 + *toggleZoom.font: -*-helvetica-medium-r-normal-*-12-*-iso8859-1 + *centerFrame.font: -*-helvetica-medium-r-normal-*-12-*-iso8859-1 + *zoom*Command.font: 7x13bold + *blinkFrame1.font: 7x13bold + *blinkFrame2.font: 7x13bold + *blinkFrame3.font: 7x13bold + *blinkFrame4.font: 7x13bold + + *controlPanel.debug: False + *controlPanel.layout: vertical { \ + 5 < -5 > \ + horizontal { \ + -1 \ + viewBox < +inf -inf * > \ + -1 \ + } \ + 5 < -5 > \ + horizontal { \ + -1 \ + enhancementBox < +inf -inf * +inf -inf > \ + -1 \ + vertical { \ + -1 \ + blinkBox < * +inf - inf > \ + 1 \ + optionsBox < * +inff -inff > \ + -1 \ + } \ + -1 \ + } \ + controlBox < +inf * > \ + } + + ! VIEW + ! ------------------ + *viewBox.label: View + *viewBox.location: 0 0 410 0 + *viewBox.shrinkToFit: True + *viewBox.outerOffset: 5 + + *view.debug: False + *view.layout: vertical { \ + 5 < +inf -5 > \ + horizontal { \ + -1 \ + frameSelect \ + -1 \ + vertical { \ + 5 < -5 > \ + frameDataBox < +inff -100% * +inff -100% > \ + 5 < -5 > \ + } \ + -1 \ + zoomBox \ + -1 \ + } \ + 1 < +inf > \ + viewButtons < +inf -inf * +inf -inf > \ + 5 < +inf -5 > \ + } + + *frameDataBox.frameType: sunken + *frameDataBox.frameWidth: 2 + *frameData.width: 130 + *frameData.height: 50 + + *frameSelect.location: 0 0 72 0 + *frameSelect.shrinkToFit: True + *frameSelect.outerOffset: 5 + *frameSelect.innerOffset: 5 + *frameSelect.frameWidth: 2 + *frameSelect*offIcon: diamond0s + *frameSelect*onIcon: diamond1s + *frameSelect*highlightColor: blue + *frameSelect.label: Frame: + + *frameBox.debug: False + *frameBox.layout: vertical { \ + frame1 < +inf * > \ + frame2 < +inf * > \ + frame3 < +inf * > \ + frame4 < +inf * > \ + 10 < +inf -10 > \ + horizontal { \ + -1 \ + prevFrame \ + 10 < +inf -5 > \ + nextFrame \ + -1 \ + } \ + -1 \ + } + + *frameBox*location: 0 0 10 20 + *frameBox*alignment: left + *frameBox*frameWidth: 0 + *frameBox*highlightThickness: 0 + *frameBox*frame1.label: \ 1\ \ + *frameBox*frame2.label: \ 2\ \ + *frameBox*frame3.label: \ 3\ \ + *frameBox*frame4.label: \ 4\ \ + *frameBox*Command.width: 24 + *frameBox*prevFrame.label: xx + *frameBox*nextFrame.label: xx + + *zoomBox.label: Zoom: + *zoomBox.location: 0 0 160 127 + *zoomBox.outerOffset: 5 + *zoomBox.shrinkToFit: True + + *zoom.debug: False + *controlPanel*zoom*internalWidth: 4 + *zoom.layout: vertical { \ + space = ((50% of width zoom) - (50% of width z5)) \ + 1 < +inf > \ + horizontal { \ + vertical { \ + toggleZoom < +inf * +inf > \ + 2 \ + } \ + 2 \ + vertical { \ + 2 < +inf > \ + z5 \ + 1 < +inf > \ + z3 \ + 0 < +inf > \ + } \ + 2 \ + vertical { \ + zoomIn < +inf * +inf > \ + 2 \ + } \ + } \ + 1 < +inf > \ + horizontal { \ + 2 < +inf > \ + d8 d4 d2 x1 z2 z4 z8 \ + 2 < +inf > \ + } \ + 1 < +inf > \ + horizontal { \ + vertical { \ + 2 \ + zoomOut < +inf * +inf > \ + } \ + 2 \ + vertical { \ + 0 < +inf > \ + d3 \ + 1 < +inf > \ + d5 \ + 2 < +inf > \ + } \ + 2 \ + vertical { \ + 2 \ + centerFrame < +inf * +inf > \ + } \ + } \ + 1 < +inf > \ + } + + *toggleZoom.label: Toggle\nZoom + *toggleZoom.outerOffset: 0 + *toggleZoom.width: 30 + *toggleZoom.height: 25 + + *zoomIn.label: Zoom\nIn + *zoomIn.outerOffset: 0 + *zoomIn.width: 30 + *zoomIn.height: 25 + + *x1.label: 1 + *z2.label: 2 + *z3.label: 3 + *z4.label: 4 + *z5.label: 5 + *z8.label: 8 + + *controlPanel*zoomIn.foreground: royalBlue3 + *controlPanel*z4.foreground: royalBlue3 + *controlPanel*z5.foreground: royalBlue3 + *controlPanel*z8.foreground: royalBlue3 + *controlPanel*z2.foreground: royalBlue3 + *controlPanel*z3.foreground: royalBlue3 + + *zoomOut.label: Zoom\nOut + *zoomOut.outerOffset: 0 + *zoomOut.width: 30 + *zoomOut.height: 25 + + *centerFrame.label: Center + *centerFrame.outerOffset: 0 + *centerFrame.width: 30 + *centerFrame.height: 25 + + *d2.label: 2 + *d3.label: 3 + *d4.label: 4 + *d5.label: 5 + *d8.label: 8 + + *controlPanel*zoomOut.foreground: mediumVioletRed + *controlPanel*d2.foreground: mediumVioletRed + *controlPanel*d3.foreground: mediumVioletRed + *controlPanel*d4.foreground: mediumVioletRed + *controlPanel*d5.foreground: mediumVioletRed + *controlPanel*d8.foreground: mediumVioletRed + + *viewButtons.location: 0 0 100 80 + *viewButtons.debug: False + *viewButtons.layout: horizontal { \ + 5 < -2 > \ + aspect < +inf * > \ + 5 < -2 > \ + flipX < +inf * > \ + 5 < -2 > \ + flipY < +inf * > \ + 5 < -2 > \ + flipXY < +inf * > \ + 5 < -2 > \ + clearFrame < +inf * > \ + 5 < -2 > \ + fitFrame < +inf * > \ + 5 < -2 > \ + } + + *nextFrame.label: Next Frame + *prevFrame.label: Previous Frame + *fitFrame.label: Fit Frame + *aspect.label: Aspect + *clearFrame.label: Clear Frame + *flipX.label: Flip X + *flipY.label: Flip Y + *flipXY.label: Flip XY + + + ! ENHANCEMENT + ! ------------------ + *enhancementBox.label: Enhancement + *enhancementBox.location: 0 0 110 0 + *enhancementBox.shrinkToFit: True + *enhancementBox.outerOffset: 5 + + *enhance.debug: False + *enhance.layout: vertical { \ + 3 < -3 > \ + horizontal { \ + 2 < -2 > \ + colorlistScroll < * +inff -inff > \ + -1 \ + colorlistFrame < +inf -inf * +inff -inff > \ + 2 < -2 > \ + } \ + -1 \ + horizontal { \ + 2 < -2 > \ + colordataFrame < +inf -inf * +inf -inf > \ + 2 < -2 > \ + } \ + 5 < -5 > \ + horizontal { \ + 2 < -2 > \ + vertical { \ + -1 \ + contrastLabel \ + 3 < -3 > \ + brightnessLabel \ + -1 \ + } \ + 3 < -3 > \ + vertical { \ + -1 \ + contrastSlider < +inf -inf * > \ + 3 < -3 > \ + brightnessSlider < +inf -inf * > \ + -1 \ + } \ + 2 < -2 > \ + } \ + 5 < -5 > \ + horizontal { \ + 3 < -3 > \ + invertButton < +inf -inf * > \ + 5 < -5 > \ + optimizeButton < +inf -inf * > \ + 3 < -3 > \ + } \ + 3 < -3 > \ + } + + *enhance*FrameType: sunken + *enhance*FrameWidth: 2 + *enhance*BorderWidth: 0 + *enhance*Label.ShadowWidth: 0 + *enhance*thumbColor: gray + + *colorlistScroll.location: 0 0 20 10 + *colorlistScroll.vertical: True + *colorlistScroll*minsize: 10 + *colorlist.width: 100 + *colorlist.height: 78 + *colordata.width: 100 + *colordata.height: 45 + *enhance*colordata.frameWidth: 0 + *contrastLabel.label: x + *contrastSlider.location: 0 0 100 20 + *brightnessLabel.label: x + *brightnessSlider.location: 0 0 100 20 + *invertButton.label: Invert + *optimizeButton.label: Optimize + + ! BLINK + ! --------------------- + *blinkBox.label: Blink + *blinkBox.location: 0 0 230 0 + *blinkBox.shrinkToFit: True + *blinkBox.outerOffset: 5 + + + *blink.debug: False + *blink.layout: vertical { \ + space = (width blinkFramesLabel - width blinkRateLabel) \ + 3 < -3 > \ + horizontal { \ + 0 \ + blinkFramesLabel \ + 3 < +inf > \ + blinkFrame1 < -50% * > \ + blinkFrame2 < -50% * > \ + blinkFrame3 < -50% * > \ + blinkFrame4 < -50% * > \ + 4 < +inf > \ + blinkReset \ + 2 \ + } \ + 5 < -5 > \ + horizontal { \ + $space \ + blinkRateLabel \ + 2 \ + BRframe < +inf * > \ + } \ + 5 < +inf -100% > \ + horizontal { \ + 3 \ + registerButton < +inf * > \ + 5 < -5 > \ + matchButton < +inf * > \ + 5 < -5 > \ + blinkButton < +inf * > \ + 2 \ + } \ + 3 < -3 > \ + } + + *BRlayout.layout: horizontal { \ + BRdecrease \ + BRtext < +inf -100% * > \ + BRincrease \ + } + + *blink.Label.borderWidth: 0 + *blink.Label.shadowWidth: 0 + *controlPanel*blink*internalWidth: 4 + *controlPanel*blink*Arrow.foreground: gray + *controlPanel*blink*Arrow.background: gray63 + *blink*Arrow.width: 16 + *blink*Arrow.height: 25 + + *blinkFramesLabel.label: Blink Frames: + *blinkFrame1.label: 1 + *blinkFrame2.label: 2 + *blinkFrame3.label: 3 + *blinkFrame4.label: 4 + *blinkReset.label: Reset + + *blinkRateLabel.label: Blink Rate: + *BRframe.frameType: sunken + *BRframe.frameWidth: 2 + *BRtext.width: 40 + *BRtext.height: 25 + *BRdecrease.direction: left + *BRincrease.direction: right + *registerButton.label: Register + *matchButton.label: Match LUTs + *blinkButton.label: Blink + + ! OPTIONS + ! --------------------- + *optionsBox.label: Options + *optionsBox.location: 0 0 220 0 + *optionsBox.shrinkToFit: False + *optionsBox.outerOffset: 5 + *optionsBox*offIcon: square0s + *optionsBox*onIcon: square1s + *optionsBox*selectionStyle: multi + *optionsBox*highlightColor: yellow + *optionsBox.TextToggle.location: 0 0 102 25 + *optionsBox.TextToggle.frameWidth: 0 + *optionsBox*alignment: left + + *pannerButton.label: Panner + *magnifierButton.label: Magnifier + *coordsBoxButton.label: Coords Box + *autoscaleButton.label: Autoscale + *antialiasButton.label: Antialias + *tileFramesButton.label: Tile Frames + *warningsButton.label: Warnings + + + ! CONTROL + ! ---------------------- + *controlBox.frameType: chiseled + *controlBox.frameWidth: 2 + *controlBox.outerOffset: 5 + *controlBox.innerOffset: 5 + *controlBox.height: 30 + + *control.debug: False + *control.layout: horizontal { \ + 1 \ + initializeButton < +inf * > \ + 5 < -5 > \ + normalizeButton < +inf * > \ + 80 < +inf -100% > \ + doneButton < +inf * > \ + 1 \ + } + + *initializeButton.label: Initialize + *normalizeButton.label: Normalize + *doneButton.label: Done + + ! WARNING dialog. + ! --------------------- + *warning.geometry: +400+300 + *warning*background: gray + *warning*borderWidth: 0 + *warning*TextBox.frameWidth: 0 + *warning*TextButton.frameWidth: 2 + *warning*TextButton.width: 40 + *warning*TextButton.height: 25 + + *warn.layout: vertical { \ + 5 < -5 > \ + horizontal { \ + 5 < -5 > \ + warnFrame < +inf * +inf > \ + 5 < -5 > \ + } \ + 1 < -1 > \ + horizontal { \ + 5 < -5 > \ + warnOk < +inf * > \ + 5 < +inf -5 > \ + warnCancel < +inf * > \ + 5 < +inf -5 > \ + warnHelp < +inf * > \ + 5 < -5 > \ + } \ + 1 < -1 > \ + } + + *WFlayout.layout: horizontal { \ + 5 < -5 > \ + vertical { \ + 5 < +inf -5 > \ + warnIcon \ + 5 < +inf -5 > \ + } \ + 5 < -5 > \ + warnText < +inf -inf * +inf -inf > \ + 5 < -5 > \ + } + + *warnLabel.label: Warning + *warnLabel.width: 300 + *warnLabel.height: 20 + *warnFrame.frameType: sunken + *warnFrame.frameWidth: 2 + *warnIcon.location: 0 0 40 40 + *warnIcon.image: WARNING + *warnText.label: generic warning text + *warnText.width: 270 + *warnText.height: 60 + *warnOk.label: OK + *warnCancel.label: Cancel + *warnHelp.label: Help + *warnHelp.sensitive: False + + + !===================================== + ! Print Setup Panel resources. ! + !===================================== + *print_panel.title: Printer Setup + *print_panel.highlightThickness: 1 + *print_panel*background: gray + *print_panel*TextBox.background: gray63 + *print_panel*TextBox.foreground: black + *print_panel*TextToggle.alignment: left + *print_panel*Arrow.background: gray63 + *print_panel*Arrow.foreground: gray + *print_panel*Arrow.width: 16 + *print_panel*Arrow.height: 25 + *print_panel*TextToggle.frameWidth: 0 + *print_panel*TextToggle.height: 20 + *print_panel*Label.borderWidth: 0 + *print_panel*Label.shadowWidth: 0 + *print_panel*Label.background: gray + *print_panel*TextButton.width: 40 + *print_panel*TextButton.height: 25 + + *printLayout.borderWidth: 0 + *printLayout.layout: vertical { \ + -1 \ + printCmdGroup < +inf * > \ + -1 \ + optGroup < +inf -inf * +inf -inf > \ + -1 \ + cmdGroup < +inf * > \ + -1\ + } + + + ! Print Group resources. + !---------------------------------- + *printCmdGroup.borderWidth: 0 + *printCmdGroup.outerOffset: 5 + *printCmdGroup.label: + *printCmdGroup.location: 0 0 400 85 + *printCmdGroup*offIcon: diamond0s + *printCmdGroup*onIcon: diamond1s + *printCmdGroup*highlightColor: cyan + *printCmdGroup*Frame.frameType: sunken + *printCmdGroup*Frame.frameWidth: 2 + *printCmdGroup*Frame.width: 300 + *printCmdGroup*Label.justify: right + *printCmdGroup*Text*editType: edit + *printCmdGroup*TextToggle.width: 70 + *printCmdGroup*shadowWidth: 0 + *printCmdGroup*borderWidth: 0 + *printCmdLayout.borderWidth: 0 + *printCmdLayout*Label.font: 7x13bold + *printCmdLayout.layout: horizontal { \ + -1 \ + labelLayout \ + 5 < -5 > \ + inputLayout < +inf -inf * +inf > \ + 2 \ + } + + *labelLayout.borderWidth: 0 + *labelLayout.layout: vertical { \ + 5 \ + toLabel \ + 11 \ + printerLabel \ + -3 \ + } + *printerLabel.label: Print Command: + *toLabel.label: Print To: + *toPrinter.label: Printer + *toPrinter.on: True + *toFile.label: File + + + *inputLayout*Text*font: -*-helvetica-medium-r-normal-*-12-*-iso8859-1 + *inputLayout.borderWidth: 0 + *inputLayout.layout: horizontal { \ + 3 \ + vertical { \ + 5 \ + horizontal { \ + 5 < -5 > \ + toPrinter \ + 5 < -5 > \ + toFile \ + 5 < +inf -inf > \ + } \ + 5 \ + printcmdFrame < +inf -inf * > \ + 5 \ + } \ + 3 \ + } + *printcmd*string: lpr + *printcmd*height: 22 + *printcmd*Text*editType: edit + *printcmd*Text*font: -*-helvetica-medium-r-normal-*-12-*-iso8859-1 + + ! Main options groups layout resources. + !--------------------------------------- + *optGroup.frameWidth: 2 + *optGroup.frameType: chiseled + *optGroup.label: + *optGroup.location: 0 0 400 265 + *optGroup.outerOffset: 5 + *optGroup.innerOffset: 0 + *optLayout*borderWidth: 0 + *optLayout.layout: horizontal { \ + -1 \ + vertical { \ + 5 < -5 > \ + epsPageGroup < +inf -inf * > \ + 0 < -0 > \ + optionsGroup < +inf -inf * +inf -inf > \ + -1 \ + } \ + 0 < -0 > \ + vertical { \ + 5 < -5 > \ + printColorGroup < +inf -inf * > \ + 0 < -0 > \ + printerGroup < +inf * +inf > \ + -1 \ + } \ + -1 \ + } + + + ! Postscript Options group resources. + ! ----------------------------------- + *epsPageGroup.label: Postscript Options + *epsPageGroup.outerOffset: 5 + *epsPageGroup.innerOffset: 5 + *epsPageGroup.location: 0 0 250 150 + *epsPageGroup*offIcon: diamond0s + *epsPageGroup*onIcon: diamond1s + *epsPageGroup*highlightColor: cyan + *epsPage*Label.justify: left + *epsPage*Label.font: 7x13bold + *epsPage.layout: vertical { \ + -1 \ + epsOrientLabel \ + 4 < -4 > \ + horizontal { \ + 10 \ + epsPortButton \ + epsLandButton \ + -1 \ + } \ + 4 < -4 > \ + epsSizeLabel \ + -1 \ + horizontal { \ + 10 \ + epsLetterButton \ + epsLegalButton \ + epsA4Button \ + -1 \ + } \ + 5 < -5 > \ + horizontal { \ + -1 \ + epsScaleLabel \ + 4 < -4 > \ + ScaleFrame \ + } \ + -1 \ + } + + + ! Page Layout resources. + ! ------------------------------- + *epsOrientLabel.label: Orientation: + *epsPortButton.label: Portrait + *epsPortButton.width: 90 + *epsLandButton.label: Landscape + *epsLandButton.width: 90 + + *epsSizeLabel.label: Paper Size: + *epsLetterButton.label: Letter + *epsLetterButton.width: 75 + *epsLegalButton.label: Legal + *epsLegalButton.width: 75 + *epsA4Button.label: A4 + *epsA4Button.width: 75 + + ! Image scale box resources. + ! ------------------------------- + *epsScaleLabel.label: Image Scale: + *ScaleFrame.frameType: sunken + *ScaleFrame.frameWidth: 2 + *ScaleFrame*shadowWidth: 0 + *ScaleLayout.location: 0 0 100 50 + *ScaleLayout.label: + *ScaleLayout.layout: horizontal { \ + SCdecrease \ + SCtext < +inf -100% * > \ + SCincrease \ + } + *SCdecrease.direction: left + *SCtext.width: 75 + *SCtext.height: 25 + *SCtext.label: 100 % + *SCincrease.direction: right + + + ! Miscellaneous print options box resources. + ! ------------------------------------ + *optionsGroup.outerOffset: 5 + *optionsGroup.innerOffset: 5 + *optionsGroup*onIcon: square1s + *optionsGroup*offIcon: square0s + *optionsGroup.label: Processing Options + *optionsGroup*TextToggle.width: 100 + *optionsGroup*TextToggle.highlightColor: yellow + *options.frameWidth: 2 + *options.location: 0 0 250 75 + *options.layout: horizontal { \ + 10 \ + vertical { \ + -1 \ + epsscaleButton \ + 2 \ + autorotateButton \ + 2 \ + aspectButton \ + -1 \ + } \ + 3 \ + vertical { \ + -1 \ + annotateButton \ + 2 \ + compressButton \ + 25 \ + -1 \ + } \ + -1 \ + } + *epsscaleButton.label: Auto Scale + *autorotateButton.label: Auto Rotate + *annotateButton.label: Annotate + *aspectButton.label: Max Aspect + *compressButton.label: Compress + *compressButton.sensitive: False + +! *epsscaleButton.on: True +! *autorotateButton.on: False +! *spectButton.on: False +! *annotateButton.on: True +! *compressButton.on: False + + + ! Output color box resources. + ! ------------------------------ + *printColorGroup.location: 0 0 150 90 + *printColorGroup.outerOffset: 5 + *printColorGroup.frameWidth: 2 + *printColorGroup*offIcon: diamond0s + *printColorGroup*onIcon: diamond1s + *printColorGroup*highlightColor: cyan + *printColorGroup.innerOffset: 5 + *printColorGroup.label: Output Color + *printColorGroup*TextToggle.width: 100 + *printColor.frameWidth: 2 + *printColor.location: 0 0 250 75 + *printColor.layout: horizontal { \ + 15 \ + vertical { \ + -1 \ + prGrayButton \ + 2 \ + prPseudoButton \ + 2 \ + prRGBButton \ + -1 \ + } \ + -1 \ + } + *prGrayButton.label: Grayscale + *prPseudoButton.label: PseudoColor + *prRGBButton.label: RGB + + ! Printer Selection. + ! -------------------------- + *printerGroup.label: Printers + *printerGroup.location: 0 0 110 100 + *printerGroup.shrinkToFit: True + *printerGroup.outerOffset: 5 + + *printers.debug: False + *printers.layout: vertical { \ + 3 < -3 > \ + horizontal { \ + 2 < -2 > \ + printlistFrame < +inf -inf * +inff -inff > \ + -1 \ + printlistScroll < * +inff -inff > \ + 2 < -2 > \ + } \ + 3 < -3 > \ + } + + *printers*FrameType: sunken + *printers*FrameWidth: 2 + *printers*BorderWidth: 0 + *printers*Label.ShadowWidth: 0 + *printers*thumbColor: gray + + *printlistScroll.location: 0 0 20 10 + *printlistScroll.vertical: True + *printlistScroll*minsize: 10 + *printlist.width: 100 + *printlist.height: 78 + + + ! Panel command resources. + ! ------------------------------ + *cmdGroup.frameType: chiseled + *cmdGroup.frameWidth: 2 + *cmdGroup.outerOffset: 5 + *cmdGroup.innerOffset: 5 + *cmdGroup.label: + *cmdGroup.location: 0 0 150 54 + *cmdGroup*Command.font: 7x13bold + *cmdLayout.borderWidth: 0 + *cmdLayout.layout: horizontal { \ + -1 \ + okayPrint \ + 1 < +inf -1 > \ + printStatus < +inf -inf * +inf -inf > \ + 1 < +inf -1 > \ + donePrint \ + -1 \ + } + *cmdGroup*TextButton*location: 0 0 80 0 + *okayPrint.label: Print + *donePrint.label: Done + + + !===================================== + ! Save Setup Panel resources. ! + !===================================== + *save_panel.title: Save to Disk... + *save_panel*background: gray + *save_panel*TextBox.background: gray63 + *save_panel*TextToggle.alignment: left + *save_panel*AsciiText*background: gray63 + *save_panel*Arrow.background: gray63 + *save_panel*Arrow.foreground: gray + *save_panel*Arrow.width: 16 + *save_panel*Arrow.height: 25 + *save_panel*TextToggle.frameWidth: 0 + *save_panel*TextToggle.height: 20 + *save_panel*Label.borderWidth: 0 + *save_panel*Label.shadowWidth: 0 + *save_panel*TextButton.width: 80 + + + *save_panel*debug: False + *saveLayout.borderWidth: 0 + *saveLayout.layout: vertical { \ + -1 \ + saveNameGroup < +inf * > \ + -1 \ + saveOptGroup < +inf -inf * +inf -inf > \ + -1 \ + saveCmdGroup < +inf * > \ + -1\ + } + + ! Save Name Group resources. + !---------------------------------- + *saveNameGroup.borderWidth: 0 + *saveNameGroup.outerOffset: 5 + *saveNameGroup.label: + *saveNameGroup.location: 0 0 400 60 + *saveNameGroup*offIcon: diamond0s + *saveNameGroup*onIcon: diamond1s + *saveNameGroup*highlightColor: cyan + *saveNameGroup*Frame.frameType: sunken + *saveNameGroup*Frame.frameWidth: 2 + *saveNameGroup*Label.justify: right + *saveNameGroup*Text*editType: edit + *saveNameGroup*Text*font: -*-helvetica-medium-r-normal-*-12-*-iso8859-1 + *saveNameGroup*TextBox*font:-*-helvetica-medium-r-normal-*-12-*-iso8859-1 + *saveNameGroup*shadowWidth: 0 + *saveNameGroup*borderWidth: 0 + *saveNameLayout.borderWidth: 0 + *saveNameLayout*Label.font: 7x13bold + *saveNameLayout.layout: vertical { \ + 5 \ + horizontal { \ + 5 \ + saveLabel \ + 5 \ + fnameFrame < +inf -inf * > \ + 5 \ + } \ + 5 \ + } + *saveLabel.label: File Name: + *saveFile.height: 22 +! *save_panel*saveFile*background: gray63 + + ! Main options groups layout resources. + !--------------------------------------- + *saveOptGroup.frameWidth: 2 + *saveOptGroup.frameType: chiseled + *saveOptGroup.label: + *saveOptGroup.location: 0 0 400 145 + *saveOptGroup.outerOffset: 5 + *saveOptGroup.innerOffset: 0 + *saveOptLayout*borderWidth: 0 + *saveOptLayout.layout: horizontal { \ + -1 \ + vertical { \ + 5 < -5 > \ + fmtGroup < +inf * +inf > \ + -1 \ + } \ + -1 \ + vertical { \ + 10 < -10 > \ + saveDataBox < +inff -100% * +inff -100% > \ + 5 < -5 > \ + } \ + -1 \ + vertical { \ + 5 < -5 > \ + saveColorGroup < +inf * +inf > \ + -1 \ + } \ + -1 \ + } + + ! Output color box resources. + ! ------------------------------ + *saveColorGroup.location: 0 0 125 120 + *saveColorGroup.outerOffset: 5 + *saveColorGroup.frameWidth: 2 + *saveColorGroup*offIcon: diamond0s + *saveColorGroup*onIcon: diamond1s + *saveColorGroup*highlightColor: cyan + *saveColorGroup.innerOffset: 5 + *saveColorGroup.label: Output Color + *saveColorGroup*TextToggle.width: 100 + *saveColor.frameWidth: 2 + *saveColor.layout: horizontal { \ + 3 \ + vertical { \ + 5 \ + svGrayButton \ + 2 \ + svPseudoButton \ + 2 \ + svRGBButton \ + -1 \ + } \ + -1 \ + } + *svGrayButton.label: Grayscale + *svPseudoButton.label: PseudoColor + *svPseudoButton.on: true + *svRGBButton.label: RGB + + *saveDataBox*TextBox.background: gray63 + *saveDataBox.frameType: sunken + *saveDataBox.frameWidth: 2 + + + ! Output format box resources. + ! ----------------------------------- + *fmtGroup.location: 0 0 140 120 + *fmtGroup.outerOffset: 5 + *fmtGroup.frameWidth: 2 + *fmtGroup*offIcon: diamond0s + *fmtGroup*onIcon: diamond1s + *fmtGroup*TextToggle.width: 55 + *fmtGroup*highlightColor: cyan + *fmtGroup.label: File Format + *formats.layout: horizontal { \ + 3 \ + vertical { \ + 7 \ + fitsButton \ + 2 \ + gifButton \ + 2 \ + x11Button \ + 2 \ + rawButton \ + -1 \ + } \ + 2 < -2 > \ + vertical { \ + 7 \ + rasButton \ + 2 \ + tiffButton \ + 2 \ + jpegButton \ + 2 \ + pnmButton \ + -1 \ + } \ + -1 \ + } + *rasButton.label: RAS + *gifButton.label: GIF + *jpegButton.label: JPEG + *tiffButton.label: TIFF + *fitsButton.label: FITS + *x11Button.label: X11 + *pnmButton.label: PNM + *rawButton.label: Raw + + ! Change the sensitivity once these formats are implemented. ! + !------------------------------------------------------------- + *jpegButton.sensitive: false + *x11Button.sensitive: false + *pnmButton.sensitive: false + *rawButton.sensitive: false + + ! Panel command resources. + ! ------------------------------ + *saveCmdLayout.borderWidth: 0 + *saveCmdGroup.frameType: chiseled + *saveCmdGroup.frameWidth: 2 + *saveCmdGroup.outerOffset: 5 + *saveCmdGroup.innerOffset: 5 + *saveCmdGroup.label: + *saveCmdGroup.location: 0 0 400 54 +! *saveCmdLayout*Command.font: 7x13bold + *saveCmdLayout.layout: horizontal { \ + -1 \ + okaySave \ + 1 < +inf -1 > \ + saveStatus \ + 1 < +inf -1 > \ + doneSave \ + -1 \ + } + *okaySave.label: Save + *doneSave.label: Done + + ! File Load Control Panel. + !------------------------------- + *load_panel.geometry: 400x320 + *load_panel.title: File Load Panel + *filesLayout*borderWidth: 0 + *filesLayout*highlightThickness: 0 + *filesLayout*background: gray + *filesLayout*Group.outerOffset: 7 + *filesLayout*Group.shrinkToFit: True + *filesLayout*Group.frameType: chiseled + *filesLayout*Frame*frameType: sunken + *filesLayout*Frame*frameWidth: 2 + *filesLayout*Text*background: gray63 + *filesLayout*Text*font: -*-helvetica-medium-r-normal-*-12-*-iso8859-1 + *filesLayout*TextBox*font: -*-helvetica-medium-r-normal-*-12-*-iso8859-1 + *filesLayout*TextToggle.frameWidth: 0 + *filesLayout*TextToggle.height: 28 + *filesLayout*TextToggle.width: 80 + *filesLayout*TextToggle.alignment: left + *filesLayout*Scrollbar2*background: gray63 + *filesLayout*scrollbarForeground: gray + *filesLayout*Scrollbar2*location: 0 0 20 10 + *filesLayout*Scrollbar2*vertical: True + *filesLayout*Scrollbar2*minsize: 20 + *filesLayout*MultiList*background: gray63 + *filesLayout*MultiList*foreground: black + *filesLayout*MultiList*shadeSurplus: False + *filesLayout*MultiList*width: 120 + *filesLayout*MultiList.font: 7x13bold + *filesLayout*Label.font: 7x13bold + *filesLayout*Label.borderWidth: 0 + *filesLayout*Label.shadowWidth: 0 + *filesLayout.layout: vertical { \ + 5 < +0 -5 > \ + horizontal { \ + 0 < +0 -0 > \ + imagesGroup < +inf -inf * +inf -inf > \ + 0 < +0 -0 > \ + } \ + 0 < +0 -0 > \ + horizontal { \ + 0 < +0 -0 > \ + fbuttonsGroup < +inf -inf * > \ + 0 < +0 -0 > \ + } \ + 0 < +0 -0 > \ + } + + *imagesGroup.label: Images + *imagesGroup.frameWidth: 2 +! *imagesGroup.outerOffset: 5 + *imagesGroup*offIcon: square0s + *imagesGroup*onIcon: square1s + *imagesGroup*highlightColor: yellow + *imagesLayout*Label.shadowWidth: 0 + *imagesLayout*Label.justify: left + *imagesLayout*Command.width: 90 + *imagesLayout*TextButton.width: 90 + *imagesLayout*TextButton.height: 23 + *imagesLayout*TextButton.font: *times*medium*r*normal*-12-* + *imagesLayout.layout: vertical { \ + 7 < +0 -7 > \ + horizontal { \ + 5 \ + rootButton < +inf -inf * > \ + 2 \ + homeButton < +inf -inf * > \ + 2 \ + upButton < +inf -inf * > \ + 2 \ + rescanButton < +inf -inf * > \ + 5 \ + } \ + 7 \ + horizontal { \ + 5 < +0 -5 > \ + vertical { \ + 5 \ + imtemplateLabel < * > \ + 5 \ + imtemplateFrame < +inf -inf * > \ + 10 < +inf -inf > \ + grayToggle < * > \ + 5 \ + browseToggle < * > \ + 5 \ + } \ + 5 \ + horizontal { \ + 5 < +0 -5 > \ + imlistFrame < +inf -inf * +inf -inf > \ + 3 < +0 -3 > \ + imlistScrollbar < * +inf - inf > \ + 0 < +0 -0 > \ + } \ + 5 < +0 -5 > \ + } \ + 5 \ + horizontal { \ + 5 \ + dirLabel < +inf -inf * > \ + 5 \ + } \ + 10 \ + horizontal { \ + 5 < +0 -5 > \ + fnameLabel < * > \ + 5 < +0 -5 > \ + filnamFrame < +inf -inf * > \ + 5 < +0 -5 > \ + frameLabel < * > \ + 5 < +0 -5 > \ + frameFrame < -50% * > \ + 5 < +0 -5 > \ + } \ + 5 < +0 -5 > \ + } + *imtemplateLabel.label: File Pattern: + *imtemplateText*editType: edit + *imtemplateText.height: 20 + *imageList.width: 100 + *upButton.label: Up + *rootButton.label: Root + *homeButton.label: Home + *rescanButton.label: Rescan + *browseToggle.label: Browse + *browseToggle.on: True + *grayToggle.label: Greyscale + *dirLabel.label: Directory: + *dirLabel.alignment: left + *fnameLabel.label: Load File: + *fnameText*editType: edit + *fnameText.height: 20 + *frameLabel.label: Frame: + *frameFrame.label: 1 + + *fbuttonsGroup.label: + *fbuttonsGroup*frameWidth: 2 + *fbuttonsGroup*outerOffset: 5 + *fbuttonsGroup*innerOffset: 5 + *fbuttonsGroup.frameType: sunken + *fbuttonsGroup*Command.font: 7x13bold + *fbuttonsLayout*Command.height: 50 + *fbuttonsLayout*Command.width: 70 + *fbuttonsLayout.layout: horizontal { \ + -1 \ + filesLoadButton \ + 1 < +inf -1 > \ + filesStatus \ + 1 < +inf -1 > \ + filesCloseButton \ + -1 \ + } + + *filesLoadButton.label: Load + *filesStatus.label: + *filesCloseButton.label: Done + + ! Help panel resources. + !---------------------- + *help_panel.title: XImtool Help Summary + *help_panel.width: 450 + *help_panel.height: 525 + *helpLayout*borderWidth: 0 + *helpLayout.background: gray + *helpLayout*Frame*frameType: sunken + *helpLayout*Frame*frameWidth: 2 + *helpLayout*Frame.background: gray + *helpLayout*Layout.background: gray + *helpLayout*ScrollbarBackground: #c0c0c0 + *helpLayout*Scrollbar*background: #c0c0c0 + *helpLayout*Scrollbar*width: 17 + *helpLayout*Scrollbar*height: 17 + *helpLayout*Scrollbar*shadowWidth: 2 + *helpLayout*Scrollbar*cursorName: top_left_arrow + *helpLayout*Scrollbar*pushThumb: true + + + *helpLayout.layout: vertical { \ + -1 \ + horizontal { \ + 0 < +0 -0 > \ + helpMenuLayout < +inf -inf * > \ + 0 < +0 -0 > \ + } \ + 0 < +0 -0 > \ + horizontal { \ + 0 < +0 -0 > \ + helpTextFrame < +inf -inf * +inf -inf > \ + 0 \ + } \ + 0 < +0 -0 > \ + horizontal { \ + 0 < +0 -0 > \ + helpInfoLayout < +inf -inf * > \ + 0 < +0 -0 > \ + } \ + -1 \ + } + *helptext*background: white + *helptext*foreground: black + + *helpMenuLayout*background: gray + *helpMenuLayout*Command.highlightThickness: 2 + *helpMenuLayout*Command.internalHeight: 2 + *helpMenuLayout*Command.font: -*-helvetica-bold-r-normal-*-12-*-*-* + *helpMenuLayout.layout: vertical { \ + 5 \ + horizontal { \ + 5 < +0 -5 > \ + helpBack \ + 2 < +0 -2 > \ + helpForward \ + 2 < +0 -2 > \ + helpHome \ + 20 < +inf -20 > \ + helpClose \ + 5 < +0 -5 > \ + } \ + 5 \ + } + *helpBack.label: Back + *helpBack.sensitive: False + *helpForward.label: Forward + *helpForward.sensitive: False + *helpHome.label: Home + *helpClose.label: Done + + *helpInfoLayout*background: gray + *helpInfoLayout*Label.justify: center + *helpInfoLayout*Label.internalHeight: 0 + *helpInfoLayout.layout: horizontal { \ + 5 \ + vertical { \ + 5 \ + helpIRAFLogo \ + 5 \ + } \ + 1 \ + vertical { \ + 5 \ + horizontal { \ + 0 < +inf -inf > \ + helpInfo1 \ + 0 < +inf -inf > \ + } \ + 0 < +inf -0 > \ + horizontal { \ + 0 < +inf -inf > \ + helpInfo2 \ + 0 < +inf -inf > \ + } \ + 0 < +inf -0 > \ + horizontal { \ + 0 < +inf -inf > \ + helpInfo3 \ + 0 < +inf -inf > \ + } \ + 5 \ + } \ + 1 \ + vertical { \ + 5 \ + helpNOAOLogo \ + 5 \ + } \ + 5 \ + } + *helpInfo1.label: XImtool V1.2 -- Released: 4/30/2000 + *helpInfo2.label: iraf@noao.edu (520) 318-8160 + *helpInfo3.label: NOAO is operated by AURA under cooperative agreement with the NSF + *helpInfoLayout*helpInfo1.font: -*-helvetica-medium-r-normal-*-12-*-*-* + *helpInfoLayout*helpInfo2.font: -*-helvetica-medium-r-normal-*-12-*-*-* + *helpInfoLayout*helpInfo3.font: -*-helvetica-medium-r-normal-*-10-*-*-* + *helpInfoLayout.helpIRAFLogo.internalWidth: 0 + *helpInfoLayout.helpIRAFLogo.internalheight: 0 + *helpInfoLayout.helpIRAFLogo.foreground: steelblue + *helpInfoLayout.helpIRAFLogo.background: white + *helpInfoLayout.helpNOAOLogo.internalWidth: 0 + *helpInfoLayout.helpNOAOLogo.internalheight: 0 + *helpInfoLayout.helpNOAOLogo.foreground: steelblue + *helpInfoLayout.helpNOAOLogo.background: white + + *helpText.width: 450 + *helpText.height: 500 + *helpText.anchorUnderlines: 1 + *helpText.visitedAnchorUnderlines: 1 + *helpText.verticalScrollOnRight: true + *helpText.plainFont: 6x13 + + + ! Define a debug Tcl shell. + !-------------------------------- + *tclShell.title: Interactive Tcl Shell + *tclForm.background: gray + *tclForm*Label.background: gray + *tclForm*Label.borderWidth: 0 + *tclForm*Label.resize: False + *tclForm*Command.resize: False + *tclForm*Command.background: grey75 + *tclForm*Command.font: 7x13bold + *tclLabel.label: Server Command Entry + *tclClear.label: Clear + *tclExecute.label: Execute + *tclEntry*Text.font: 7x13 + *tclEntry*width: 500 + *tclEntry*borderWidth: 1 + *tclEntry*height: 150 + *tclEntry*editType: edit + *tclEntry*scrollHorizontal: whenNeeded + *tclEntry*scrollVertical: never + *tclEntry*displayCaret: True + *tclcloseButton.label: Done + + + ! GUI resources. + ! ------------------------------ + *autoscale: True + *zoomfactors: 1 2 4 8 + *displayCoords: True + *displayPanner: True + *displayMagnifier: False + *blinkRate: 1.0 + *pannerArea: 150*150 + *pannerGeom: -5+5 + *magnifierArea: 100*100 + *magnifierGeom: +5+5 + *wcsboxGeom: -5-5 + *maxContrast: 5.0 + *warnings: True +} + +# Start up the GUI. +createObjects +send colorbar setGterm ; send colorbar activate +send imagewin setGterm ; send imagewin activate +activate + +# Utility procedure to test True/False strings in resources. +proc true {v} {expr {$v == "true" || $v == "True" || $v == "TRUE"}} + +# Utility functions. +proc min {a b} { expr {($a < $b) ? $a : $b} } +proc max {a b} { expr {($a > $b) ? $a : $b} } + +# Global variables. +set version "NOAO/IRAF XImtool Version 1.2" + +set winWidth [send imagewin get width] ;# display window width +set winHeight [send imagewin get height] ;# display window height +set marker none ;# selected marker +set markno 0 ;# used to name new markers +set blinkFrames "1 2" ;# list of blink/tile frames + +set loadP_up 0 +set saveP_up 0 +set printP_up 0 +set infoP_up 0 +set panel_up 0 +set helpP_up 0 + + +proc winResize {w width height} \ + { global winWidth winHeight; set winWidth $width; set winHeight $height} +send imagewin addCallback winResize resize + +# Additional global variables, taking default values from resources. +getResources { + { zoomfactors } + { displayCoords } + { displayPanner } + { displayMagnifier } + { blinkRate } + { pannerArea } + { pannerGeom } + { magnifierArea } + { magnifierGeom } + { wcsboxGeom } + { maxContrast } + { warnings } +} + +set warnings [true $warnings] +set defaultBlinkRate $blinkRate + +# Client state variables (UI parameter objects). Certain of these parameters +# we mirror in Tcl variables here, updating the values with a callback when +# the parameter value changes. Others require special callbacks. + +set frame 1 ;# current display frame +set nframes 0 ;# number of frame buffers +set frames {1 2 3 4} ;# list of image frames +set frameWidth 0 ;# frame buffer width, pixels +set frameHeight 0 ;# frame buffer height, pixels +set frameDepth 8 ;# frame buffer pixel size, bits +set cursorMode 0 ;# true when cursor read pending + +foreach i $frames { + set frameZoomX($i) 0 ;# X zoom factor + set frameZoomY($i) 0 ;# Y zoom factor + set frameCenterX($i) 0 ;# X center of field + set frameCenterY($i) 0 ;# Y center of field + set frameScaleX($i) 0 ;# X scale factor + set frameScaleY($i) 0 ;# Y scale factor + set enhancement($i) none ;# colortable enhancement +} + +# Called when the number of frames changes. +proc setNFrames {param old new} { + global frameMenuDescription nframes frames + set nframes $new + if {$old != $new} { + foreach i {prevButton nextButton} { + send $i set sensitive [expr "$nframes > 1"] + } + editMenu frameMenu frameButton $frameMenuDescription + } + foreach i $frames { + if {$i <= $nframes} { + send frameBox manage frame$i + } else { + send frameBox unmanage frame$i + } + } +}; send nframes addCallback setNFrames + +set frameMenuDescription { + { 1 f.exec "send client setFrame 1" sensitive {[expr "$nframes >= 1"]} } + { 2 f.exec "send client setFrame 2" sensitive {[expr "$nframes >= 2"]} } + { 3 f.exec "send client setFrame 3" sensitive {[expr "$nframes >= 3"]} } + { 4 f.exec "send client setFrame 4" sensitive {[expr "$nframes >= 4"]} } +}; createMenu frameMenu frameButton $frameMenuDescription + +# Called when the frame being displayed changes. +proc frameChanged {param old new} { + global frame + set frame $new + send frameButton set label $frame +}; send frame addCallback frameChanged + +# Called when the frame buffer configuration changes. +proc setFrameSize {param old new} { + global frameWidth frameHeight frameDepth + set frameWidth [lindex $new 0] + set frameHeight [lindex $new 1] + set frameDepth [lindex $new 2] +}; send frameSize addCallback setFrameSize + +# Called when the current frame is zoomed or panned. +proc setFrameView {param old new} { + global frameZoomX frameZoomY frameCenterX frameCenterY + global frameScaleX frameScaleY frame + set frameZoomX($frame) [lindex $new 0] + set frameZoomY($frame) [lindex $new 1] + set frameCenterX($frame) [lindex $new 2] + set frameCenterY($frame) [lindex $new 3] + set frameScaleX($frame) [lindex $new 4] + set frameScaleY($frame) [lindex $new 5] +}; send frameView addCallback setFrameView + +# Called when the color enhancement for a frame changes. +proc setEnhancement {param old new} { + global enhancement + set enhancement([lindex $new 0]) [lrange $new 1 end] +}; send enhancement addCallback setEnhancement + +# Called when the frame title changes (e.g. frame change or new frame loaded). +proc setTitle {param old new} { + send imageTitle set label [string trimright $new] +}; send frameTitle addCallback setTitle + +# Called when the image is flipped in an axis. +proc setFlip {param old new} { + send ${param}Button set state [true $new] +}; foreach i {xflip yflip} { send $i addCallback setFlip } + + +# Various general callbacks. +proc Quit args { send client Quit } +proc nextFrame args { send client nextFrame } +proc prevFrame args { send client prevFrame } +proc setColormap { mapno } { send client setColormap $mapno } +proc xflip args { send client flip x } +proc yflip args { send client flip y } +proc xyflip args { send client flip x y } + +# Initialize bitmaps. +createBitmap xflip 16 16 { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x18, 0x18, + 0x1c, 0x38, 0xfe, 0x7f, 0xfe, 0x7f, 0x1c, 0x38, 0x18, 0x18, 0x10, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + +createBitmap yflip 16 16 { + 0x00, 0x00, 0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0xf0, 0x0f, 0x80, 0x01, + 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0xf0, 0x0f, + 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01, 0x00, 0x00}; + +createBitmap qmark 16 16 { + 0x00, 0x00, 0x00, 0x00, 0xf0, 0x07, 0xf8, 0x0f, 0x18, 0x0c, 0x18, 0x0c, + 0x18, 0x0e, 0x00, 0x07, 0x80, 0x03, 0x80, 0x01, 0x80, 0x01, 0x00, 0x00, + 0x80, 0x01, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00}; + +createBitmap larrow 16 16 { + 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0xc0, 0x03, 0xe0, 0x1e, 0x70, 0x1e, + 0x38, 0x18, 0x1c, 0x18, 0x1c, 0x18, 0x38, 0x18, 0x70, 0x1e, 0xe0, 0x1e, + 0xc0, 0x03, 0x80, 0x03, 0x00, 0x03, 0x00, 0x00}; + +createBitmap rarrow 16 16 { + 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x03, 0x78, 0x07, 0x78, 0x0e, + 0x18, 0x1c, 0x18, 0x38, 0x18, 0x38, 0x18, 0x1c, 0x78, 0x0e, 0x78, 0x07, + 0xc0, 0x03, 0xc0, 0x01, 0xc0, 0x00, 0x00, 0x00}; + +createBitmap panel 16 16 { + 0x00, 0x00, 0xf8, 0x1f, 0xf8, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x98, 0x19, 0x98, 0x19, 0x98, 0x19, 0x98, 0x19, 0x98, 0x19, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0xf8, 0x1f, 0xf8, 0x1f}; + +createBitmap brightness 15 15 { + 0x00, 0x00, 0x80, 0x00, 0x84, 0x10, 0xe8, 0x0b, 0x10, 0x04, 0x08, 0x08, + 0x08, 0x08, 0x0e, 0x38, 0x08, 0x08, 0x08, 0x08, 0x10, 0x04, 0xe8, 0x0b, + 0x84, 0x10, 0x80, 0x00, 0x00, 0x00}; + +createBitmap contrast 15 15 { + 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x30, 0x07, 0x08, 0x0f, 0x08, 0x0f, + 0x04, 0x1f, 0x04, 0x1f, 0x04, 0x1f, 0x08, 0x0f, 0x08, 0x0f, 0x30, 0x07, + 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00}; + +createBitmap solid 64 24 { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + +send panelButton "set bitmap panel; addCallback panel" +send xflipButton "set bitmap xflip; addCallback xflip" +send yflipButton "set bitmap yflip; addCallback yflip" +send helpButton "set bitmap qmark; addCallback Help" +send prevButton "set bitmap larrow; addCallback prevFrame" +send nextButton "set bitmap rarrow; addCallback nextFrame" + + +# WINDOW the current frame. +proc windowColormap {x y} \ +{ + global winWidth winHeight maxContrast + + send client windowColormap \ + [expr "double($x) / $winWidth"] \ + [expr "(double($y) - $winHeight / 2.0) / $winHeight * \ + $maxContrast * 2.0"] +} + +# WINDOW the current frame, but only one color at a time. +proc windowRGB {color x y save_flag} \ +{ + global winWidth winHeight maxContrast + + send client windowRGB $color \ + [expr "double($x) / $winWidth"] \ + [expr "(double($y) - $winHeight / 2.0) / $winHeight * \ + $maxContrast * 2.0"] $save_flag +} + + +# ZOOM and PAN. +set xcen 0 +set ycen 0 +foreach i $frames {set zoomindex($i) 0} +set nzoomfactors 0 +foreach i $zoomfactors { + set zoomfactor($nzoomfactors) $i + incr nzoomfactors +} + +# Zoom or pan image at given center. +proc zoom {x y} \ +{ + global xcen ycen frame + global zoomindex zoomfactor + global nzoomfactors + + set rx $x; set ry $y + set raster 0 + + # Convert raw screen coordinates to frame buffer raster coordinates. + send imagewin unmapPixel $x $y raster rx ry + + # Select a pixel. + set rx [expr "int ($rx)"] + set ry [expr "int ($ry)"] + + # If the pointer did not move (much) zoom the image, otherwise + # pan it. + + send imagewin setCursorType busy + if {sqrt(pow($x-$xcen, 2) + pow($y-$ycen, 2)) < 4} { + set zoomindex($frame) [expr [incr zoomindex($frame)] % $nzoomfactors] + set mag $zoomfactor($zoomindex($frame)) + send client zoom $mag $mag $rx $ry + } else { + send client pan $rx $ry + set xcen $x + set ycen $y + } + + # Move the pointer so that it tracks the object feature the user + # selected. + + send imagewin setCursorPos $rx $ry $raster + send imagewin getCursorPos xcen ycen + send imagewin setCursorType idle +} + +# Zoom using a marker to indicate the region to be displayed. +proc zoomMarker {marker aspect} \ +{ + global xcen ycen frame + global winWidth winHeight + global zoomindex nzoomfactors + + # getRegion returns: "rectangle raster x y width height rotangle". + set region [send $marker getRegion unmap] + + set raster [lindex $region 1] + set xcen [expr "int([lindex $region 2]) + 0.5"] + set ycen [expr "int([lindex $region 3]) + 0.5"] + set snx [expr "[lindex $region 4] * 2"] + set sny [expr "[lindex $region 5] * 2"] + + # Compute the magnification ratio. + set xmag [expr "$winWidth / $snx"] + set ymag [expr "$winHeight / $sny"] + if {$aspect == "equal"} { + set mag [expr "($xmag < $ymag) ? $xmag : $ymag"] + set xmag $mag; set ymag $mag + } + + # Zoom the image. + send client zoomAbs $xmag $ymag $xcen $ycen + + # The following causes a button2 to redisplay the full image. + send imagewin setCursorPos $xcen $ycen $raster + send imagewin getCursorPos xcen ycen + set zoomindex($frame) [expr "$nzoomfactors - 1"] +} + +proc resetView {param old new} { + global zoomindex xcen ycen frames + global frameWidth frameHeight + + if {$new == "done"} { + foreach i $frames { + send client setFrame $i + set xcen [expr $frameWidth / 2] + set ycen [expr $frameHeight / 2] + send client zoom 1 1 $xcen $ycen + set zoomindex($i) 0 + send client setColormap Grayscale + normalize + } + send client setFrame 1 + } +}; #send initialize addCallback resetView + + +# CURSOR READ stuff. +proc setCursorMode {param old new} \ +{ + global cursorMode + + if {$new == "on"} { + send imagewin "activate; setCursorType ginMode" + set cursorMode 1 + } elseif {$new == "off"} { + send imagewin "setCursorType idle; deactivate" + set cursorMode 0 + } +} + +proc keyInput {widget event sx sy data} \ +{ + global cursorMode frame + + if {!$cursorMode || $event != "keyPress"} \ + return + if {[lindex $data 0] == "??"} \ + return + + # Convert raw screen coordinates to raster pixel coordinates. + send imagewin unmapPixel $sx $sy raster rx ry + + # Return the cursor value and exit cursor mode. + send client retCursorVal $rx $ry $frame 1 [lindex $data 0] +} + +proc resetCursorMode args { + global cursorMode frame + if {$cursorMode} { + send imagewin getCursorPos x y + send client retCursorVal $x $y $frame 1 ^D + } +}; send initialize addCallback resetCursorMode + +send cursorMode addCallback setCursorMode +send imagewin addCallback keyInput input + + +# MARKER stuff. The active marker is determined by the global variable +# "marker", which is the marker the pointer is in, or which the pointer +# was most recently in. + +# Translations when pointer is inside marker. +set markerTranslations { \ + !Shift <Btn1Motion>: m_rotateResize() + <Btn1Motion>: m_moveResize() + !Shift <Btn1Down>: m_raise() m_markpos() + <Btn1Down>: m_raise() m_markposAdd() + <Btn1Up>: m_redraw() m_destroyNull() + <Btn2Down>: m_lower() + <Btn3Down>: popup(markerMenu) + <Btn3Up>: popdown(markerMenu) + !Ctrl <Key>b: call(prevFrame,$name) + !Ctrl <Key>f: call(nextFrame,$name) + !Ctrl <Key>h: call(move_cursor,-1,0) + !Ctrl <Key>j: call(move_cursor,0,1) + !Ctrl <Key>k: call(move_cursor,0,-1) + !Ctrl <Key>l: call(move_cursor,1,0) + !Ctrl <Key>n: call(normalize) + !Ctrl <Key>m: call(toggleMagnifier) + !Ctrl <Key>p: call(togglePanner) + !Ctrl <Key>c: call(cpZoomAction,centerFrame) + !Ctrl <Key>i: call(cpInvert) + !Ctrl <Key>s: call(cpMatchFrames) + !Ctrl <Key>r: call(cpRegisterFrames) + !Alt <Key>1: call(cpSetFrame,frame1) + !Alt <Key>2: call(cpSetFrame,frame2) + !Alt <Key>3: call(cpSetFrame,frame3) + !Alt <Key>4: call(cpSetFrame,frame4) + !Ctrl <Key>1: call(cpZoom,1,1,fixed) + !Ctrl <Key>2: call(cpZoom,2,2,fixed) + !Ctrl <Key>3: call(cpZoom,3,3,fixed) + !Ctrl <Key>4: call(cpZoom,4,4,fixed) + !Ctrl <Key>5: call(cpZoom,5,5,fixed) + !Ctrl <Key>6: call(cpZoom,6,6,fixed) + !Ctrl <Key>7: call(cpZoom,7,7,fixed) + !Ctrl <Key>8: call(cpZoom,8,8,fixed) + !Ctrl <Key>9: call(cpZoom,9,9,fixed) + <Key>BackSpace: m_deleteDestroy() + <Key>Delete: m_deleteDestroy() + <KeyPress>: m_input() + <Motion>: track-cursor() +} + +# Popup menu in effect when inside marker. +createMenu markerMenu imagewin { + { Marker f.title } + { f.dblline } + { Zoom f.exec { + zoomMarker $marker equal + send $marker destroy + } } + { Fill f.exec { + zoomMarker $marker fill + send $marker destroy + } } + { Print f.exec { + send $marker getRect interior x0 y0 nx ny + setPrintCorners $x0 [expr $y0 + $ny -1] \ + [expr $x0 + $nx -1] $y0 + send client print $x0 $y0 $nx $ny + } } + { Save f.exec { + send imagewin setCursorType busy + send $marker getRect interior x0 y0 nx ny + send client save $x0 $y0 $nx $ny + send imagewin setCursorType idle + } } + { Info f.exec { + send infoText append \ + [format "%s\n" [send $marker getRegion unmap]] + } } + { Unrotate f.exec { + send $marker setAttribute rotangle 0 + } } + { f.line } + { Color f.menu markerColor } + { Type f.menu markerType } + { f.line } + { Destroy f.exec { + send $marker destroy + } } +} + +createMenu markerType markerMenu { + { Type f.title } + { f.dblline } + { Rectangle f.exec "m_setType $marker rectangle" } + { Box f.exec "m_setType $marker box" } + { Circle f.exec "m_setType $marker circle" } + { Ellipse f.exec "m_setType $marker ellipse" } + { Polygon f.exec "m_setType $marker polygon" } +} + +createMenu markerColor markerMenu { + { Color f.title } + { f.dblline } + { "" f.exec "m_setColor $marker black" + bitmap solid foreground black } + { "" f.exec "m_setColor $marker white" + bitmap solid foreground white } + { "" f.exec "m_setColor $marker red" + bitmap solid foreground red } + { "" f.exec "m_setColor $marker green" + bitmap solid foreground green } + { "" f.exec "m_setColor $marker blue" + bitmap solid foreground blue } + { "" f.exec "m_setColor $marker magenta" + bitmap solid foreground magenta } + { "" f.exec "m_setColor $marker cyan" + bitmap solid foreground cyan } + { "" f.exec "m_setColor $marker yellow" + bitmap solid foreground yellow } +} + +proc m_setType {marker type} { + send $marker "markpos; set type $type; redraw" +} +proc m_setColor {marker color} { + send $marker "markpos; + set lineColor $color; set highlightColor $color; redraw" +} + +# Callback executed when a marker gets or loses the focus. +proc selectMarker {active_marker event event_data} \ +{ + global marker + switch $event { + focusIn { set marker $active_marker } + focusOut { } + } +} + +# Create marker action. Makes a new marker. +proc makeMarker {parent x y} \ +{ + global markerTranslations markno + set marker marker$markno; incr markno + + send $parent createMarker $marker \ + type rectangle \ + createMode interactive \ + translations $markerTranslations \ + x $x \ + y $y + + send $marker addCallback selectMarker focusIn focusOut +} + + +# WCSBOX -- Real time coordinate display. +set track_enable 0 + +proc wcsUpdate {x y} \ +{ + global track_enable frame + + # Convert screen coords to raster pixel. + send imagewin unmapPixel $x $y raster rx ry rz + + # Set the current frame to the frame the pointer is within. + if {$frame && $raster} { + set track_frame [send client getFrame $raster] + if {$frame != $track_frame} { + send client setFrame $track_frame + } + } + + # Update coords box. + if {$track_enable} { + if {$raster} { + set text [send client encodewcs $rx $ry $rz] + } else { + set text [format " %7.2f %7.2f %7.1f " $rx $ry $rz] + } + send wcsbox "set text \{$text\}; redraw noerase" + } +} + +proc setTrack {state} \ +{ + global track_enable wcsboxGeom + global winWidth winHeight + + if {$state} { + if {$track_enable} \ + return + + send imagewin createMarker wcsbox { + type text + createMode noninteractive + width 25ch + height 1ch + lineWidth 0 + imageText true + textBgColor black + textColor yellow + visible false + } + + set box_width [send wcsbox get width] + set box_height [send wcsbox get height] + set defGeom [format "%sx%s-5-5" $box_width $box_height] + send imagewin parseGeometry $wcsboxGeom $defGeom x y width height + + send wcsbox setAttributes \ + x $x \ + y $y \ + activated true \ + visible true \ + sensitive true + + send wcsbox { + addCallback wcsboxDestroyCallback destroy + addCallback wcsboxMoved moveResize + } + + send imagewin addCallback wcsboxWindowResize resize + set track_enable 1 + send imagewin getCursorPos x y + wcsUpdate $x $y + magnifierMapImage $x $y + + } elseif {$track_enable} { + set track_enable 0 + send wcsbox destroy + } +} + +proc wcsboxDestroyCallback args { + global track_enable + send imagewin deleteCallback wcsboxWindowResize + set track_enable 0 +} + +# If the window is resized make the wcsbox track the corner. +proc wcsboxWindowResize args { + global track_enable + global wcsboxGeom + + if {$track_enable} { + # Get new location. + set box_width [send wcsbox get width] + set box_height [send wcsbox get height] + set defGeom [format "%sx%s-5-5" $box_width $box_height] + send imagewin parseGeometry $wcsboxGeom $defGeom x y width height + + # Move the marker. + send wcsbox "\ + deleteCallback wcsboxMoved; \ + markpos; setAttributes x $x y $y; redraw; \ + addCallback wcsboxMoved moveResize" + } +} + +proc wcsboxMoved {marker event position} { + global wcsboxGeom + send wcsbox getRect boundary x y width height + set wcsboxGeom [send imagewin getGeometry $x $y $width $height] +} + +proc resetWcsbox {param old new} { + global track_enable wcsboxGeom displayCoords + if {$new == "done"} { + setTrack [true $displayCoords] + } elseif {$track_enable} { + setTrack 0 + if {$new == "restart"} { + set wcsboxGeom -5-5 + } + } +}; send initialize addCallback resetWcsbox + + +# PANNER. The full frame mapped into the main image window is displayed at a +# reduced resolution in a marker (known as the panner window) within the main +# image window. The currently displayed region of the frame is indicated +# using a small marker within the panner window. This small marker may be +# moved or resized to pan or zoom the image in the main display window. + +set panner_x 0 +set panner_y 0 +set panner_width 0 +set panner_height 0 +set prm_width 0 +set prm_height 0 + +set panner_enable 0 +set panner_pan_enable 0 +set panner_region_enable 0 +set panner_mapping 0 + +# Panner window translations. +set pannerWinTranslations { \ + !Shift <Btn1Motion>: m_rotateResize() + <Btn1Motion>: m_moveResize() + !Shift <Btn1Down>: m_raise() m_markpos() + <Btn1Down>: m_raise() m_markposAdd() + <Btn1Up>: m_redraw() m_destroyNull() + <Btn2Down>: m_lower() + !Ctrl <Key>b: call(prevFrame,$name) + !Ctrl <Key>f: call(nextFrame,$name) + !Ctrl <Key>h: call(move_cursor,-1,0) + !Ctrl <Key>j: call(move_cursor,0,1) + !Ctrl <Key>k: call(move_cursor,0,-1) + !Ctrl <Key>l: call(move_cursor,1,0) + !Ctrl <Key>n: call(normalize) + !Ctrl <Key>m: call(toggleMagnifier) + !Ctrl <Key>p: call(togglePanner) + !Ctrl <Key>c: call(cpZoomAction,centerFrame) + !Ctrl <Key>i: call(cpInvert) + !Ctrl <Key>s: call(cpMatchFrames) + !Ctrl <Key>r: call(cpRegisterFrames) + !Alt <Key>1: call(cpSetFrame,frame1) + !Alt <Key>2: call(cpSetFrame,frame2) + !Alt <Key>3: call(cpSetFrame,frame3) + !Alt <Key>4: call(cpSetFrame,frame4) + !Ctrl <Key>1: call(cpZoom,1,1,fixed) + !Ctrl <Key>2: call(cpZoom,2,2,fixed) + !Ctrl <Key>3: call(cpZoom,3,3,fixed) + !Ctrl <Key>4: call(cpZoom,4,4,fixed) + !Ctrl <Key>5: call(cpZoom,5,5,fixed) + !Ctrl <Key>6: call(cpZoom,6,6,fixed) + !Ctrl <Key>7: call(cpZoom,7,7,fixed) + !Ctrl <Key>8: call(cpZoom,8,8,fixed) + !Ctrl <Key>9: call(cpZoom,9,9,fixed) + <Btn2Up>: call(pannerPanXY,$x,$y) + <Key>BackSpace: m_deleteDestroy() + <Key>Delete: m_deleteDestroy() + <KeyPress>: graphics-input() + <Motion>: track-cursor() call(wcsUpdate,$x,$y) +} + + +# setPanner -- Turn the panner on or off. + +proc togglePanner args { + global panner_enable + + if {$panner_enable} { + setPanner 0 + } else { + setPanner 1 + } +} + +proc setPanner {state} \ +{ + global winWidth winHeight frameWidth frameHeight + global frame panner_mapping pannerWinTranslations pannerArea + global panner_enable panner_region_enable panner_pan_enable + global pannerGeom panner_x panner_y panner_width panner_height + + if {$state} { + if {$panner_enable} \ + return + + # Determine where to place the panner. + set scale \ + [expr sqrt(double($pannerArea) / ($frameWidth * $frameHeight))] + set scaled_width [expr int($frameWidth * $scale) / 2 * 2 + 1] + set scaled_height [expr int($frameHeight * $scale) / 2 * 2 + 1] + set defGeom [format "%sx%s-5+5" $scaled_width $scaled_height] + send imagewin parseGeometry $pannerGeom $defGeom x y width height + + # Create the main panner window (marker). + send imagewin createMarker pannerWin \ + type rectangle \ + createMode noninteractive \ + width [expr $width / 2] \ + height [expr $height / 2] \ + x [expr $x + $width / 2] \ + y [expr $y + $height / 2] \ + lineColor 8 \ + highlightColor 8 \ + translations $pannerWinTranslations \ + visible true \ + sensitive true \ + activated true + + # Update the panner window position variables so that it comes up + # in the same place the next time. + + send pannerWin getRect boundary \ + panner_x panner_y panner_width panner_height + set pannerGeom [send imagewin getGeometry \ + $panner_x $panner_y $panner_width $panner_height] + + # Register callbacks. + send frame addCallback pannerMapImage + send frameRegion addCallback pannerSetRegion + send imagewin addCallback pannerImagewinResized resize + send resize addCallback pannerImagewinResized + + send pannerWin { + addCallback pannerMapImage moveResize; + addCallback pannerMoved moveResize; + addCallback pannerDestroy destroy; + addCallback pannerWinConstraint constraint; + } + + # Map display frame to panner window. + set panner_enable 1 + set panner_region_enable 1 + set panner_mapping [send imagewin nextMapping] + pannerMapImage init; send imagewin refreshMapping $panner_mapping + + # Draw a marker in the panner window outlining displayed region. + send imagewin createMarker pannerRegionMarker \ + type box \ + createMode noninteractive \ + translations $pannerWinTranslations \ + lineColor green \ + highlightColor green \ + sensitive true + + # Fire up the panner region marker. + send client getSource raster sx sy snx sny + pannerSetRegion dummy dummy [concat $frame $sx $sy $snx $sny] + send pannerRegionMarker "\ + addCallback pannerPanImage moveResize; \ + addCallback pannerDestroy destroy; \ + addCallback pannerRegionConstraint constraint; \ + setAttributes visible true activated true; \ + redraw" + set panner_pan_enable 1 + + } elseif {$panner_enable} { + pannerDestroy + } +} + + +# pannerDestroy -- Delete the panner. + +proc pannerDestroy args { + global panner_enable panner_region_enable panner_pan_enable + global panner_mapping + + if {$panner_enable} { + set panner_enable 0 + set panner_pan_enable 0 + set panner_region_enable 0 + + send imagewin freeMapping $panner_mapping + send imagewin deleteCallback pannerImagewinResized + send resize deleteCallback pannerImagewinResized + send frame deleteCallback pannerMapImage + send frameRegion deleteCallback pannerSetRegion + + if [send server queryObject pannerRegionMarker] { + send pannerRegionMarker destroy + } + if [send server queryObject pannerWin] { + send pannerWin destroy + } + } +} + + +# pannerMapImage -- Map the current display frame into the panner window. +# Called when the frame changes or the panner window is moved or resized. +# The panner window displays a small dezoomed version of the full frame. + +proc pannerMapImage args { + global panner_enable frame + global panner_mapping + + if {!$panner_enable || $frame == 0} \ + return + + set raster [send client getRaster] + send pannerWin getRect interior dx dy dnx dny + send imagewin queryRaster $raster width height + + if [send imagewin activeMapping $panner_mapping] { + send imagewin raiseMapping $panner_mapping + } + send imagewin setMapping $panner_mapping 0 \ + $raster pixel 0 0 $width $height \ + 0 pixel $dx $dy $dnx $dny +} + + +# pannerSetRegion -- Adjust the pannerWin region marker to outline the +# region displayed in the main display window. This is called in response +# to a frameRegion event when the main display mapping changes, e.g. when +# the frame changes or the user zooms or pans the main window. The region +# marker is moved and resized to reflect the new view. + +proc pannerSetRegion {param old new} { + global panner_enable panner_region_marker + global panner_region_enable panner_pan_enable + global frame frameWidth frameHeight prm_width prm_height + + if {!$panner_enable || !$panner_region_enable || $frame == 0} \ + return + + # new: frame sx sy snx sny + set src_frame [lindex $new 0] + set sx [lindex $new 1]; set snx [lindex $new 3] + set sy [lindex $new 2]; set sny [lindex $new 4] + + if {$src_frame != $frame} \ + return + + send pannerWin getRect interior px py pnx pny + + set x [expr ($sx + $snx/2.0) / $frameWidth * $pnx + $px] + set y [expr ($sy + $sny/2.0) / $frameHeight * $pny + $py] + set width [expr ($snx/2.0) / $frameWidth * $pnx + 1] + set height [expr ($sny/2.0) / $frameHeight * $pny + 1] + + set pan_save $panner_pan_enable; set panner_pan_enable 0 + set panner_region_enable 0 + + send pannerRegionMarker "\ + markpos; \ + setAttributes x $x y $y width $width height $height; \ + redraw; raise" + send pannerRegionMarker getAttributes width prm_width height prm_height + + set panner_region_enable 1 + set panner_pan_enable $pan_save +} + + +# pannerPanImage -- Pan or zoom the image in the main image window. This is +# called when the user moves the region marker within the panner window. + +proc pannerPanImage {marker event position} { + global panner_pan_enable + global winWidth winHeight + global prm_width prm_height + + if {!$panner_pan_enable} \ + return + + # position: x y width height. + set new_width [lindex $position 2] + set new_height [lindex $position 3] + + # region: type raster x y width height. + set region [send pannerRegionMarker getRegion unmap] + set x [expr [lindex $region 2] + 1]; set width [lindex $region 4] + set y [expr [lindex $region 3] + 1]; set height [lindex $region 5] + + set panner_pan_enable 0 + if {$new_width == $prm_width && $new_height == $prm_height} { + send client pan $x $y + } else { + set xscale [expr ($winWidth / 2.0) / $width] + set yscale [expr ($winHeight / 2.0) / $height] + send client zoom $xscale $yscale $x $y + } + set panner_pan_enable 1 +} + + +# pannerPanXY -- Pan to the point X,Y in the panner window coordinate +# system. Called when the user clicks MB2 in the panner window. + +proc pannerPanXY {x y} { + send imagewin unmapPixel $x $y raster rx ry + send client pan $rx $ry +} + + +# pannerMoved -- Called when the user moves the panner window. We need to +# move the region marker to the new window location and record the new location +# so that the window will come up in the same place if closed and reopened. + +proc pannerMoved {marker event position} { + global winWidth winHeight + global frame panner_pan_enable pannerGeom + global panner_x panner_y panner_width panner_height + + # Move the region marker to the new location. + set pan_save $panner_pan_enable; set panner_pan_enable 0 + send client getSource raster sx sy snx sny + pannerSetRegion dummy dummy [concat $frame $sx $sy $snx $sny] + set panner_pan_enable $pan_save + + # Update the panner window position variables so that it comes up + # in the same place the next time. + + send pannerWin getRect boundary \ + panner_x panner_y panner_width panner_height + set pannerGeom [send imagewin getGeometry \ + $panner_x $panner_y $panner_width $panner_height] + + send pannerRegionMarker raise +} + + +# pannerWinConstraint -- Called when the panner window is moved, resized, or +# rotated. Constrain the panner window to remain within the image window; +# rotation is not permitted. + +proc pannerWinConstraint {marker event attributes} { + global winWidth winHeight + global panner_width panner_height + + set width $panner_width + set height $panner_height + set constraints [list {}] + + # Check the width and height first as we need these below. + foreach i $attributes { + set new [lindex $i 2] + switch [lindex $i 0] { + width { set ww [expr $winWidth / 2] + if {$new > $ww} { + lappend constraints "width $ww" + set width $ww + } else { + set width $new + } + } + height { set wh [expr $winHeight / 2] + if {$new > $wh} { + lappend constraints "height $wh" + set height $wh + } else { + set height $new + } + } + rotangle { lappend constraints "rotangle 0" + } + } + } + + # Constrain X and Y. + foreach i $attributes { + set new [lindex $i 2] + switch [lindex $i 0] { + x { set pw [expr $width / 2] + if {$new < $pw} { + lappend constraints "x $pw" + } elseif {$new > $winWidth - $pw} { + lappend constraints "x [expr $winWidth - $pw]" + } + } + y { set ph [expr $height / 2] + if {$new < $ph} { + lappend constraints "y $ph" + } elseif {$new > $winHeight - $ph} { + lappend constraints "y [expr $winHeight - $ph]" + } + } + } + } + + return $constraints +} + + +# pannerRegionConstraint -- Called when the region marker in the panner +# window is moved, resized, or rotated. + +proc pannerRegionConstraint {marker event attributes} { + global winWidth winHeight + + set constraints [list {}] + send pannerWin getRect interior p_x p_y p_width p_height + send pannerRegionMarker getAttributes width rwidth height rheight + + # Since the panner region marker is a box marker x,y and width,height + # will not both change in the same call, so we can process them all + # independently. + + foreach i $attributes { + set new [lindex $i 2] + + switch [lindex $i 0] { + x { set left [expr $p_x + $rwidth + 1] + set right [expr $p_x + $p_width - $rwidth - 1] + if {$new < $left} { + lappend constraints "x $left" + } elseif {$new > $right} { + lappend constraints "x $right" + } + } + y { set top [expr $p_y + $rheight + 1] + set bottom [expr $p_y + $p_height - $rheight - 1] + if {$new < $top} { + lappend constraints "y $top" + } elseif {$new > $bottom} { + lappend constraints "y $bottom" + } + } + width { set ww [expr $winWidth / 2] + if {$new > $ww / 2} { + lappend constraints "width $ww" + } + } + height { set wh [expr $winHeight / 2] + if {$new > $wh / 2} { + lappend constraints "height $wh" + } + } + rotangle { lappend constraints "rotangle 0" + } + } + } + + return $constraints +} + + +# pannerImagewinResized -- If the display window is resized make the panner +# track the corner. + +proc pannerImagewinResized args { + global panner_enable panner_mapping + global pannerGeom panner_x panner_y panner_width panner_height + + if {$panner_enable} { + set old_x $panner_x; set old_width $panner_width + set old_y $panner_y; set old_height $panner_height + + # Get new location of panner window. + set defGeom [format "%sx%s-5+5" $panner_width $panner_height] + send imagewin parseGeometry $pannerGeom $defGeom x y width height + + # Reposition the marker. + send pannerWin "\ + markpos; \ + setAttributes \ + x [expr $x + $width / 2] \ + y [expr $y + $height / 2] \ + width [expr $width / 2] \ + height [expr $height / 2]; \ + redraw" + + # Update the panner window position variables so that it comes up + # in the same place the next time. + send pannerWin getRect boundary \ + panner_x panner_y panner_width panner_height + set pannerGeom [send imagewin getGeometry \ + $panner_x $panner_y $panner_width $panner_height] + + # Make sure the panner window is on top. + send imagewin raiseMapping $panner_mapping + + # Refresh the panner window if it did not move. + if {$panner_x == $old_x && $panner_y == $old_y && + $panner_width == $old_width && $panner_height == $old_height} { + send imagewin refreshMapping $panner_mapping + } + } +} + + +# resetPanner -- Reinitialize the panner. + +proc resetPanner {param old new} { + global pannerGeom displayPanner + if {$new == "done"} { + setPanner [true $displayPanner] + } else { + setPanner 0 + if {$new != "startup"} { + set pannerGeom -5+5 + } + } +}; send initialize addCallback resetPanner + + + +# MAGNIFIER. A subraster around the cursor in the main image window is +# displayed at a high resolution in a marker (known as the magnifier window) +# within the main image window. + +set magnifier_x 0 +set magnifier_y 0 +set magnifier_width 0 +set magnifier_height 0 +set mrm_width 0 +set mrm_height 0 + +set magnifier_enable 0 +set magnifier_mag_enable 0 +set magnifier_mapping 0 + +createMenu magzoomMenu imagewin { + { "Zoom Factors" f.title } + { f.dblline } + { "Zoom 1" f.exec "setMagnifierZoom 1" } + { "Zoom 2" f.exec "setMagnifierZoom 2" } + { "Zoom 4" f.exec "setMagnifierZoom 4" } + { "Zoom 8" f.exec "setMagnifierZoom 8" } + { "Zoom 16" f.exec "setMagnifierZoom 16" } +} + +# Magnifier window translations. +set magnifierWinTranslations { \ + !Shift <Btn1Motion>: m_rotateResize() + <Btn1Motion>: m_moveResize() + !Shift <Btn1Down>: m_raise() m_markpos() + <Btn1Down>: m_raise() m_markposAdd() + <Btn1Up>: m_redraw() m_destroyNull() + <Btn2Down>: m_lower() + <Btn3Down>: popup(magzoomMenu) + <Btn3Up>: popdown(magzoomMenu) + !Ctrl <Key>m: call(toggleMagnifier) + !Ctrl <Key>p: call(togglePanner) + <Key>BackSpace: m_deleteDestroy() + <Key>Delete: m_deleteDestroy() + <KeyPress>: graphics-input() + <Motion>: track-cursor() call(wcsUpdate,$x,$y) +} + + +# setMagnifier -- Turn the magnifier on or off. + +set magAlreadyOn 0 + +proc setDynamicMagnifier {state} \ +{ + global magAlreadyOn magnifier_enable + + if {$state} { + set magAlreadyOn $magnifier_enable + } + if {$magAlreadyOn} { + return + } else { + setMagnifier $state + } +} + + +proc toggleMagnifier args { + global magnifier_enable + + if {$magnifier_enable} { + setMagnifier 0 + send pbMagM set state False + } else { + setMagnifier 1 + send pbMagM set state True + } +} + + +proc setMagnifier {state} \ +{ + global winWidth winHeight frameWidth frameHeight + global frame magnifier_mapping magnifierWinTranslations magnifierArea + global magnifier_enable magnifier_height + global magnifierGeom magnifier_x magnifier_y magnifier_width + + if {$state} { + if {$magnifier_enable} \ + return + + # Determine where to place the magnifier. + set scale [expr sqrt(double($magnifierArea) / (512 * 512))] + set scaled_width [expr int(512 * $scale) / 2 * 2 + 1] + set scaled_height [expr int(512 * $scale) / 2 * 2 + 1] + set defGeom [format "%sx%s-5+5" $scaled_width $scaled_height] + send imagewin parseGeometry $magnifierGeom $defGeom x y width height + + # Create the main magnifier window (marker). + send imagewin createMarker magnifierWin \ + type rectangle \ + createMode noninteractive \ + width [expr $width / 2] \ + height [expr $height / 2] \ + x [expr $x + $width / 2] \ + y [expr $y + $height / 2] \ + lineColor 8 \ + highlightColor 8 \ + translations $magnifierWinTranslations \ + visible true \ + sensitive true \ + activated true + + # Update the magnifier window position variables so that it comes up + # in the same place the next time. + + send magnifierWin getRect boundary \ + magnifier_x magnifier_y magnifier_width magnifier_height + set magnifierGeom [send imagewin getGeometry \ + $magnifier_x $magnifier_y $magnifier_width $magnifier_height] + + # Register callbacks. + send imagewin addCallback magnifierImagewinResized resize + send resize addCallback magnifierImagewinResized + send magnifierWin addCallback magnifierMovedMapImage moveResize + + send magnifierWin { + addCallback magnifierMoved moveResize; + addCallback magnifierDestroy destroy; + addCallback magnifierWinConstraint constraint; + } + + # Map display frame to magnifier window. + set magnifier_enable 1 + set magnifier_mapping [send imagewin nextMapping] + send imagewin refreshMapping $magnifier_mapping + + # create cross-hair + send imagewin createMarker magPointer \ + type rectangle \ + createMode noninteractive \ + width 3 \ + height 3 \ + lineWidth 3 \ + lineColor green \ + highlightcolor green \ + activated true \ + visible true + + # set its position and size + setMagPointerPosition + magnifierMapImage [expr $winWidth / 2] [expr $winHeight / 2] + + } elseif {$magnifier_enable} { + magnifierDestroy + } +} + + +# magnifierDestroy -- Delete the magnifier. + +proc magnifierDestroy args { + global magnifier_enable + global magnifier_mapping + + if {$magnifier_enable} { + set magnifier_enable 0 + + send imagewin freeMapping $magnifier_mapping + send imagewin deleteCallback magnifierImagewinResized + send resize deleteCallback magnifierImagewinResized + send frame deleteCallback magnifierMapImage + + if [send server queryObject magnifierWin] { + send magnifierWin destroy + } + if [send server queryObject magPointer] { + send magPointer destroy + } + } +} + + +# magnifierMoved -- Called when the user moves the magnifier window. We need to +# move the region marker to the new window location and record the new location +# so that the window will come up in the same place if closed and reopened. + +proc magnifierMoved {marker event position} { + global winWidth winHeight magnifierGeom frame + global magnifier_x magnifier_y magnifier_width magnifier_height + + # Move the region marker to the new location. + send client getSource raster sx sy snx sny + + # Update the magnifier window position variables so that it comes up + # in the same place the next time. + + send magnifierWin getRect boundary \ + magnifier_x magnifier_y magnifier_width magnifier_height + set magnifierGeom [send imagewin getGeometry \ + $magnifier_x $magnifier_y $magnifier_width $magnifier_height] +} + + +# magnifierWinConstraint -- Called when the magnifier window is moved, resized, +# or rotated. Constrain the magnifier window to remain within the image window; +# rotation is not permitted. + +proc magnifierWinConstraint {marker event attributes} { + global winWidth winHeight + global magnifier_width magnifier_height + + set width $magnifier_width + set height $magnifier_height + set constraints [list {}] + + # Check the width and height first as we need these below. + foreach i $attributes { + set new [lindex $i 2] + switch [lindex $i 0] { + width { set ww [expr $winWidth / 2] + if {$new > $ww} { + lappend constraints "width $ww" + set width $ww + } else { + set width $new + } + } + height { set wh [expr $winHeight / 2] + if {$new > $wh} { + lappend constraints "height $wh" + set height $wh + } else { + set height $new + } + } + rotangle { lappend constraints "rotangle 0" + } + } + } + + # Constrain X and Y. + foreach i $attributes { + set new [lindex $i 2] + switch [lindex $i 0] { + x { set pw [expr $width / 2] + if {$new < $pw} { + lappend constraints "x $pw" + } elseif {$new > $winWidth - $pw} { + lappend constraints "x [expr $winWidth - $pw]" + } + } + y { set ph [expr $height / 2] + if {$new < $ph} { + lappend constraints "y $ph" + } elseif {$new > $winHeight - $ph} { + lappend constraints "y [expr $winHeight - $ph]" + } + } + } + } + + return $constraints +} + + +# magnifierRegionConstraint -- Called when the region marker in the magnifier +# window is moved, resized, or rotated. + +proc magnifierRegionConstraint {marker event attributes} { + global winWidth winHeight + + set constraints [list {}] + send magnifierWin getRect interior p_x p_y p_width p_height + + # Since the magnifier region marker is a box marker x,y and width,height + # will not both change in the same call, so we can process them all + # independently. + + foreach i $attributes { + set new [lindex $i 2] + + switch [lindex $i 0] { + x { set left [expr $p_x + $rwidth + 1] + set right [expr $p_x + $p_width - $rwidth - 1] + if {$new < $left} { + lappend constraints "x $left" + } elseif {$new > $right} { + lappend constraints "x $right" + } + } + y { set top [expr $p_y + $rheight + 1] + set bottom [expr $p_y + $p_height - $rheight - 1] + if {$new < $top} { + lappend constraints "y $top" + } elseif {$new > $bottom} { + lappend constraints "y $bottom" + } + } + width { set ww [expr $winWidth / 2] + if {$new > $ww / 2} { + lappend constraints "width $ww" + } + } + height { set wh [expr $winHeight / 2] + if {$new > $wh / 2} { + lappend constraints "height $wh" + } + } + rotangle { lappend constraints "rotangle 0" + } + } + } + + return $constraints +} + + +# magnifierImagewinResized -- If the display window is resized make the +# magnifier track the corner. + +proc magnifierImagewinResized args { + global magnifier_enable magnifier_mapping magnifier_height + global magnifierGeom magnifier_x magnifier_y magnifier_width + + if {$magnifier_enable} { + set old_x $magnifier_x; set old_width $magnifier_width + set old_y $magnifier_y; set old_height $magnifier_height + + # Get new location of magnifier window. + set defGeom [format "%sx%s+5+5" $magnifier_width $magnifier_height] + send imagewin parseGeometry $magnifierGeom $defGeom x y width height + + # Reposition the marker. + send magnifierWin "\ + markpos; \ + setAttributes \ + x [expr $x + $width / 2] \ + y [expr $y + $height / 2] \ + width [expr $width / 2] \ + height [expr $height / 2]; \ + redraw" + + # Update the magnifier window position variables so that it comes up + # in the same place the next time. + send magnifierWin getRect boundary \ + magnifier_x magnifier_y magnifier_width magnifier_height + set magnifierGeom [send imagewin getGeometry \ + $magnifier_x $magnifier_y $magnifier_width $magnifier_height] + + # Make sure the magnifier window is on top. + send imagewin raiseMapping $magnifier_mapping + + # Refresh the magnifier window if it did not move. + if {$magnifier_x == $old_x && $magnifier_y == $old_y && + $magnifier_width == $old_width && $magnifier_height == $old_height} { + send imagewin refreshMapping $magnifier_mapping + } + } +} + + +# resetMagnifier -- Reinitialize the magnifier. + +proc resetMagnifier {param old new} { + global magnifierGeom displayMagnifier + if {$new == "done"} { + setMagnifier [true $displayMagnifier] + } else { + setMagnifier 0 + if {$new != "startup"} { + set magnifierGeom +5+5 + } + } +}; send initialize addCallback resetMagnifier + + +set last_mag_x [expr $winWidth / 2] +set last_mag_y [expr $winHeight / 2] + +# magnifierMovedMapImage -- Front end to magnifierMapImage, called when +# magnifier window is moved or resized. + +proc magnifierMovedMapImage args { + global last_mag_x last_mag_y + + magnifierMapImage $last_mag_x $last_mag_y + setMagPointerPosition +} + + +# The following code was borrowed from the SAOtng GUI by Eric Mandel of SAO +#-------------------------------------------------------------------------- + +# globals for magnifier +set mag_w 0 +set mag_h 0 + +# +# setMagnifierZoom -- set the zoom factor for the magnifier +# +proc setMagnifierZoom { zoom } \ +{ + global mag_w mag_h + + send magnifierWin getRect boundary \ + magnifier_x magnifier_y magnifier_width magnifier_height + set mag_w [expr int( ( $magnifier_width + $zoom - 1 ) / $zoom) ] + set mag_h [expr int( ( $magnifier_height + $zoom - 1 ) / $zoom) ] + + #set mw [expr int (($magnifier_width - 1) / ($mag_w * 2))] + #if { $mw < 4 } { set mw 4 } + #set mh [expr int (($magnifier_height - 1) / ($mag_h * 2))] + #if { $mh < 4 } { set mh 4 } + #send magPointer "setAttributes width $mw height $mh; redraw" +} + +# magnifierMapImage -- Map the of the current display frame centered on the +# pointer into the magnifier window. Called when the frame changes, the +# pointer moves in the main image window, or (via magnifierMovedMapImage) +# the magnifier window is moved or resized. + +set magnifierROP 0 + +proc magnifierMapImage {x y} \ +{ + global magnifier_enable frame + global last_mag_x last_mag_y + global magnifier_mapping + global winWidth winHeight + global mag_w mag_h + global magnifierROP + + if {!$magnifier_enable || $frame == 0} \ + return + + if {abs($last_mag_x-$x) != 1 && abs($last_mag_y-$y) != 1} { + # For efficiency we won't compute the sqrt of the distance but instead + # just compare the square. Use a threshold of 6 pixels so when we + # narrow in on the ROI the magnifier is still (mostly) correctly. + set diff [expr (($last_mag_x-$x) * ($last_mag_x-$x)) + \ + (($last_mag_y-$y) * ($last_mag_y-$y))] + if {$diff > 36} { + set last_mag_x $x + set last_mag_y $y + return + } + } + + set last_mag_x $x + set last_mag_y $y + + send magnifierWin getRect interior dx dy dnx dny + if [send imagewin activeMapping $magnifier_mapping] { + send imagewin raiseMapping $magnifier_mapping + } + # initialize the magnifier zoom factor, if necessary + if { !$mag_w || !$mag_h } { + setMagnifierZoom 4 + } + + set sx [expr $x - $mag_w / 2 ] + set sy [expr $y - $mag_h / 2 ] + + # Constrain the source rectangle within the main image window + # (not overlapping an edge or the magnifier window). + + if {$sx > [expr $dx - $mag_w] && $sx < [expr $dx + $dnx] && + $sy > [expr $dy - $mag_h] && $sy < [expr $dy + $dny] } { + + # The source rectangle would overlap the magnifier window; fix that. + + set dist(l) [expr $sx - ($dx - $mag_w)] + set dist(b) [expr $dy + $dny - $sy] + set dist(r) [expr $dx + $dnx - $sx] + set dist(t) [expr $sy - ($dy - $mag_h)] + + # Put the distances in order. + + foreach j [array names dist] { + set alreadyset($j) 0 + } + + for {set i 0} {$i < 4} {incr i} { + set candidate "" + foreach j [array names dist] { + if {!$alreadyset($j)} { + if {$candidate == ""} { + set candidate $j + set minsofar $dist($j) + } elseif {$dist($j) < $minsofar} { + set candidate $j + set minsofar $dist($j) + } + } + } + set order($i) $candidate + set alreadyset($candidate) 1 + } + + # Try the sides in order, using the first one where there's room. + + for {set i 0} {$i < 4} {incr i} { + if {$order($i) == "l"} { + if {$dx >= $mag_w} { + set sx [expr $dx - $mag_w] + break + } + } elseif {$order($i) == "b"} { + if {$winHeight >= $dy + $dny + $mag_h} { + set sy [expr $dy + $dny] + break + } + } elseif {$order($i) == "r"} { + if {$winWidth >= $dx + $dnx + $mag_w} { + set sx [expr $dx + $dnx] + break + } + } elseif {$order($i) == "t"} { + if {$dy >= $mag_h} { + set sy [expr $dy - $mag_h] + break + } + } + } + } + + # Make sure we don't go beyond an edge of the main window. + + if {$sx < 0} { + set sx 0 + } else { + set sxmax [expr $winWidth - $mag_w] + if {$sx > $sxmax} { + set sx $sxmax + } + } + + if {$sy < 0} { + set sy 0 + } else { + set symax [expr $winHeight - $mag_h] + if {$sy > $symax} { + set sy $symax + } + } + + # Map 32 x 32 centered on pointer in main window. + set err [catch {send imagewin setMapping $magnifier_mapping $magnifierROP \ + 0 pixel $sx $sy $mag_w $mag_h \ + 0 pixel $dx $dy $dnx $dny}] + if { $err != 0 } { + Print "There was a problem setting up the magnifier ... recovering" + } +} + + +# set the position of the magnifier marker in the center of the mag window +proc setMagPointerPosition args \ +{ + global magnifier_enable + + if { !$magnifier_enable } { + return + } + + send magnifierWin "getAttributes x x y y" + set xpos [expr $x + 1] + set ypos [expr $y + 1] + + send magPointer "setAttributes x $xpos y $ypos visible true; redraw" +} + + + +# FRAME BLINK. +set blinkId 0 +set blinkIndex 0 + +proc toggleBlink args { + global blinkId blinkRate blinkIndex + global optionsMenuDescription + + if {$blinkId} { + deleteTimedCallback $blinkId + set blinkId 0 + } else { + set blinkId [postTimedCallback blink [expr int($blinkRate * 1000)]] + } + + set blinkIndex 0 + editMenu optionsMenu viewButton $optionsMenuDescription +} + +proc blink args { + global blinkId blinkRate blinkFrames blinkIndex + + send client setFrame [lindex $blinkFrames $blinkIndex] + incr blinkIndex + if {$blinkIndex >= [llength $blinkFrames]} { + set blinkIndex 0 + } + + set blinkId [postTimedCallback blink [expr int($blinkRate * 1000)]] +} + +proc resetBlink args { + global blinkId + if {$blinkId} \ + toggleBlink +}; send initialize addCallback resetBlink + + + +# Normalize -- Reset the view parameters for the current frame. +proc normalize args { + global zoomindex zoomfactor + global frameWidth frameHeight + global xcen ycen frame + + #set zoomindex($frame) 0 + #set xcen [expr $frameWidth / 2] + #set ycen [expr $frameHeight / 2] + #send client zoom 1 1 $xcen $ycen + send client windowColormap 0.5 1.0 +} + + +# Popdown menus. +createMenu fileMenu fileButton { + { "Info" f.exec { + send info map + infoUpdate + } } + { "Load" f.exec { + send client setLoadOption rescan + send load_panel map + set loadP_up 1 + } } + { "Save" f.exec { + Save + } } + { "Save As..." f.exec { + send save_panel map + set saveP_up 1 + } } + { "Print" f.exec { + send imagewin setCursorType busy + Print + send imagewin setCursorType idle + } } + { "Print Setup" f.exec { + send print_panel map + set printP_up 1 + } } + { "TclShell" f.exec { + send tclShell map + } } + { f.line } + { "Reset" f.exec { + # Do a hard reset. + send client Reset + #resetView initialize done done + } } + { "Quit" f.exec Quit } +} + +createMenu viewMenu viewButton { + { "Next frame" f.exec nextFrame } + { "Prev frame" f.exec prevFrame } + { f.line } + { "Colormap" f.menu cmapMenu } + { "Flip" f.menu flipMenu } + { f.line } + { "Equal aspect" f.exec { + set xmag $frameZoomX($frame) + set ymag $frameZoomY($frame) + set zoom [expr ($xmag + $ymag) / 2.0] + cpZoom $zoom $zoom fixed + } } + { "Integer zoom" f.exec { + set xmag [expr round ($frameZoomX($frame))] + set ymag [expr round ($frameZoomY($frame))] + cpZoom $xmag $ymag fixed + } } + { "Toggle zoom" f.exec toggleZoom } + { "Unzoom" f.exec { + set zoomindex($frame) 0 + set mag $zoomfactor($zoomindex($frame)) + send client zoom $mag $mag $xcen $ycen + } } +} + +createMenu cmapMenu viewMenu { + { "Colormaps" f.title } + { f.dblline } + { "Normalize" f.exec normalize } + { "Invert" f.exec cpInvert } + { "Optimize" f.exec cpOptimize sensitive false } + { f.line } + { "Grayscale" f.exec "send client setColormap Grayscale" } + { "Color" f.exec "send client setColormap Color" } + { "Heat" f.exec "send client setColormap Heat" } + { "HSV" f.exec "send client setColormap HSV" } + { "AIPS0" f.exec "send client setColormap AIPS0" } + { "Halley" f.exec "send client setColormap Halley" } + { "Ramp" f.exec "send client setColormap Ramp" } + { "Standard" f.exec "send client setColormap Standard" } + { "Staircase" f.exec "send client setColormap Staircase" } + { "Rainbow1" f.exec "send client setColormap Rainbow1" } + { "Rainbow2" f.exec "send client setColormap Rainbow2" } + { "Random8" f.exec "send client setColormap Random8" } +} + +createMenu flipMenu viewMenu { + { "Flip X" f.exec xflip } + { "Flip Y" f.exec yflip } + { "Flip XY" f.exec xyflip } +} + +set optionsMenuDescription { + { "Autoscale" f.exec { + set value [send autoscaleButton get on] + send autoscaleButton set on [expr !$value] + cpSetAutoscale + } } + { "Antialias" f.exec { + set value [send antialiasButton get on] + send antialiasButton set on [expr !$value] + cpSetAntialias + } } + { "Panner" f.exec { setPanner [expr !$panner_enable] } } + { "Magnifier" f.exec { setMagnifier [expr !$magnifier_enable] }} + { "Coords box" f.exec { setTrack [expr !$track_enable] } } + { "Tile frames" f.exec { + set value [send tileFramesButton get on] + send tileFramesButton set on [expr !$value] + cpSetTileFrames + } } + { "Clear frame" f.exec clearFrame } + { "Fit frame" f.exec fitFrame } + { "Match LUTs" f.exec cpMatchFrames } + { "Register" f.exec cpRegisterFrames } + { {$blinkId ? "Stop blink" : "Blink frames"} + f.exec toggleBlink } + { f.line } + { "Control Panel" f.exec { panel + set panel_up 1 + } } + { "Print Panel" f.exec { send print_panel map + set printP_up 1 + } } + { "Load Panel" f.exec { send client setLoadOption rescan + send load_panel map + set loadP_up 1 + } } + { "Save Panel" f.exec { send save_panel map + set saveP_up 1 + } } +}; createMenu optionsMenu optionsButton $optionsMenuDescription + + +# MAIN CONTROL PANEL +# --------------------------- + + +foreach i $frames {set saveView($i) "1 1"} + +send prevFrame set bitmap larrow +send nextFrame set bitmap rarrow +send contrastLabel set bitmap contrast +send brightnessLabel set bitmap brightness +send contrastSlider resizeThumb 0.1 1.0 +send brightnessSlider resizeThumb 0.1 1.0 + +proc controlPanelDone args { + global panel_up + send controlShell unmap + send panelButton set state 0 + set panel_up 0 +}; send doneButton addCallback controlPanelDone + +# panel -- Toggle control panel display. +proc panel args { + global panel_up + if {$panel_up} { + send controlShell unmap + send panelButton set state 0 + set panel_up 0 + } else { + send controlShell map + send panelButton set state 1 + set panel_up 1 + } +} + +# resetPanel -- Calling during startup or in an initialize, to reset things. +proc resetPanel {param old new} { + global frame nframes frames + global displayPanner displayCoords displayMagnifier + global blinkFrames warnings + + switch $new { + startup { + } + restart { foreach i $frames { + send frame$frame set on 0 + } + } + done { if {$frame} { + send frame$frame set on 1 + } + + cpResetBlink + set button 1 + foreach i $blinkFrames { + send blinkFrame$button set label $i + incr button + } + + cpResetEnhance + send pannerButton set on [true $displayPanner] + send magnifierButton set on [true $displayMagnifier] + send coordsBoxButton set on [true $displayCoords] + send warningsButton set on $warnings + } + } +}; send initialize addCallback resetPanel + + +# Frame selection. +# ------------------------------- +proc cpSetFrame {widget args} { + send $widget set on 0 + send client setFrame [send $widget get label] +} + +proc cpFrameChanged {param old new} { + if {$old > 0} { + send frame$old set on 0 + } + if {$new > 0} { + send frame$new set on 1 + } +} + +send prevFrame addCallback prevFrame +send nextFrame addCallback nextFrame +send frame addCallback cpFrameChanged +foreach i $frames {send frame$i addCallback cpSetFrame} + +# Frame buttons. +proc cpFrameAction {widget args} { + global frameZoomX frameZoomY frame + switch $widget { + aspect { set xmag $frameZoomX($frame) + set ymag $frameZoomY($frame) + set zoom [expr round (($xmag + $ymag) / 2.0)] + cpZoom $zoom $zoom fixed + } + flipX { send client flip x } + flipY { send client flip y } + flipXY { send client flip x y } + clearFrame { clearFrame } + fitFrame { fitFrame } + } +} +foreach widget {aspect flipX flipY flipXY clearFrame fitFrame} { + send $widget addCallback cpFrameAction +} + +# clearFrame -- Clear the current display frame. +proc clearFrame args { + global warnings + if {$warnings} { + Wexec client \ + "Clearing the frame will destroy\n\ + all data in the frame" \ + clearFrame + } else { + send client clearFrame + } +} + +# fitFrame -- Resize the display window to fit the frame buffer. +proc fitFrame args { + global frameWidth frameHeight winWidth winHeight + set dw [expr [send display get width] - $winWidth] + set dh [expr [send display get height] - $winHeight] + send display "resize [expr $frameWidth + $dw] [expr $frameHeight + $dh]" +}; + +proc initFitFrame { param old new } { + if { [lindex $new 0] == "resize"} { + fitFrame + } + pannerMapImage init +}; send frameFit addCallback initFitFrame + + +# Zoom and pan buttons. +# ------------------------------- +proc cpZoomAction {widget args} { + global frameWidth frameHeight + + switch $widget { + x1 { cpZoom 1 1 fixed } + + z2 { cpZoom 2 2 fixed } + z3 { cpZoom 3 3 fixed } + z4 { cpZoom 4 4 fixed } + z5 { cpZoom 5 5 fixed } + z8 { cpZoom 8 8 fixed } + + d2 { cpZoom [expr 1.0/2] [expr 1.0/2] fixed } + d3 { cpZoom [expr 1.0/3] [expr 1.0/3] fixed } + d4 { cpZoom [expr 1.0/4] [expr 1.0/4] fixed } + d5 { cpZoom [expr 1.0/5] [expr 1.0/5] fixed } + d8 { cpZoom [expr 1.0/8] [expr 1.0/8] fixed } + + zoomIn { cpZoom 2.0 2.0 relative } + zoomOut { cpZoom 0.5 0.5 relative } + + centerFrame { send client pan \ + [expr $frameWidth/2.0] \ + [expr $frameHeight/2.0] + } + + toggleZoom { toggleZoom } + } +} + +proc cpZoom {zoom_x zoom_y mode} { + global frameZoomX frameZoomY zoomindex frame + + if {$mode == "fixed"} { + send client zoom $zoom_x $zoom_y + } else { + send client zoom \ + [expr $frameZoomX($frame) * $zoom_x] \ + [expr $frameZoomY($frame) * $zoom_y] + } + + set zoomindex($frame) 0 +} + +proc toggleZoom args { + global frameZoomX frameZoomY frameCenterX frameCenterY + global frameWidth frameHeight saveView frame + + if {$frameZoomX($frame) != 1 && $frameZoomY($frame) != 1} { + set saveView($frame) \ + "$frameZoomX($frame) $frameZoomY($frame) \ + $frameCenterX($frame) $frameCenterY($frame)" + send client zoom 1 1 \ + [expr $frameWidth/2.0] \ + [expr $frameHeight/2.0] + } else { + send client zoom $saveView($frame) + } +} + +foreach widget {toggleZoom centerFrame zoomIn zoomOut \ + x1 z2 z3 z4 z5 z8 d2 d3 d4 d5 d8} { + send $widget addCallback cpZoomAction +} + +# Frame data display. +# ------------------------------- +set cpFrame 0 +set cpXcen 0 +set cpYcen 0 +set cpXmag 0 +set cpYmag 0 +set cpXscale 0 +set cpYscale 0 + +proc cpDisplayFrameData {name old new} { + global cpFrame cpXcen cpYcen + global cpXmag cpYmag cpXscale cpYscale + + set update 0 + switch $name { + frame { if {$new != $cpFrame} { + set cpFrame $new + set update 1 + } + } + frameView { # Parse the frameView input. + set xmag [lindex $new 0]; set ymag [lindex $new 1] + set xcen [lindex $new 2]; set ycen [lindex $new 3] + set xnorm [lindex $new 4]; set ynorm [lindex $new 5] + + # We need client coords and the overall scale factors. + set text [send client encodewcs $xcen $ycen] + set xcen [lindex $text 0] + set ycen [lindex $text 1] + set xscale [expr $xmag * $xnorm] + set yscale [expr $ymag * $ynorm] + + if {$xcen != $cpXcen || $ycen != $cpYcen || + $xmag != $cpXmag || $ymag != $cpYmag || + $xscale != $cpXscale || $yscale != $cpYscale} { + + set cpXcen $xcen; set cpXscale $xscale + set cpYcen $ycen; set cpYscale $yscale + set cpXmag $xmag; set cpYmag $ymag + set update 1 + } + } + } + + if {$update} { + set header [format "-- Frame %d --" $cpFrame] + set center [format "X center: %0.1f\nY center: %0.1f" $cpXcen $cpYcen] + if {int($cpXmag) >= 10} { + set zoom1 [format " X zoom: %0.1f" $cpXmag] + set zoom2 [format " Y zoom: %0.1f" $cpYmag] + } else { + set zoom1 [format "X zoom: %0.1f" $cpXmag] + set zoom2 [format "Y zoom: %0.1f" $cpYmag] + } + if {int($cpXscale) >= 10} { + set scale1 [format "X scale: %0.1f" $cpXscale] + set scale2 [format "Y scale: %0.1f" $cpYscale] + } else { + set scale1 [format "X scale: %0.2f" $cpXscale] + set scale2 [format "Y scale: %0.2f" $cpYscale] + } + send frameData set label [format "%s\n%s\n%s\n%s\n%s\n%s" \ + $header $center $scale1 $scale2 $zoom1 $zoom2] + } +}; foreach p {frame frameView} {send $p addCallback cpDisplayFrameData} + + +# Frame enhancement. +# ------------------------------- +set cpEnhanceDisable 0 +set cpEnhanceId 0 +set cpEnhanceMode none +set cpEnhanceVal 0 +set cpListItem none + +# Windowing the colormap is slow when the mouse is not in the image window, +# so it is necessary to execute the windowColormap in a work procedure. +# This allows any number of slider motion events to be processed for each +# windowColormap, preventing slider events from queueing up. + +proc cpResetEnhance args { + global cpListItem cpEnhanceId + set cpListItem none + set cpEnhanceId 0 +} + +proc cpSetEnhancement {widget cbtype x y} { + global cpEnhanceMode cpEnhanceVal cpEnhanceId cpEnhanceDisable + set cpEnhanceMode $widget + set cpEnhanceVal $x + if {!$cpEnhanceId && !$cpEnhanceDisable} { + set cpEnhanceId [postWorkProc cpEnhanceProc] + } +} +proc cpEnhanceProc args { + global cpEnhanceMode cpEnhanceVal cpEnhanceId + global enhancement frame maxContrast + set val $cpEnhanceVal + + if {$cpEnhanceMode == "contrastSlider"} { + set contrast [lindex $enhancement($frame) 2] + send client windowColormap [lindex $enhancement($frame) 1] \ + [expr (($contrast < 0) ? -$val : $val) * $maxContrast] + } else { + send client windowColormap $val + } + + set cpEnhanceId 0 + return done +} + +proc cpInvert args { + global enhancement frame + set contrast [lindex $enhancement($frame) 2] + send client windowColormap [lindex $enhancement($frame) 1] \ + [expr -1.0 * $contrast] +} + +proc cpDisplayEnhancement {param old new} { + global cpEnhanceId maxContrast cpEnhanceDisable + global cpListItem enhancement frame + + if {!$frame} \ + return + set enhance $enhancement($frame) + if {[llength $enhance] < 3} \ + return + + set colortable [lindex $enhance 0] + set offset [lindex $enhance 1] + set scale [lindex $enhance 2] + + send colordata set label [format "-- %s --\nCon %0.2f Brt %0.2f" \ + $colortable $scale $offset] + + if {$colortable != $cpListItem} { + send colorlist highlight $colortable + set cpListItem $colortable + } + + if {!$cpEnhanceId && !$cpEnhanceDisable} { + set cpEnhanceDisable 1 + send contrastSlider moveThumb [expr abs($scale) / $maxContrast] + send brightnessSlider moveThumb $offset + set cpEnhanceDisable 0 + } +} + +foreach i {enhancement frame} { + send $i addCallback cpDisplayEnhancement +} +send contrastSlider addCallback cpSetEnhancement scroll +send brightnessSlider addCallback cpSetEnhancement scroll +send invertButton addCallback cpInvert + + +# Colortable display and selection. +# ------------------------------- +set cpScrollHeight 0 + +proc cpSetColorList {param old new} { + send colorlist setList $new resize +}; send colortables addCallback cpSetColorList + +proc cpResizeScrollbar {widget cbtype flags x y w h cw ch} { + global cpScrollHeight + set newHeight [expr $ch - $h] + if {$newHeight && $newHeight != $cpScrollHeight} { + send colorlistScroll setScrollbar 0.0 [expr double($h) / $ch] + set rowHeight [send colorlist get rowHeight] + set rowSpacing [send colorlist get rowSpacing] + send colorlistScroll set increment [expr ($ch <= $h) ? 0 : \ + "double ($rowHeight + $rowSpacing) / ($ch - $h)"] + set cpScrollHeight $newHeight + } +}; send colorlistPort addCallback cpResizeScrollbar + +proc cpScrollColorlist {widget cbtype pos} { + global cpScrollHeight + send colorlist set y [expr -int($cpScrollHeight * $pos)] +}; send colorlistScroll addCallback cpScrollColorlist scroll + +proc cpSelectColor {widget cbtype selections indices} { + global colortable + foreach selection $selections { + send client setColormap $selection + } +}; send colorlist addCallback cpSelectColor + + +# Frame blink. +# ------------------------------- +send BRtext set label $blinkRate + +proc cpSetBlinkRate {widget args} { + global blinkRate + if {$widget == "BRincrease"} { + if {$blinkRate < 0.01} { + set blinkRate 0.125 + } else { + set blinkRate [expr $blinkRate * 2.0] + } + } else { + set blinkRate [expr $blinkRate / 2.0] + if {$blinkRate < 0.01} { + set blinkRate 0 + } + } + send BRtext set label $blinkRate +} +foreach widget {BRincrease BRdecrease} { + send $widget addCallback cpSetBlinkRate +} + +proc cpSetBlinkFrame {widget args} { + global blinkFrames nframes + + set frame [send $widget get label] + if {$frame == " "} { + set frame 1 + } else { + incr frame + if {$frame > $nframes} { + set frame " " + } + } + send $widget set label $frame + + set blinkFrames {} + foreach i {1 2 3 4} { + set frame [send blinkFrame$i get label] + if {$frame != " "} { + lappend blinkFrames $frame + } + } +}; foreach i $frames {send blinkFrame$i addCallback cpSetBlinkFrame} + +proc cpBlink {widget args} { + global blinkRate blinkId + + if {$blinkRate < 0.01} { + send $widget set state 0 + blink + } elseif {($blinkId != 0) != [send $widget get state]} { + toggleBlink + } +}; send blinkButton addCallback cpBlink + +proc cpResetBlink args { + global blinkRate blinkFrames blinkIndex frames + global defaultBlinkRate + + foreach i $frames { + send blinkFrame$i set label " " + } + set blinkRate $defaultBlinkRate + send BRtext set label $blinkRate + set blinkIndex 0 +}; send blinkReset addCallback cpResetBlink + +proc cpTraceBlink {name element op} { + upvar $name blinkId + send blinkButton set state [expr $blinkId != 0] +}; trace variable blinkId w cpTraceBlink + +proc cpSetBlinkFrames {param old new} { + global blinkFrames frames + set blinkFrames {} + foreach i $frames { + if {$i <= $new} { + lappend blinkFrames $i + } + } + cpResetBlink + set button 1 + foreach i $blinkFrames { + send blinkFrame$button set label $i + incr button + } +}; send nframes addCallback cpSetBlinkFrames + +proc cpRegisterFrames args { + global blinkFrames + send client registerFrames \{$blinkFrames\} +}; send registerButton addCallback cpRegisterFrames + +proc cpMatchFrames args { + global blinkFrames + send client matchFrames \{$blinkFrames\} +}; send matchButton addCallback cpMatchFrames + + +# Options buttons. +# ------------------------------- +proc cpSetPanner {widget args} { + setPanner [send $widget get on] +}; send pannerButton addCallback cpSetPanner + +proc cpTracePanner {name element op} { + upvar $name panner_enable + send pannerButton set on $panner_enable +}; trace variable panner_enable w cpTracePanner + +proc cpSetMagnifier {widget args} { + setMagnifier [send $widget get on] +}; send magnifierButton addCallback cpSetMagnifier + +proc cpTraceMagnifier {name element op} { + upvar $name magnifier_enable + send magnifierButton set on $magnifier_enable +}; trace variable magnifier_enable w cpTraceMagnifier + +proc cpSetCoordsBox {widget args} { + setTrack [send $widget get on] +}; send coordsBoxButton addCallback cpSetCoordsBox + +proc cpTraceCoordsBox {name element op} { + upvar $name track_enable + send coordsBoxButton set on $track_enable +}; trace variable track_enable w cpTraceCoordsBox + +proc cpSetWarnings args { + global warnings + set warnings [send warningsButton get on] +}; send warningsButton addCallback cpSetWarnings + +proc cpSetAutoscale args { + set value [send autoscaleButton get on] + send client setOption autoscale [expr {$value ? "True" : "False"}] +}; send autoscaleButton addCallback cpSetAutoscale + +proc cpTrackAutoscale {param old new} { + send autoscaleButton set on [true $new] +}; send autoscale addCallback cpTrackAutoscale + +proc cpSetAntialias args { + set value [send antialiasButton get on] + send client setOption antialias [expr {$value ? "True" : "False"}] +}; send antialiasButton addCallback cpSetAntialias + +proc cpTrackAntialias {param old new} { + send antialiasButton set on [true $new] +}; send antialias addCallback cpTrackAntialias + +proc cpSetTileFrames args { + global blinkFrames + set value [send tileFramesButton get on] + send client setOption tileFrames \ + [expr {$value ? "True" : "False"}] \{ $blinkFrames \} +}; send tileFramesButton addCallback cpSetTileFrames + +proc cpTrackTileFrames {param old new} { + send tileFramesButton set on [true $new] +}; send tileFrames addCallback cpTrackTileFrames + +proc tileFramesToggle args { + set value [send tileFramesButton get on] + send tileFramesButton set on [expr !$value] + cpSetTileFrames +} + + +# Warning dialog. This pops up a dialog box with the given warning message, +# and executes the given command if the user pushes OK. +# +# Usage: Wexec object message [ok_action [cancel_action]] +# +# The message text is displayed in a popup and the user hits the ok or +# cancel button to close the popup. If an action has been posted for the +# button selected then it is sent to the named object. Only one alert can +# be in effect at a time; posting another alert before the first has +# completed causes the new alert to override the first. + +set W_object "" +set W_ok_command "" +set W_cancel_command "" + +proc Wexec {object msg args} { + global W_object W_ok_command W_cancel_command + set W_object $object + set W_ok_command [lindex $args 0] + set W_cancel_command [lindex $args 1] + send warnText set label $msg + send warning map +} + +proc Wbutton {widget args} { + global W_object W_ok_command W_cancel_command + switch $widget { + warnOk { if [llength $W_ok_command] { + send $W_object $W_ok_command + } + } + warnCancel { if [llength $W_cancel_command] { + send $W_object $W_cancel_command + } + } + } + send warning unmap +}; foreach w {warnOk warnCancel} {send $w addCallback Wbutton} + +# The parameter "alert" is used to forward alerts from the client. +proc setAlert {param old new} { + Wexec client [lindex $new 0] [lindex $new 1] [lindex $new 2] +}; send alert addCallback setAlert + + +# Global control panel buttons. +# ------------------------------- +proc cpInitialize args { + send imagewin setCursorType busy + send client initialize + send imagewin setCursorType idle +} +send initializeButton addCallback cpInitialize +send normalizeButton addCallback normalize + +# Temporarily deactivate some buttons. +send optimizeButton setSensitive false + + +# INFO box. +#----------- +proc infoDone args { send info unmap } +send infoDone addCallback infoDone +proc infoClear args { send infoText set string "" } +send infoUpdate addCallback infoUpdate +send infoClear addCallback infoClear + +proc infoUpdate args { + global version frame nframes + global frameWidth frameHeight frameDepth + global enhancement + global cpXcen cpYcen + global cpXmag cpYmag cpXscale cpYscale + + if {$frame == 0} { + send infoText set string "initializing display..." + } else { + set line1 $version + set line2 [format "Image:\t\t%s" [send imageTitle get label]] + set line3 [format "Frame %d of %d:\t%d x %d" \ + $frame $nframes $frameWidth $frameHeight] + set cmap [lindex $enhancement($frame) 0] + set brt [lindex $enhancement($frame) 1] + set con [lindex $enhancement($frame) 2] + set line4 [format "Colormap:\t%s" $cmap] + set line5 [format "Enhancement:\tBrt=%s Cont=%s" $brt $con] + + set center [format "X: %0.1f\n\t\tY: %0.1f" $cpXcen $cpYcen] + set line6 [format "Center:\t\t%s" $center] + + set line7 [format "Zoom:\t\tX: %0.2f\n\t\tY: %0.2f" $cpXmag $cpYmag] + set line8 [format "Scale:\t\tX: %0.2f\n\t\tY: %0.2f" $cpXscale $cpYscale] + + send infoText set string [ + format "%s\n\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n\n" \ + $line1 $line2 $line3 $line4 $line5 $line6 $line7 $line8 + ] + } +} +foreach param { frame frameView nframes frameSize frameTitle enhancement } { + send $param addCallback infoUpdate +} + + +# Cursor positioning routines +#---------------------------- + +proc move_cursor { xstep ystep args } { + set raster 0 + send imagewin getCursorPos rx ry + send imagewin setCursorPos [expr $rx + $xstep] [expr $ry + $ystep] $raster +} + + +# Print Panel Functions. +#------------------------ +# Global variables needed for the print setup panel + +set printColor prGrayButton +set orientation epsPortButton +set page_size epsLetterButton +set imageScale 100 + +set epsWidgets { epsPageGroup epsOrientLabel epsSizeLabel + epsPortButton epsLandButton epsLetterButton epsLegalButton epsA4Button + ScaleFrame SCdecrease SCtext SCincrease +} + + +proc psetup_init args { + global printColor orientation page_size imageScale #format + + set_printer toPrinter callback 1 + send SCtext set label [ format "%d %%" $imageScale ] + send $printColor set on true + send $orientation set on true + send $page_size set on true +} + + +proc doPrintOptions { param old new } { + global imageScale page_size orientation imageScale printColor + global warnings + + send printStatus set label {} + set val [join [lrange $new 1 end] " "] + + # print [format "doPrintOptions %s = %s" [lindex $new 0] $val] + switch [lindex $new 0] { + autoscale { if { $val == "True" } { + send epsscaleButton set on true + } elseif { $val == "False" } { + send epsscaleButton set on false + } + } + autorotate { if { $val == "True" } { + send autorotateButton set on true + } elseif { $val == "False" } { + send autorotateButton set on false + } + } + maxaspect { if { $val == "True" } { + send aspectButton set on true + } elseif { $val == "False" } { + send aspectButton set on false + } + } + annotate { if { $val == "True" } { + send annotateButton set on true + } elseif { $val == "False" } { + send annotateButton set on false + } + } + compress { if { $val == "True" } { + send compressButton set on true + } elseif { $val == "False" } { + send compressButton set on false + } + } + orientation { send $orientation set on false + if { $val == "portrait" } { + send epsPortButton set on true + set orientation epsPortButton + } elseif { $val == "landscape" } { + send epsPortButton set on false + set orientation epsLandButton + } + } + papersize { send $page_size set on false + if { $val == "letter" } { + send epsLetterButton set on true + set page_size epsLetterButton + } elseif { $val == "legal" } { + send epsLegalButton set on true + set page_size epsLegalButton + } elseif { $val == "A4" } { + send epsA4Button set on true + set page_size epsA4Button + } + } + imscale { set imageScale $val + send SCtext set label [ format "%d %%" $imageScale ] + } + colortype { send $printColor set on false + if { $val == "gray" } { + send prGrayButton set on true + set printColor prGrayButton + } elseif { $val == "pseudo" } { + send prPseudoButton set on true + set printColor prPseudoButton + } elseif { $val == "rgb" } { + send prRGBButton set on true + set printColor prRGBButton + } + } + printerName { if [send toPrinter get on] { + send printlist highlight $val + } + } + printCmd { if [send toPrinter get on] { + send printcmd set string $val + } + } + printFile { if [send toFile get on] { + send printcmd set string $val + } + } + deviceType { if { $val == "Printer" } { + send printerLabel set label "Print Command:" + send toPrinter set on true + send toFile set on false + } elseif { $val == "File" } { + send printerLabel set label "File Name:" + send toPrinter set on false + send toFile set on true + send printlist unhighlight + } + } + + status { send printStatus set label $val + send server synchronize + } + warning { if {$warnings} { Wexec server $val } + } + } +}; send printOptions addCallback doPrintOptions + + +# Print options procedures. +# ------------------------------- + +set prOptsWidgets { + toPrinter toFile + prGrayButton prPseudoButton prRGBButton + epsLandButton epsPortButton + epsLetterButton epsLegalButton epsA4Button + SCincrease SCdecrease +} +set prSimpleOptions { + epsscaleButton autorotateButton aspectButton annotateButton compressButton +} + +proc prPrintCommand { widget cbtype args } { + if [send toFile get on] { + send client setPrintOption printfile $args + send printStatus set label [format "output file set to %s" $args] + } else { + send client setPrintOption printcmd $args + send printStatus set label [format "print command set to %s" $args] + } +}; send printcmd addCallback prPrintCommand + +proc prOptionToggle { widget cbtype args } { + global imageScale + + # Handle the image scale widgets first. + #print [ format "prOptionToggle %s" $widget ] + switch $widget { + SCincrease { set scale [expr $imageScale + 5] + send client setPrintOption imscale $scale + return + } + SCdecrease { set scale [ expr $imageScale - 5 ] + send client setPrintOption imscale $scale + return + } + } + + # If it's not one of those it must be one of the radio toggles. + set val [ send $widget get on ] + #print [ format "prOptionToggle %s = %s" $widget $val ] + if { $val == 1 } { + switch $widget { + toPrinter { send client setPrintOption devicetype printer } + toFile { send client setPrintOption devicetype file } + + epsLandButton { send client setPrintOption orientation landscape } + epsPortButton { send client setPrintOption orientation portrait } + + epsLetterButton { send client setPrintOption papersize letter } + epsLegalButton { send client setPrintOption papersize legal } + epsA4Button { send client setPrintOption papersize A4 } + + prGrayButton { send client setPrintOption colortype gray } + prPseudoButton { send client setPrintOption colortype pseudo } + prRGBButton { send client setPrintOption colortype rgb } + } + } else { + send $widget set on true + } + +} ; foreach w $prOptsWidgets { send $w addCallback prOptionToggle } + +proc prSimpleOptionToggle { widget args } { + set val [ send $widget get on ] + #print [ format "prSimpleOptionToggle %s = %s" $widget $val ] + + switch $widget { + epsscaleButton { send client setPrintOption autoscale $val } + autorotateButton { send client setPrintOption autorotate $val } + aspectButton { send client setPrintOption maxaspect $val } + annotateButton { send client setPrintOption annotate $val } + compressButton { send client setPrintOption compress $val } + } +} ; foreach w $prSimpleOptions { send $w addCallback prSimpleOptionToggle } + + + +# Printer display and selection. +# ------------------------------- +set psScrollHeight 0 + +proc psSetPrintList {param old new} { + send printlist setList $new resize + send printlist highlight 0 +}; send printerList addCallback psSetPrintList + +proc psResizeScrollbar {widget cbtype flags x y w h cw ch} { + global psScrollHeight + set newHeight [expr $ch - $h] + if {$newHeight && $newHeight != $psScrollHeight} { + send printlistScroll setScrollbar 0.0 [expr double($h) / $ch] + set rowHeight [send printlist get rowHeight] + set rowSpacing [send printlist get rowSpacing] + send printlistScroll set increment [expr ($ch <= $h) ? 0 : \ + "double ($rowHeight + $rowSpacing) / ($ch - $h)"] + set psScrollHeight $newHeight + } +}; send printlistPort addCallback psResizeScrollbar + +proc psScrollPrintlist {widget cbtype pos} { + global psScrollHeight + send printlist set y [expr -int($psScrollHeight * $pos)] +}; send printlistScroll addCallback psScrollPrintlist scroll + +proc psSelectPrint {widget cbtype selections indices} { + global printerlist + foreach selection $selections { + send client setPrintOption printername $selection + } +}; send printlist addCallback psSelectPrint + + +proc printQuit { args } { + send print_panel unmap +} ; send donePrint addCallback printQuit + +proc Print { args } { + global winWidth winHeight + send imagewin setCursorType busy + + # Get the print command or file template if not previous reset. + set val [ send printcmd get string ] + if [send toFile get on] { + send client setPrintOption printfile $val + } else { + send client setPrintOption printcmd $val + } + setPrintCorners 0 [expr $winWidth - 1] [expr $winHeight - 1] 0 + + send client print + send imagewin setCursorType idle +} ; send okayPrint addCallback Print + + +# setPrintCorners -- Tell the client the WCS of the image being printed. + +proc setPrintCorners { lx ly ux uy args } { + global winWidth winHeight + + # Convert raw corner screen coordinates to frame buffer raster coords. + send imagewin unmapPixel $lx $ly raster llx lly + set llx [expr "int ($llx)"] + set lly [expr "int ($lly)"] + set str [send client encodewcs $llx $lly] + scan $str "%g %g %g" llx_r lly_r z + set llx_i [expr "int ($llx_r)"] + set lly_i [expr "int ($lly_r)"] + + send imagewin unmapPixel $ux $uy raster urx ury + set urx [expr "int ($urx)"] + set ury [expr "int ($ury)"] + set str [send client encodewcs $urx $ury] + scan $str "%g %g %g" urx_r ury_r z + set urx_i [expr "int ($urx_r)"] + set ury_i [expr "int ($ury_r)"] + + send client setPrintOption corners $llx_i $lly_i $urx_i $ury_i +} + + +#-------------------------- +# Save panel functions. +#-------------------------- +# Global variables needed for the save setup panel + +set format rasButton +set saveColor svPseudoButton + +set fileFmtButtons { + rasButton gifButton jpegButton tiffButton + fitsButton x11Button pnmButton rawButton +} + + +# Format group procedures. +#--------------------------------- + +# Select a format. + +proc set_format { widget func state args } { + global format saveColor + + send $format set on false + if {$widget == $format} { + send $widget set on true + } else { + switch $widget { + rasButton { send client setSaveOption format ras } + gifButton { send client setSaveOption format gif } + jpegButton { send client setSaveOption format jpeg } + tiffButton { send client setSaveOption format tiff } + fitsButton { send client setSaveOption format fits } + x11Button { send client setSaveOption format x11 } + pnmButton { send client setSaveOption format pnm } + rawButton { send client setSaveOption format raw } + } + } +} ; foreach fmt $fileFmtButtons { send $fmt addCallback set_format } + +proc setSaveFile { widget cbtype args } { + send client setSaveOption fname $args + send saveStatus set label [format "output file set to %s" $args] +}; send saveFile addCallback setSaveFile + + +proc doSaveOptions { param old new } { + global format saveColor + global warnings + + send saveStatus set label {} + set val [join [lrange $new 1 end] " "] + + #print [format "doSaveOptions %s = %s" [lindex $new 0] $val] + switch [lindex $new 0] { + format { + # Now (de)sensitize the color options depending on the format, + # force the color choice when needed. + send $format set on false + switch [lindex $val 0] { + ras { #send svRGBButton setSensitive false + send svPseudoButton setSensitive true + set format rasButton + } + gif { send svRGBButton setSensitive false + send svPseudoButton setSensitive true + if {$saveColor == "svRGBButton"} { + send $saveColor set on false + send svPseudoButton set on true + set saveColor svPseudoButton + } + set format gifButton + } + jpeg { send svRGBButton setSensitive true + send svPseudoButton setSensitive true + set format jpegButton + } + tiff { send svRGBButton setSensitive false + send svPseudoButton setSensitive true + set format tiffButton + } + fits { send svRGBButton setSensitive false + send svPseudoButton setSensitive false + send $saveColor set on false + send svGrayButton set on true + set saveColor svGrayButton + set format fitsButton + } + x11 { send svRGBButton setSensitive true + send svPseudoButton setSensitive true + set format x11Button + } + pnm { send svRGBButton setSensitive true + send svPseudoButton setSensitive true + set format pnmButton + } + raw { send svRGBButton setSensitive true + send svPseudoButton setSensitive true + set format rawButton + } + } + send $format set on true + } + color { send $saveColor set on false + switch [lindex $val 0] { + grayscale { send svGrayButton set on true + set saveColor svGrayButton + } + pseudocolor { send svPseudoButton set on true + set saveColor svPseudoButton + } + rgb { send svRGBButton set on true + set saveColor svRGBButton + } + } + } + fname { send saveFile set string $val + } + status { send saveStatus set label $val + send server synchronize + } + text { send saveData set label $val + } + warning { if {$warnings} { Wexec server $val } + } + } +} ; send saveOptions addCallback doSaveOptions + + +# Color group procedures. +#--------------------------------- +send svGrayButton addCallback "send client setSaveOption color grayscale" +send svPseudoButton addCallback "send client setSaveOption color pseudocolor" +send svRGBButton addCallback "send client setSaveOption color rgb" + +send doneSave addCallback "send save_panel unmap" + +proc Save { args } { + send imagewin setCursorType busy + + # Get the print command or file template if not previous reset. + set val [ send saveFile get string ] + send client setSaveOption fname $val + send saveStatus set label [format "output file set to %s" $args] + + send client save + send imagewin setCursorType idle + #send save_panel unmap +} ; send okaySave addCallback Save + + +# ------------------------------------------ +# Image and objects list display and section +# ------------------------------------------ + +set load_frame 1 + +proc filesTextHighlight { widget event args } { + if { $event == "enterNotify" } { + send $widget set displayCaret True + } elseif { $event == "leaveNotify" } { + send $widget set displayCaret False + } +} +send imtemplateText addEventHandler filesTextHighlight enterWindowMask +send imtemplateText addEventHandler filesTextHighlight leaveWindowMask +send fnameText addEventHandler filesTextHighlight enterWindowMask +send fnameText addEventHandler filesTextHighlight leaveWindowMask + +send rootButton addCallback "send client setLoadOption root" +send homeButton addCallback "send client setLoadOption home" +send upButton addCallback "send client setLoadOption up" +send rescanButton addCallback "send client setLoadOption rescan" + +proc setPattern { widget mode pattern args } { + send client setLoadOption pattern $pattern +} ; send imtemplateText addCallback setPattern + +proc doLoadOptions { param old new } { + global warnings loadP_up + + set val [ join [lrange $new 1 end] " " ] + + #print [format "doLoadOptions %s = %s" [lindex $new 0] $val] + switch [lindex $new 0] { + pattern { send imtemplateText set string [format "%s" $val ] } + curdir { send dirLabel set label [format "Directory: %s" $val ] } + newfile { send fnameText set string $val + if { [ string last / $val ] < 0 } { + if { [send browseToggle get on] == 0 } { + send load_panel unmap + set loadP_up 0 + } + } + } + status { send filesStatus set label $val + if { ! $loadP_up } { send imageTitle set label $val } + send server synchronize + } + warning { if {$warnings} { Wexec server $val } } + gray { send grayToggle set on $val } + } +} ; send loadOptions addCallback doLoadOptions + +proc toggleGraymap { widget args } { + send client setLoadOption gray [ send grayToggle get on ] +} ; send grayToggle addCallback toggleGraymap + +proc fileLoad { widget mode fname args } { + global load_frame loadP_up + send imagewin setCursorType busy + send client load $fname $load_frame + set fpath [format "%s/%s" \ + [string range [send dirLabel get label] 12 end] \ + $fname ] + if { [ string last / $fname ] < 0 && [ file isfile $fpath] == 1 } { + if { [send browseToggle get on] == 0 } { + send load_panel unmap + set loadP_up 0 + } + } + send imagewin setCursorType idle +} ; send fnameText addCallback fileLoad + + +set imlistScrollheight 0 + +proc setFileList {param old new} { + send imageList setList $new resize +}; send filelist addCallback setFileList + +proc flresizeScrollbar { widget cbtype flags x y w h cw ch } { + global imlistScrollheight + set newheight [expr $ch - $h] + if { $newheight != $imlistScrollheight } { + send imlistScrollbar setScrollbar 0.0 [expr double($h) / $ch] + set imlistScrollheight $newheight + } +} ; send imlistPorthole addCallback flresizeScrollbar + +proc flscrollList { widget cbtype pos } { + global imlistScrollheight + send imageList set y [expr -int($imlistScrollheight * $pos)] +} ; send imlistScrollbar addCallback flscrollList scroll + +proc flSelectPrint {widget cbtype selections args} { + global load_frame loadP_up + foreach selection $selections { + send client load $selection $load_frame + if { [ string last / $selection ] < 0 } { + if { [send browseToggle get on] == 0 } { + send load_panel unmap + set loadP_up 0 + } + } + } +}; send imageList addCallback flSelectPrint + +proc fileSetFrame {widget args} { + global nframes load_frame + + set frame [send $widget get label] + if {$frame == $nframes} { + set frame 1 + } else { + incr frame + } + send $widget set label $frame + set load_frame $frame +}; send frameFrame addCallback fileSetFrame + +proc fileLoadB args { + global load_frame loadP_up + send imagewin setCursorType busy + set fname [send fnameText get string] + if {$fname == ""} { + Wexec client "No image name specified" + } else { + send client load $fname $load_frame + set fpath [format "%s/%s" \ + [string range [send dirLabel get label] 12 end] \ + $fname ] + if { [ string last / $fname ] < 0 && [ file isfile $fpath] == 1 } { + if { [send browseToggle get on] == 0 } { + send load_panel unmap + set loadP_up 0 + } + } + send imagewin setCursorType idle + } +} ; send filesLoadButton addCallback fileLoadB + +proc fileQuit args { + send load_panel unmap + set loadP_up 0 +} ; send filesCloseButton addCallback fileQuit + + +# More Panel toggles + +proc infoPanel args { + global infoP_up + if {$infoP_up} { + send info unmap + set infoP_up 0 + } else { + send info map + set infoP_up 1 + } +} + +proc pannerPanel args { + global panner_enable + setPanner [expr !$panner_enable] +} + +proc magnifierPanel args { + global magnifier_enable + setMagnifier [expr !$magnifier_enable] +} + +proc wcsPanel args { + global track_enable + setTrack [expr !$track_enable] +} + +proc loadPanel args { + global loadP_up + if {$loadP_up} { + send load_panel unmap + set loadP_up 0 + } else { + send client setLoadOption rescan + send load_panel map + set loadP_up 1 + } +} + +proc savePanel args { + global saveP_up + if {$saveP_up} { + send save_panel unmap + set saveP_up 0 + } else { + send save_panel map + set saveP_up 1 + } +} + +proc printPanel args { + global printP_up + if {$printP_up} { + send print_panel unmap + set printP_up 0 + } else { + send print_panel map + set printP_up 1 + } +} + + +#------------------------------------ +# Define procedure for the help panel +#------------------------------------ + +# Help Panel Bitmaps +#------------------- +createBitmap iraf_logo 45 45 { +0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, +0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, +0xff, 0x3f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xf0, 0xff, 0xff, 0xff, +0xff, 0x3f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xe0, 0xff, 0xff, 0xff, +0xff, 0x3f, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xc0, 0xff, 0xff, 0xff, +0xff, 0x3f, 0x80, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x80, 0xfc, 0xff, 0xff, +0xff, 0x3f, 0x84, 0xf8, 0xff, 0xff, 0xff, 0x1f, 0x84, 0xf4, 0xff, 0xff, +0xff, 0x1b, 0x04, 0x09, 0x00, 0xfc, 0xff, 0x11, 0x04, 0x11, 0xf8, 0xff, +0x7f, 0x10, 0x04, 0x21, 0xc0, 0xff, 0x1f, 0x10, 0x04, 0x41, 0xf0, 0xff, +0x00, 0x18, 0x04, 0x01, 0xe0, 0xff, 0x00, 0x18, 0x00, 0x81, 0xc0, 0xff, +0x00, 0x08, 0x00, 0x01, 0xe0, 0xff, 0x07, 0x08, 0x00, 0x01, 0xf1, 0xff, +0x1f, 0x08, 0x80, 0x21, 0xf0, 0xff, 0xff, 0x08, 0xc0, 0x41, 0xf4, 0xff, +0xff, 0x08, 0xc0, 0x41, 0xf8, 0xff, 0xff, 0x09, 0xc0, 0xc1, 0xf0, 0xff, +0xff, 0x0b, 0x80, 0xc1, 0xf1, 0xff, 0xff, 0x07, 0x80, 0x81, 0xe1, 0xff, +0xff, 0x07, 0x80, 0x01, 0xc1, 0xff, 0xff, 0x07, 0x00, 0x01, 0xc0, 0xff, +0xff, 0x07, 0xc2, 0x05, 0x81, 0xff, 0xff, 0x07, 0xf2, 0x07, 0x81, 0xff, +0xff, 0x07, 0xf2, 0x17, 0x03, 0xff, 0xff, 0x03, 0xfa, 0x7f, 0x02, 0xfe, +0xff, 0x03, 0xfe, 0xff, 0x02, 0xfe, 0xff, 0x03, 0xfe, 0xff, 0x03, 0xfc, +0xff, 0x03, 0xff, 0xff, 0x07, 0xfc, 0xff, 0x83, 0xff, 0xff, 0x0f, 0xf8, +0xff, 0xc1, 0xff, 0xff, 0x3f, 0xf0, 0xff, 0xe1, 0xff, 0xff, 0x7f, 0xf8, +0xff, 0xf1, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xe0, +0xff, 0xf8, 0xff, 0xff, 0xff, 0xe3, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xe7, +0xff, 0xfc, 0xff, 0xff, 0xff, 0xef}; send helpIRAFLogo "set bitmap iraf_logo" + +createBitmap noao_logo 45 45 { +0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xfe, 0xff, 0xff, +0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, +0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, +0xff, 0x7f, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, +0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, +0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x03, 0xfe, 0xff, 0xff, +0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, +0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, +0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, +0xff, 0xff, 0x03, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x03, 0xfe, 0xff, 0xff, +0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, +0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xf0, 0xff, 0xff, +0xff, 0x7f, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xe0, 0xff, 0xff, +0xff, 0x3f, 0x00, 0xe0, 0xff, 0xff, 0xff, 0x1f, 0x00, 0xc0, 0xff, 0xff, +0xff, 0x1f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x80, 0xff, 0xff, +0xff, 0x0f, 0x00, 0x80, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, +0xff, 0x03, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfe, 0xff, +0xff, 0x01, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x01, 0x00, 0x00, 0xfc, 0xff, +0xff, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x00, 0xf8, 0xff, +0x7f, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xf0, 0xff, +0x3f, 0x00, 0x00, 0x00, 0xe0, 0xff}; send helpNOAOLogo "set bitmap noao_logo" + +# Stuff for keeping track of visited anchors. +set links { 0 } +set linkIndex 0 +set visited(0) empty + +send helpInfo1 set label $version + +proc Help args { + global helpP_up + if {$helpP_up == 0} { + send client help + } else { + send help_panel unmap + set helpP_up 0 + } +} + +proc helpPanel args { + global helpP_up + if {$helpP_up} { + send help_panel unmap + set helpP_up 0 + } else { + send help_panel map + set helpP_up 1 + } +} + +proc helpQuit args { + global helpP_up + send help_panel unmap + set helpP_up 0 + send helpButton set state 0 + send helpText setText "" +}; send helpClose addCallback helpQuit + +proc getHelpText { param old new } { + send helpText setText $new + helpPanel +}; send help addCallback getHelpText + +proc anchorSelected {widget cbtype event text href args} { + global visited links linkIndex + set anchID [send helpText anchorToId $href] + set visited($href) 1 + if {$linkIndex == 0} { + send helpBack set sensitive True + if {[lindex $links 1] != $anchID} { + set links { 0 } + send helpForward set sensitive False + } + } + if {$linkIndex > 0 && [lindex $links [expr $linkIndex + 1]] != $anchID} { + set links [lrange $links 0 $linkIndex] + } + if {[lindex $links [expr $linkIndex + 1]] != $anchID} { + lappend links $anchID + incr linkIndex + } else { + send helpForward set sensitive False + incr linkIndex + } + if {$linkIndex == [expr [llength $links] - 1]} { + send helpForward set sensitive False + } + send helpText gotoId $anchID + send helpText retestAnchors +}; send helpText addCallback anchorSelected anchor + +proc testAnchor {widget cbtype href} { + global visited + return [info exists visited($href)] +}; send helpText addCallback testAnchor testAnchor + + +# Callbacks to position forwards and backwards in link list. +proc hlpForward args { + global links linkIndex + incr linkIndex + if {$linkIndex <= [llength $links]} { + set anchID [lindex $links $linkIndex] + send helpText gotoId $anchID + send helpText retestAnchors + if {$linkIndex == [expr [llength $links] - 1]} { + send helpForward set sensitive False + send helpBack set sensitive True + } else { + send helpBack set sensitive True + } + } else { + incr linkIndex -1 + } +}; send helpForward addCallback hlpForward + +proc hlpBack args { + global links linkIndex + incr linkIndex -1 + if {$linkIndex >= 0} { + set anchID [lindex $links $linkIndex] + send helpText gotoId $anchID + send helpText retestAnchors + if {$linkIndex == 0} { send helpBack set sensitive False } + if {$linkIndex >= 0} { send helpForward set sensitive True } + } else { + incr linkIndex 1 + } +}; send helpBack addCallback hlpBack + +proc hlpHome args { + global links linkIndex + set links { 0 } + set linkIndex 0 + send helpText gotoId 0 + send helpForward set sensitive False + send helpBack set sensitive False +}; send helpHome addCallback hlpHome + + + +#------------------------------------ +# Define some TCL debug procedures. +#------------------------------------ + +set tclP_up 0 + +proc tclCommandClear {widget args} { send tclEntry set string "" } +proc tclCommandExecute {widget args} { send server [send tclEntry {get string}] +} +proc tclCommand {widget mode command args} { send server $command } +proc tclClose {widget args} { send tclShell unmap } +proc tclOpen { args } { + global tclP_up + send tclShell map + set tclP_up 1 +} + +proc tclPanel args { + global tclP_up + if {$tclP_up} { + send tclShell unmap + set tclP_up 0 + } else { + send tclShell map + set tclP_up 1 + } +} + +send tclClear addCallback tclCommandClear +send tclExecute addCallback tclCommandExecute +send tclEntry addCallback tclCommand +send tclcloseButton addCallback tclClose + diff --git a/vendor/x11iraf/ximtool/OLD/ximtool-mag.c b/vendor/x11iraf/ximtool/OLD/ximtool-mag.c new file mode 100644 index 00000000..142a99fc --- /dev/null +++ b/vendor/x11iraf/ximtool/OLD/ximtool-mag.c @@ -0,0 +1,419 @@ +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <X11/Intrinsic.h> +#include <X11/StringDefs.h> +#include <Obm.h> + +#define XIMTOOL_MAIN +#include "ximtool.h" + +/* + * XIMTOOL -- X11 based image display server and standalone image display + * client. This program is based on the IRAF prototype widget server (object + * manager library or OBM) and the gterm-image widget. + */ + +/* Compatibility hacks. */ +#ifdef AUX +void *memmove(a,b,n) void *a; const void *b; size_t n; { bcopy(b,a,n); } +#else +#if defined(sun) && !defined(SYSV) +void *memmove(a,b,n) void *a, *b; int n; { bcopy(b,a,n); } +#endif +#endif + +/* Data. */ +XtAppContext app_context; +static char server[] = "server"; + +/* The builtin default GUI. */ +char *defgui_text[] = { +# include "ximtool.gui.h" + NULL +}; + + + +/* MAIN -- XImtool main program. This is the only ximtool routine containing + * window system specific code. + */ +main (argc, argv) +int argc; +char *argv[]; +{ + register XimDataPtr xim = &ximtool_data; + register int i; + XtPointer obm; + char **sv_argv, *init_file = NULL, *str; + int sv_argc, ncolors, base; + + + /* Process the command line arguments. Scan the arglist first to see + * if we're requesting help or a printout of the default GUI, if so + * print these out and exit. + */ + if (argc > 1) { + if (strcmp (argv[1], "-help") == 0) { + Usage (); + exit (-1); + + } else if (strcmp (argv[1], "-defgui") == 0) { + register int i; + for (i=0; defgui_text[i]; i++) + printf ("%s\n", defgui_text[i]); + exit (0); + } + } + + + /* Loop over the command line options and preprocess the ones that + * are widget/GUI resources we want to make available more easily. + * To do this we'll tweak the argument list so it appears to be a + * "-xrm" resource setting, this means the X initialization code + * below will do all the real work. + */ + for (i=1; i < argc; i++) { + + if (strcmp (argv[i], "-cmapName") == 0) { + str = argv[++i]; + strcpy (argv[i-1], "-xrm\0"); + argv[i] = (char *) malloc (256); + sprintf (argv[i], "XImtool*cmapName:%s\0", str); + + } else if (strcmp (argv[i], "-maxColors") == 0) { + ncolors = atoi (argv[++i]); + ncolors = max (32, min (201, ncolors)); + strcpy (argv[i-1], "-xrm\0"); + argv[i] = (char *) malloc (256); + sprintf (argv[i], "XImtool*maxColors:%d\0", ncolors); + + } else if (strcmp (argv[i], "-basePixel") == 0) { + base = atoi (argv[++i]); + strcpy (argv[i-1], "-xrm\0"); + argv[i] = (char *) malloc (256); + sprintf (argv[i], "XImtool*basePixel:%d", base); + + } else if (strcmp (argv[i], "-cmapInitialize") == 0) { + str = argv[++i]; + strcpy (argv[i-1], "-xrm\0"); + argv[i] = (char *) malloc (256); + sprintf (argv[i], "XImtool*cmapInitialize:%s", str); + + } else if (strcmp (argv[i], "-displayPanner") == 0) { + str = argv[++i]; + strcpy (argv[i-1], "-xrm\0"); + argv[i] = (char *) malloc (256); + sprintf (argv[i], "XImtool*displayPanner:%s", str); + + } else if (strcmp (argv[i], "-displayMagnifier") == 0) { + str = argv[++i]; + strcpy (argv[i-1], "-xrm\0"); + argv[i] = (char *) malloc (256); + sprintf (argv[i], "XImtool*displayMagnifier:%s", str); + + } else if (strcmp (argv[i], "-displayCoords") == 0) { + str = argv[++i]; + strcpy (argv[i-1], "-xrm\0"); + argv[i] = (char *) malloc (256); + sprintf (argv[i], "XImtool*displayCoords:%s", str); + + } else if (strcmp (argv[i], "-printConfig") == 0) { + str = argv[++i]; + strcpy (argv[i-1], "-xrm\0"); + argv[i] = (char *) malloc (256); + sprintf (argv[i], "XImtool*printConfig:%s", str); + } + } + + /* Get local copy of argc and argv. */ + if ((sv_argc = argc) > 0) { + sv_argv = (char **) XtMalloc (argc * sizeof(char *)); + memmove (sv_argv, argv, argc * sizeof(char *)); + } else + sv_argv = argv; + + /* Initialize applications context. We don't use the top level + * shell created here, but we need to deal with it in order to + * get the application resources. The object manager opens its own + * connection to the display server and manages a separate window + * hierarchy with its own top level shell. + */ + xim->toplevel = XtAppInitialize (&app_context, "XImtool", + (XrmOptionDescList) NULL, 0, &sv_argc, sv_argv, + (String *) NULL, (ArgList) NULL, 0); + + /* Free saved arglist. */ + free ((char *)sv_argv); + + /* Get application resources. */ + XtVaGetApplicationResources (xim->toplevel, xim, + resources, XtNumber(resources), + /* Add any resource overrides here */ + NULL); + + /* Initialize the object manager. */ + xim->obm = obm = (XtPointer) ObmOpen (app_context, argc, argv); + ObmAddCallback (obm, OBMCB_setGterm|OBMCB_preserve, xim_reset, + (XtPointer)xim); + + + /* Loop over the command line options. The default xim structure + * should be defined at this point so the command options can be + * used to override them. + */ + for (i=1; i < argc; i++) { + + /* Anything without a '-' is a file name to load at startup. + * Only use the first name defined. + */ + if (argv[i][0] != '-') { /* File name */ + if (!init_file) { + init_file = argv[i]; + if (access (init_file, R_OK) < 0) { + fprintf (stderr, "%s: File does not exist: '%s'\n", + argv[0], init_file); + exit (-1); + } + } + + } else if (strcmp (argv[i], "-gui") == 0) { + xim->gui = argv[++i]; + + } else if (strcmp (argv[i], "-cmap1") == 0) { + xim->userCMap1 = argv[++i]; + + } else if (strcmp (argv[i], "-cmap2") == 0) { + xim->userCMap2 = argv[++i]; + + } else if (strcmp (argv[i], "-cmapDir1") == 0) { + xim->userCMapDir1 = argv[++i]; + + } else if (strcmp (argv[i], "-cmapDir1") == 0) { + xim->userCMapDir2 = argv[++i]; + + } else if (strcmp (argv[i], "-imtoolrc") == 0) { + xim->imtoolrc = argv[++i]; + + } else if (strcmp (argv[i], "-memModel") == 0) { + xim->memModel = argv[++i]; + + } else if (strcmp (argv[i], "-config") == 0) { + xim->def_config = atoi (argv[++i]); + + } else if (strcmp (argv[i], "-nframes") == 0) { + i++; + xim->def_nframes = min (MAX_FRAMES, atoi (argv[i])); + + } else if (strcmp (argv[i], "-tile") == 0) { + xim->tileFrames++; + + } else if (strcmp (argv[i], "-invert") == 0) { + xim->invert++; + + } else if (strcmp (argv[i], "-fifo") == 0) { + xim->input_fifo = malloc (strlen (argv[++i]+2)); + xim->output_fifo = malloc (strlen (argv[i]+2)); + sprintf (xim->input_fifo, "%si", argv[i]); + sprintf (xim->output_fifo, "%so", argv[i]); + + } else if (strcmp (argv[i], "-port") == 0) { + if (xim->port != 0 ) + xim->port = atoi (argv[++i]); + else + i++; + + } else if (strcmp (argv[i], "-unix") == 0) { + if (strcmp ("none", xim->input_fifo) ) + xim->unixaddr = argv[++i]; + else + i++; + + } else if (strcmp (argv[i], "-fifo_only") == 0) { + xim->unixaddr = "none"; + xim->port = 0; + + } else if (strcmp (argv[i], "-inet_only") == 0 || + strcmp (argv[i], "-port_only") == 0 ) { + xim->input_fifo = ""; + xim->unixaddr = "none"; + + } else if (strcmp (argv[i], "-unix_only") == 0) { + xim->input_fifo = ""; + xim->port = 0; + + + /* Skip any standard X toolkit flags, they're handled above. + */ + } else if (strcmp (argv[i], "-bg") == 0) { + i++; + } else if (strcmp (argv[i], "-fg") == 0) { + i++; + } else if (strcmp (argv[i], "-iconic") == 0) { + ; + } else if (strcmp (argv[i], "-display") == 0) { + i++; + } else if (strcmp (argv[i], "-geometry") == 0) { + i++; + } else if (strcmp (argv[i], "-title") == 0) { + i++; + } else if (strcmp (argv[i], "-xrm") == 0) { + i++; + + } else { + fprintf (stderr, "Unrecognized flag '%s'\n", argv[i]); + Usage(); + exit (-1); + } + } + + + /* Initialize the ximtool/obm client code. */ + xim_clientOpen (xim); + + /* Load the Ximtool GUI. If the GUI name is "default" the builtin + * default GUI is used. This is stored as an array of text lines, + * which we must append newlines to and concatenate together to + * form the GUI message. + */ + if (strcmp (xim->gui, "default") == 0 || + (ObmDeliverMsgFromFile (obm, server, xim->gui) != 0)) { + + register char *ip, *op; + char *message; + int i; + + message = (char *) malloc (204800); + for (i=0, op=message; ip = defgui_text[i]; i++) { + while (*ip) + *op++ = *ip++; + *op++ = '\n'; + } + *op++ = '\0'; + + ObmDeliverMsg (obm, server, message); + free ((char *)message); + + } + + /* Activate the GUI. */ + ObmActivate (obm); + + /* Initialize the frame buffers and graphics pipeline. */ + xim_initialize (xim, xim->def_config, xim->def_nframes, 1); + + /* Listen for a client connection. */ + xim_iisopen (xim); + + /* Initialize the hardcopy option and printer configuration. */ + xim_initPrinterOps (xim); + + /* Open the file Load/Save structures. */ + xim_initLoad (xim); + xim_initSave (xim); + + /* Load a file at startup if it was defined. */ + if ( init_file != NULL ) + xim_loadFile (xim, init_file, 1); + + /* EXECUTE */ + XtAppMainLoop (app_context); + + xim_shutdown (xim); +} + + +/* XIM_SHUTDOWN -- Terminate ximtool. + */ +xim_shutdown (xim) +register XimDataPtr xim; +{ + eps_close (xim->psim); + xim_loadClose (xim); + xim_saveClose (xim); + xim_clientClose (xim); + xim_iisclose (xim); + xim_close (xim); + ObmClose (xim->obm); + exit (0); +} + + +/* XIM_ADDINPUT -- Register a procedure to be called when there is input + * to be processed on the given input source. The ximtool code doesn't + * talk to X directly so we need to provide this interface routine. + */ +XtPointer +xim_addInput (xim, input, proc, client_data) +register XimDataPtr xim; +int input; +void (*proc)(); +XtPointer client_data; +{ + return ((XtPointer) XtAppAddInput (app_context, input, + (XtPointer)XtInputReadMask, *proc, client_data)); +} + + +/* XIM_REMOVEINPUT -- Remove a callback previously posted with xim_addInput. + */ +void +xim_removeInput (xim, id) +register XimDataPtr xim; +XtPointer id; +{ + XtRemoveInput ((XtInputId)id); +} + + +/* USAGE -- Print a list of command-line options. + */ +Usage () +{ + fprintf (stderr, "Usage:\n\n"); + printoption (" ximtool"); + printoption ("[-basePixel <num>]"); /* base cmap pixel */ + printoption ("[-cmap1 <file>]"); /* User cmap 1 */ + printoption ("[-cmap2 <file>]"); /* User cmap 2 */ + printoption ("[-cmapDir1 <dir>]"); /* User cmapDir 1 */ + printoption ("[-cmapDir1 <dir>]"); /* User cmapDir 2 */ + printoption ("[-cmapInitialize <bool>]"); /* initialize colormap */ + printoption ("[-cmapName <name>]"); /* colormap name */ + printoption ("[-config <num>]"); /* initial config */ + printoption ("[-defgui]"); /* Print default GUI */ + printoption ("[-displayPanner <bool>]"); /* display panner box */ + printoption ("[-displayMagnifier <bool>]"); /* display magnifier */ + printoption ("[-displayCoords <bool>]"); /* display coords box */ + printoption ("[-fifo <pipe>]"); /* fifo pipe */ + printoption ("[-fifo_only]"); /* use fifo only */ + printoption ("[-gui <file>]"); /* GUI file */ + printoption ("[-help]"); /* Print help */ + printoption ("[-imtoolrc <file>]"); /* fbconfig file */ + printoption ("[-inet_only | -port_only]"); /* use inet only */ + printoption ("[-invert]"); /* invert colormap */ + printoption ("[-maxColors <num>]"); /* # of colors */ + printoption ("[-memModel <type>]"); /* memory model */ + printoption ("[-nframes <num>]"); /* # of frames */ + printoption ("[-port <num>]"); /* inet port */ + printoption ("[-printConfig <name>]"); /* printer config file */ + printoption ("[-tile]"); /* tile frames */ + printoption ("[-unix <name>]"); /* unix socket */ + printoption ("[-unix_only]"); /* use unix only */ + printoption ("[<file>]"); /* file to load */ + fprintf (stderr,"\n"); +} + + +/* PRINTOPTION -- Pretty-print an option string. + */ +static int cpos = 0; +printoption(st) +char *st; +{ + if (strlen(st) + cpos > 78) { + fprintf (stderr,"\n\t"); + cpos = 8; + } + fprintf (stderr,"%s ",st); + cpos = cpos + strlen(st) + 1; +} diff --git a/vendor/x11iraf/ximtool/OLD/ximtool-mag.gui b/vendor/x11iraf/ximtool/OLD/ximtool-mag.gui new file mode 100644 index 00000000..19167e6e --- /dev/null +++ b/vendor/x11iraf/ximtool/OLD/ximtool-mag.gui @@ -0,0 +1,5388 @@ +#!/usr/local/bin/obmsh +# +# XIMTOOL-MAG.GUI -- Default GUI for the Ximtool-mag image display server. +# +# Version 1.2 -- Released 4/30/2000 + + +reset-server +appInitialize ximtool XImtool { + *objects:\ + toplevel Layout display \ + display Layout menubar \ + menubar MenuButton fileButton \ + menubar MenuButton viewButton \ + menubar MenuButton optionsButton \ + menubar TextBox imageTitle \ + menubar Toggle panelButton \ + menubar Toggle xflipButton \ + menubar Toggle yflipButton \ + menubar Command prevButton \ + menubar MenuButton frameButton \ + menubar Command nextButton \ + menubar Toggle helpButton \ + display Gterm imagewin \ + display Gterm colorbar \ +\ + toplevel TopLevelShell info \ + info Paned infoPanel \ + infoPanel Box infoBox \ + infoBox Command infoDone \ + infoBox Command infoDown \ + infoBox Command infoUp \ + infoBox Command infoSave \ + infoBox Command infoUpdate \ + infoBox Command infoClear \ + infoPanel AsciiText infoText \ +\ + toplevel TopLevelShell controlShell \ + controlShell Layout controlPanel \ + controlPanel Group viewBox \ + controlPanel Group enhancementBox \ + controlPanel Group blinkBox \ + controlPanel Group optionsBox \ + controlPanel Frame controlBox \ +\ + viewBox Layout view \ + view Group frameSelect \ + frameSelect Layout frameBox \ + frameBox TextToggle frame1 \ + frameBox TextToggle frame2 \ + frameBox TextToggle frame3 \ + frameBox TextToggle frame4 \ + frameBox Command prevFrame \ + frameBox Command nextFrame \ + view Frame frameDataBox \ + frameDataBox TextBox frameData \ + view Group zoomBox \ + zoomBox Layout zoom \ + zoom TextButton toggleZoom \ + zoom TextButton zoomIn \ + zoom Command x1 \ + zoom Command z2 \ + zoom Command z3 \ + zoom Command z4 \ + zoom Command z5 \ + zoom Command z8 \ + zoom TextButton zoomOut \ + zoom TextButton centerFrame \ + zoom Command d2 \ + zoom Command d3 \ + zoom Command d4 \ + zoom Command d5 \ + zoom Command d8 \ + view Layout viewButtons \ + viewButtons Command aspect \ + viewButtons Command flipX \ + viewButtons Command flipY \ + viewButtons Command flipXY \ + viewButtons Command clearFrame \ + viewButtons Command fitFrame \ +\ + enhancementBox Layout enhance \ + enhance Scrollbar2 colorlistScroll \ + enhance Frame colorlistFrame \ + colorlistFrame Porthole colorlistPort \ + colorlistPort MultiList colorlist \ + enhance Frame colordataFrame \ + colordataFrame TextBox colordata \ + enhance Label contrastLabel \ + enhance Slider2d contrastSlider \ + enhance Label brightnessLabel \ + enhance Slider2d brightnessSlider \ + enhance Command invertButton \ + enhance Command optimizeButton \ +\ + blinkBox Layout blink \ + blink Label blinkFramesLabel \ + blink Command blinkFrame1 \ + blink Command blinkFrame2 \ + blink Command blinkFrame3 \ + blink Command blinkFrame4 \ + blink Command blinkReset \ + blink Label blinkRateLabel \ + blink Frame BRframe \ + BRframe Layout BRlayout \ + BRlayout Arrow BRdecrease \ + BRlayout TextBox BRtext \ + BRlayout Arrow BRincrease \ + blink Command registerButton \ + blink Command matchButton \ + blink Toggle blinkButton \ +\ + optionsBox TextToggle pannerButton \ + optionsBox TextToggle magnifierButton \ + optionsBox TextToggle coordsBoxButton \ + optionsBox TextToggle autoscaleButton \ + optionsBox TextToggle antialiasButton \ + optionsBox TextToggle tileFramesButton \ + optionsBox TextToggle warningsButton \ +\ + controlBox Layout control \ + control Command initializeButton \ + control Command normalizeButton \ + control Command doneButton \ +\ + toplevel TopLevelShell tclShell\ + tclShell Paned tclPanel\ + tclPanel Box tclForm\ + tclForm Label tclLabel\ + tclForm Command tclClear\ + tclForm Command tclExecute\ + tclForm Command tclcloseButton\ + tclPanel AsciiText tclEntry\ +\ + toplevel TransientShell warning \ + warning Layout warn \ + warn Frame warnFrame \ + warnFrame Layout WFlayout \ + WFlayout Icon warnIcon \ + WFlayout TextBox warnText \ + warn TextButton warnOk \ + warn TextButton warnCancel \ + warn TextButton warnHelp \ +\ + toplevel TopLevelShell print_panel\ + print_panel Layout printLayout\ +\ + printLayout Group printCmdGroup\ + printLayout Group optGroup\ + printLayout Group cmdGroup\ +\ + printCmdGroup Layout printCmdLayout\ + printCmdLayout Layout labelLayout\ + labelLayout Label toLabel\ + labelLayout Label printerLabel\ + printCmdLayout Layout inputLayout\ + inputLayout TextToggle toPrinter\ + inputLayout TextToggle toFile\ + inputLayout Frame printcmdFrame\ + printcmdFrame AsciiText printcmd\ +\ + optGroup Layout optLayout\ + optLayout Group epsPageGroup\ + optLayout Group optionsGroup\ + optLayout Group printColorGroup\ + optLayout Group printerGroup\ +\ + epsPageGroup Layout epsPage\ + epsPage Label epsOrientLabel\ + epsPage TextToggle epsPortButton\ + epsPage TextToggle epsLandButton\ + epsPage Label epsSizeLabel\ + epsPage TextToggle epsLetterButton\ + epsPage TextToggle epsLegalButton\ + epsPage TextToggle epsA4Button\ + epsPage Label epsScaleLabel\ + epsPage Frame ScaleFrame \ + ScaleFrame Layout ScaleLayout \ + ScaleLayout Arrow SCdecrease \ + ScaleLayout TextBox SCtext \ + ScaleLayout Arrow SCincrease \ +\ + optionsGroup Layout options\ + options TextToggle epsscaleButton\ + options TextToggle autorotateButton\ + options TextToggle aspectButton\ + options TextToggle annotateButton\ + options TextToggle compressButton\ +\ + printColorGroup Layout printColor\ + printColor TextToggle prGrayButton\ + printColor TextToggle prPseudoButton\ + printColor TextToggle prRGBButton\ +\ + printerGroup Layout printers \ + printers Scrollbar2 printlistScroll \ + printers Frame printlistFrame \ + printlistFrame Porthole printlistPort \ + printlistPort MultiList printlist \ +\ + cmdGroup Layout cmdLayout\ + cmdLayout TextButton okayPrint\ + cmdLayout Label printStatus\ + cmdLayout TextButton donePrint\ +\ + toplevel TopLevelShell save_panel\ + save_panel Layout saveLayout\ +\ + saveLayout Group saveNameGroup\ + saveLayout Group saveOptGroup\ + saveLayout Group saveCmdGroup\ +\ + saveNameGroup Layout saveNameLayout\ + saveNameLayout Label saveLabel\ + saveNameLayout Frame fnameFrame\ + fnameFrame AsciiText saveFile\ +\ + saveOptGroup Layout saveOptLayout\ + saveOptLayout Group fmtGroup\ + saveOptLayout Group saveColorGroup\ + saveOptLayout Frame saveDataBox \ + saveDataBox TextBox saveData \ +\ + fmtGroup Layout formats\ + formats TextToggle rasButton\ + formats TextToggle gifButton\ + formats TextToggle jpegButton\ + formats TextToggle tiffButton\ + formats TextToggle fitsButton\ + formats TextToggle x11Button\ + formats TextToggle pnmButton\ + formats TextToggle rawButton\ +\ + saveColorGroup Layout saveColor\ + saveColor TextToggle svGrayButton\ + saveColor TextToggle svPseudoButton\ + saveColor TextToggle svRGBButton\ +\ + saveCmdGroup Layout saveCmdLayout\ + saveCmdLayout TextButton okaySave\ + saveCmdLayout Label saveStatus\ + saveCmdLayout TextButton doneSave\ +\ + toplevel TopLevelShell load_panel \ + load_panel Layout filesLayout \ + filesLayout Group imagesGroup \ + imagesGroup Layout imagesLayout \ + imagesLayout Label imtemplateLabel \ + imagesLayout Frame imtemplateFrame \ + imtemplateFrame AsciiText imtemplateText \ + imagesLayout Scrollbar2 imlistScrollbar \ + imagesLayout Frame imlistFrame \ + imlistFrame Porthole imlistPorthole \ + imlistPorthole MultiList imageList \ + imagesLayout TextButton rootButton \ + imagesLayout TextButton homeButton \ + imagesLayout TextButton upButton \ + imagesLayout TextButton rescanButton \ + imagesLayout TextToggle grayToggle \ + imagesLayout TextToggle browseToggle \ + imagesLayout Label dirLabel \ + imagesLayout Label fnameLabel \ + imagesLayout Frame filnamFrame \ + imagesLayout Label frameLabel \ + imagesLayout Command frameFrame \ + filnamFrame AsciiText fnameText \ +\ + filesLayout Group fbuttonsGroup \ + fbuttonsGroup Layout fbuttonsLayout \ + fbuttonsLayout Command filesLoadButton \ + fbuttonsLayout Label filesStatus \ + fbuttonsLayout Command filesCloseButton \ +\ + toplevel TopLevelShell help_panel \ + help_panel Layout helpLayout \ + helpLayout Layout helpMenuLayout \ + helpLayout Layout helpInfoLayout \ +\ + helpMenuLayout Command helpBack \ + helpMenuLayout Command helpForward \ + helpMenuLayout Command helpHome \ + helpMenuLayout Command helpClose \ +\ + helpLayout Frame helpTextFrame\ + helpTextFrame HTML helpText \ +\ + helpInfoLayout Label helpIRAFLogo \ + helpInfoLayout Label helpInfo1 \ + helpInfoLayout Label helpInfo2 \ + helpInfoLayout Label helpInfo3 \ + helpInfoLayout Label helpNOAOLogo \ +\ + toplevel Parameter ximtool\ + ximtool Parameter alert\ + ximtool Parameter initialize\ + ximtool Parameter resize\ + ximtool Parameter frame\ + ximtool Parameter nframes\ + ximtool Parameter frameSize\ + ximtool Parameter frameRegion\ + ximtool Parameter frameView\ + ximtool Parameter frameTitle\ + ximtool Parameter frameFit\ + ximtool Parameter enhancement\ + ximtool Parameter colortables\ + ximtool Parameter autoscale\ + ximtool Parameter antialias\ + ximtool Parameter tileFrames\ + ximtool Parameter cursorMode\ + ximtool Parameter xflip\ + ximtool Parameter yflip\ + ximtool Parameter printerList\ + ximtool Parameter printOptions\ + ximtool Parameter loadOptions\ + ximtool Parameter saveOptions\ + ximtool Parameter filelist\ + ximtool Parameter help + + + ! Main image window resources. + ! ------------------------------- + *allowShellResize: True + *beNiceToColormap: False + *menuLabel.foreground: Gold + *markerMenu.foreground: Black + *markerMenu.background: SteelBlue + *markerMenu*SimpleMenu.foreground: Black + *markerMenu*SimpleMenu.background: SteelBlue + *markerColor.SmeBSB.leftMargin: 64 + *markerColor.SmeBSB.rightMargin: 0 + *markerColor.menuLabel.leftMargin: 5 + *markerColor.menuLabel.rightMargin: 5 + + *display.background: gray + *display.borderWidth: 0 + + *display.debug: False + *display.layout: horizontal { \ + -1 \ + vertical { \ + 3 \ + menubar < +inf -inf * > \ + 3 \ + imagewin < +inf -inf * +inf - inf > \ + 3 \ + colorbar < +inf -inf * > \ + } \ + -1 \ + } + + *menubar.layout: horizontal { \ + 1 < -1 > \ + fileButton 1 < -1 > viewButton 1 < -1 > optionsButton \ + 1 < -1 > \ + imageTitle < +inff -inff * > \ + 1 < -1 > \ + panelButton 1 < -1 > \ + 1 < -1 > \ + xflipButton 1 < -1 > yflipButton \ + 1 < -1 > \ + prevButton 1 < -1 > frameButton 1 < -1 > nextButton \ + 1 < -1 > \ + helpButton \ + 1 < -1 > \ + } + + *menubar*SimpleMenu.foreground: Black + *menubar*SimpleMenu.background: gray65 + *menubar*SimpleMenu.borderColor: Black + *menubar*SimpleMenu.borderWidth: 1 + *SmeBSB.vertSpace: 10 + + *SimpleMenu*font: -adobe-times-bold-r-normal-*-12-*-*-*-*-*-iso8859-1 + *fileButton.font: -adobe-times-bold-i-normal-*-12-*-*-*-*-*-iso8859-1 + *optionsButton.font: -adobe-times-bold-i-normal-*-12-*-*-*-*-*-iso8859-1 + *viewButton.font: -adobe-times-bold-i-normal-*-12-*-*-*-*-*-iso8859-1 + + *menubar.width: 512 + *menubar*background: gray + *menubar*foreground: black + *menubar*borderWidth: 0 + *menubar*Command.label: x + *menubar*Command.internalWidth: 0 + *menubar*Command.borderWidth: 0 + *menubar*Toggle.label: x + *menubar*Toggle.internalWidth: 0 + *menubar*Toggle.borderWidth: 0 + + *fileButton.label: File + *fileButton.menuName: fileMenu + *viewButton.label: View + *viewButton.menuName: viewMenu + *optionsButton.label: Options + *optionsButton.menuName: optionsMenu + *imageTitle*font: *times-bold-r*12* + *imageTitle.width: 40 + *imageTitle.height: 20 + *frameButton.menuName: frameMenu + *frameButton.label: 1 + *frameButton.width: 20 + + *Gterm.cmapName: image + *Gterm.basePixel: 64 + *imagewin.warpCursor: true + *imagewin.raiseWindow: true + *imagewin.deiconifyWindow: true + *imagewin.ginmodeCursor: circle + *imagewin.ginmodeBlinkInterval: 500 + *imagewin.resizable: true + *imagewin.copyOnResize: false + *imagewin.width: 512 + *imagewin.height: 512 + *imagewin.color8: #7c8498 + *imagewin.color9: steelblue + + *imagewin.translations: \ + None<Key>Left: call(move_cursor,-1,0) \n\ + None<Key>Down: call(move_cursor,0,1) \n\ + None<Key>Up: call(move_cursor,0,-1) \n\ + None<Key>Right: call(move_cursor,1,0) \n\ + !Shift <Key>Left: call(move_cursor,-10,0) \n\ + !Shift <Key>Down: call(move_cursor,0,10) \n\ + !Shift <Key>Up: call(move_cursor,0,-10) \n\ + !Shift <Key>Right: call(move_cursor,10,0) \n\ + !Ctrl <Key>h: call(move_cursor,-1,0) \n\ + !Ctrl <Key>j: call(move_cursor,0,1) \n\ + !Ctrl <Key>k: call(move_cursor,0,-1) \n\ + !Ctrl <Key>l: call(move_cursor,1,0) \n\ + !Ctrl Shift <Key>h: call(move_cursor,-10,0) \n\ + !Ctrl Shift <Key>j: call(move_cursor,0,10) \n\ + !Ctrl Shift <Key>k: call(move_cursor,0,-10) \n\ + !Ctrl Shift <Key>l: call(move_cursor,10,0) \n\ + !Alt <Key>1: call(cpSetFrame,frame1) \n\ + !Alt <Key>2: call(cpSetFrame,frame2) \n\ + !Alt <Key>3: call(cpSetFrame,frame3) \n\ + !Alt <Key>4: call(cpSetFrame,frame4) \n\ + !Ctrl <Key>1: call(cpZoom,1,1,fixed) \n\ + !Ctrl <Key>2: call(cpZoom,2,2,fixed) \n\ + !Ctrl <Key>3: call(cpZoom,3,3,fixed) \n\ + !Ctrl <Key>4: call(cpZoom,4,4,fixed) \n\ + !Ctrl <Key>5: call(cpZoom,5,5,fixed) \n\ + !Ctrl <Key>6: call(cpZoom,6,6,fixed) \n\ + !Ctrl <Key>7: call(cpZoom,7,7,fixed) \n\ + !Ctrl <Key>8: call(cpZoom,8,8,fixed) \n\ + !Ctrl <Key>9: call(cpZoom,9,9,fixed) \n\ + !Ctrl <Key>b: call(prevFrame,$name) \n\ + !Ctrl <Key>c: call(cpZoomAction,centerFrame) \n\ + !Ctrl <Key>f: call(nextFrame,$name) \n\ + !Ctrl <Key>i: call(cpInvert) \n\ + !Ctrl <Key>n: call(normalize) \n\ + !Ctrl <Key>m: call(toggleMagnifier) \n\ + !Ctrl <Key>p: call(togglePanner) \n\ + !Ctrl Alt <Key>q: call(Quit) \n\ + !Ctrl <Key>r: call(cpRegisterFrames) \n\ + !Ctrl <Key>s: call(cpMatchFrames) \n\ + !Ctrl <Key>t: call(tileFramesToggle) \n\ + !Ctrl <Key>u: call(cpZoom,1,1,fixed) \n\ + !Ctrl <Key>x: call(cpFrameAction,flipX) \n\ + !Ctrl <Key>y: call(cpFrameAction,flipY) \n\ + !Ctrl Alt <Key>=: call(Print) \n\ + Ctrl <Key>+: call(cpZoom,2.0,2.0,relative) \n\ + Ctrl <Key>-: call(cpZoom,0.5,0.5,relative) \n\ + Ctrl <Key>\<: call(cpSetBlinkRate,BRdecrease) \n\ + Ctrl <Key>\>: call(cpSetBlinkRate,BRincrease) \n\ + !Alt <Key>b: call(toggleBlink) \n\ + !Alt <Key>c: call(panel) \n\ + !Ctrl Alt <Key>f: call(fitFrame) \n\ + !Alt <Key>h: call(Help) \n\ + !Alt <Key>i: call(infoPanel) \n\ + !Alt <Key>l: call(loadPanel) \n\ + !Alt <Key>p: call(printPanel) \n\ + !Alt <Key>s: call(savePanel) \n\ + !Alt <Key>t: call(tclPanel) \n\ + !Shift<Btn1Down>: call(setDynamicMagnifier,1) \n\ + !Shift<Btn1Up>: call(setDynamicMagnifier,0) \n\ + !<Btn1Down>: call(makeMarker,$name,$x,$y) m_create() \n\ + !Shift <Btn2Down>: crosshair(on) \n\ + !Shift <Btn2Motion>: crosshair(on) \n\ + !Shift<Btn2Up>: crosshair(off) \n\ + !<Btn2Up>: crosshair(off) \n\ + !<Btn2Down>: call(zoom,$x,$y) \n\ + !<Btn3Down>: call(windowColormap,$x,$y) \n\ + !<Btn3Motion>: call(windowColormap,$x,$y) \n\ + <EnterWindow>: enter-window() \n\ + <LeaveWindow>: leave-window() \n\ + <KeyPress>: graphics-input() \n\ + <Motion>: track-cursor() call(wcsUpdate,$x,$y) call(magnifierMapImage,$x,$y) + +! The following translations can be used to enable windowing of the +! individual RGB components of the colormap. It's not very useful but +! included here for those that may wish to use it. +!-------------------------------------------------------------------------- +! !Ctrl <Btn1Down>: call(windowRGB,1,$x,$y,0) \n\ +! !Ctrl <Btn1Motion>: call(windowRGB,1,$x,$y,0) \n\ +! !Ctrl <Btn1Up>: call(windowRGB,1,$x,$y,1) \n\ +! !Ctrl <Btn2Down>: call(windowRGB,2,$x,$y,0) \n\ +! !Ctrl <Btn2Motion>: call(windowRGB,2,$x,$y,0) \n\ +! !Ctrl <Btn2Up>: call(windowRGB,2,$x,$y,1) \n\ +! !Ctrl <Btn3Down>: call(windowRGB,3,$x,$y,0) \n\ +! !Ctrl <Btn3Motion>: call(windowRGB,3,$x,$y,0) \n\ +! !Ctrl <Btn3Up>: call(windowRGB,3,$x,$y,1) \n\ + + *colorbar.maxRasters: 1 + *colorbar.maxMappings: 1 + *colorbar.width: 512 + *colorbar.height: 10 + + ! INFO box resources. + ! ------------------------------ + *info.geometry: 420x240 + *info.title: Information Panel + *info*Command.font: 7x13bold + *infoPanel*background: gray + *infoDone.label: Done + *infoDown.label: Down + *infoDown.sensitive: False + *infoUp.label: Up + *infoUp.sensitive: False + *infoSave.label: Save + *infoSave.sensitive: False + *infoUpdate.label: Update + *infoClear.label: Clear + *infoText*scrollVertical: always + *infoText*scrollHorizontal: whenNeeded + *infoText*displayCaret: False + *infoText*editType: append + *info*ScrollbarBackground: #c0c0c0 + *info*Scrollbar*background: #c0c0c0 + *info*Scrollbar*width: 17 + *info*Scrollbar*height: 17 + *info*Scrollbar*shadowWidth: 2 + *info*Scrollbar*cursorName: top_left_arrow + *info*Scrollbar*pushThumb: true + + + ! Main Control Panel. + ! ------------------------------ + *controlShell.title: XImtool Control + *controlShell.iconName: XimCon + *controlPanel*background: gray + *controlPanel*foreground: black + *controlPanel*TextBox.background: gray63 + *controlPanel*internalWidth: 0 + *controlPanel*borderWidth: 0 + *controlPanel*Command.highlightThickness: 0 + + *TextBox.font: 7x13bold + *TextToggle.font: -adobe-times-medium-r-normal-*-12-*-*-*-*-*-iso8859-1 + *Command.font: -adobe-times-medium-r-normal-*-12-*-*-*-*-*-iso8859-1 + *Toggle.font: -adobe-times-medium-r-normal-*-12-*-*-*-*-*-iso8859-1 + *Label.font: -*-helvetica-medium-r-normal-*-12-*-iso8859-1 + *MultiList.font: -adobe-times-medium-r-normal-*-12-*-*-*-*-*-iso8859-1 + *toggleZoom.font: -*-helvetica-medium-r-normal-*-12-*-iso8859-1 + *centerFrame.font: -*-helvetica-medium-r-normal-*-12-*-iso8859-1 + *zoom*Command.font: 7x13bold + *blinkFrame1.font: 7x13bold + *blinkFrame2.font: 7x13bold + *blinkFrame3.font: 7x13bold + *blinkFrame4.font: 7x13bold + + *controlPanel.debug: False + *controlPanel.layout: vertical { \ + 5 < -5 > \ + horizontal { \ + -1 \ + viewBox < +inf -inf * > \ + -1 \ + } \ + 5 < -5 > \ + horizontal { \ + -1 \ + enhancementBox < +inf -inf * +inf -inf > \ + -1 \ + vertical { \ + -1 \ + blinkBox < * +inf - inf > \ + 1 \ + optionsBox < * +inff -inff > \ + -1 \ + } \ + -1 \ + } \ + controlBox < +inf * > \ + } + + ! VIEW + ! ------------------ + *viewBox.label: View + *viewBox.location: 0 0 410 0 + *viewBox.shrinkToFit: True + *viewBox.outerOffset: 5 + + *view.debug: False + *view.layout: vertical { \ + 5 < +inf -5 > \ + horizontal { \ + -1 \ + frameSelect \ + -1 \ + vertical { \ + 5 < -5 > \ + frameDataBox < +inff -100% * +inff -100% > \ + 5 < -5 > \ + } \ + -1 \ + zoomBox \ + -1 \ + } \ + 1 < +inf > \ + viewButtons < +inf -inf * +inf -inf > \ + 5 < +inf -5 > \ + } + + *frameDataBox.frameType: sunken + *frameDataBox.frameWidth: 2 + *frameData.width: 130 + *frameData.height: 50 + + *frameSelect.location: 0 0 72 0 + *frameSelect.shrinkToFit: True + *frameSelect.outerOffset: 5 + *frameSelect.innerOffset: 5 + *frameSelect.frameWidth: 2 + *frameSelect*offIcon: diamond0s + *frameSelect*onIcon: diamond1s + *frameSelect*highlightColor: blue + *frameSelect.label: Frame: + + *frameBox.debug: False + *frameBox.layout: vertical { \ + frame1 < +inf * > \ + frame2 < +inf * > \ + frame3 < +inf * > \ + frame4 < +inf * > \ + 10 < +inf -10 > \ + horizontal { \ + -1 \ + prevFrame \ + 10 < +inf -5 > \ + nextFrame \ + -1 \ + } \ + -1 \ + } + + *frameBox*location: 0 0 10 20 + *frameBox*alignment: left + *frameBox*frameWidth: 0 + *frameBox*highlightThickness: 0 + *frameBox*frame1.label: \ 1\ \ + *frameBox*frame2.label: \ 2\ \ + *frameBox*frame3.label: \ 3\ \ + *frameBox*frame4.label: \ 4\ \ + *frameBox*Command.width: 24 + *frameBox*prevFrame.label: xx + *frameBox*nextFrame.label: xx + + *zoomBox.label: Zoom: + *zoomBox.location: 0 0 160 127 + *zoomBox.outerOffset: 5 + *zoomBox.shrinkToFit: True + + *zoom.debug: False + *controlPanel*zoom*internalWidth: 4 + *zoom.layout: vertical { \ + space = ((50% of width zoom) - (50% of width z5)) \ + 1 < +inf > \ + horizontal { \ + vertical { \ + toggleZoom < +inf * +inf > \ + 2 \ + } \ + 2 \ + vertical { \ + 2 < +inf > \ + z5 \ + 1 < +inf > \ + z3 \ + 0 < +inf > \ + } \ + 2 \ + vertical { \ + zoomIn < +inf * +inf > \ + 2 \ + } \ + } \ + 1 < +inf > \ + horizontal { \ + 2 < +inf > \ + d8 d4 d2 x1 z2 z4 z8 \ + 2 < +inf > \ + } \ + 1 < +inf > \ + horizontal { \ + vertical { \ + 2 \ + zoomOut < +inf * +inf > \ + } \ + 2 \ + vertical { \ + 0 < +inf > \ + d3 \ + 1 < +inf > \ + d5 \ + 2 < +inf > \ + } \ + 2 \ + vertical { \ + 2 \ + centerFrame < +inf * +inf > \ + } \ + } \ + 1 < +inf > \ + } + + *toggleZoom.label: Toggle\nZoom + *toggleZoom.outerOffset: 0 + *toggleZoom.width: 30 + *toggleZoom.height: 25 + + *zoomIn.label: Zoom\nIn + *zoomIn.outerOffset: 0 + *zoomIn.width: 30 + *zoomIn.height: 25 + + *x1.label: 1 + *z2.label: 2 + *z3.label: 3 + *z4.label: 4 + *z5.label: 5 + *z8.label: 8 + + *controlPanel*zoomIn.foreground: royalBlue3 + *controlPanel*z4.foreground: royalBlue3 + *controlPanel*z5.foreground: royalBlue3 + *controlPanel*z8.foreground: royalBlue3 + *controlPanel*z2.foreground: royalBlue3 + *controlPanel*z3.foreground: royalBlue3 + + *zoomOut.label: Zoom\nOut + *zoomOut.outerOffset: 0 + *zoomOut.width: 30 + *zoomOut.height: 25 + + *centerFrame.label: Center + *centerFrame.outerOffset: 0 + *centerFrame.width: 30 + *centerFrame.height: 25 + + *d2.label: 2 + *d3.label: 3 + *d4.label: 4 + *d5.label: 5 + *d8.label: 8 + + *controlPanel*zoomOut.foreground: mediumVioletRed + *controlPanel*d2.foreground: mediumVioletRed + *controlPanel*d3.foreground: mediumVioletRed + *controlPanel*d4.foreground: mediumVioletRed + *controlPanel*d5.foreground: mediumVioletRed + *controlPanel*d8.foreground: mediumVioletRed + + *viewButtons.location: 0 0 100 80 + *viewButtons.debug: False + *viewButtons.layout: horizontal { \ + 5 < -2 > \ + aspect < +inf * > \ + 5 < -2 > \ + flipX < +inf * > \ + 5 < -2 > \ + flipY < +inf * > \ + 5 < -2 > \ + flipXY < +inf * > \ + 5 < -2 > \ + clearFrame < +inf * > \ + 5 < -2 > \ + fitFrame < +inf * > \ + 5 < -2 > \ + } + + *nextFrame.label: Next Frame + *prevFrame.label: Previous Frame + *fitFrame.label: Fit Frame + *aspect.label: Aspect + *clearFrame.label: Clear Frame + *flipX.label: Flip X + *flipY.label: Flip Y + *flipXY.label: Flip XY + + + ! ENHANCEMENT + ! ------------------ + *enhancementBox.label: Enhancement + *enhancementBox.location: 0 0 110 0 + *enhancementBox.shrinkToFit: True + *enhancementBox.outerOffset: 5 + + *enhance.debug: False + *enhance.layout: vertical { \ + 3 < -3 > \ + horizontal { \ + 2 < -2 > \ + colorlistScroll < * +inff -inff > \ + -1 \ + colorlistFrame < +inf -inf * +inff -inff > \ + 2 < -2 > \ + } \ + -1 \ + horizontal { \ + 2 < -2 > \ + colordataFrame < +inf -inf * +inf -inf > \ + 2 < -2 > \ + } \ + 5 < -5 > \ + horizontal { \ + 2 < -2 > \ + vertical { \ + -1 \ + contrastLabel \ + 3 < -3 > \ + brightnessLabel \ + -1 \ + } \ + 3 < -3 > \ + vertical { \ + -1 \ + contrastSlider < +inf -inf * > \ + 3 < -3 > \ + brightnessSlider < +inf -inf * > \ + -1 \ + } \ + 2 < -2 > \ + } \ + 5 < -5 > \ + horizontal { \ + 3 < -3 > \ + invertButton < +inf -inf * > \ + 5 < -5 > \ + optimizeButton < +inf -inf * > \ + 3 < -3 > \ + } \ + 3 < -3 > \ + } + + *enhance*FrameType: sunken + *enhance*FrameWidth: 2 + *enhance*BorderWidth: 0 + *enhance*Label.ShadowWidth: 0 + *enhance*thumbColor: gray + + *colorlistScroll.location: 0 0 20 10 + *colorlistScroll.vertical: True + *colorlistScroll*minsize: 10 + *colorlist.width: 100 + *colorlist.height: 78 + *colordata.width: 100 + *colordata.height: 45 + *enhance*colordata.frameWidth: 0 + *contrastLabel.label: x + *contrastSlider.location: 0 0 100 20 + *brightnessLabel.label: x + *brightnessSlider.location: 0 0 100 20 + *invertButton.label: Invert + *optimizeButton.label: Optimize + + ! BLINK + ! --------------------- + *blinkBox.label: Blink + *blinkBox.location: 0 0 230 0 + *blinkBox.shrinkToFit: True + *blinkBox.outerOffset: 5 + + + *blink.debug: False + *blink.layout: vertical { \ + space = (width blinkFramesLabel - width blinkRateLabel) \ + 3 < -3 > \ + horizontal { \ + 0 \ + blinkFramesLabel \ + 3 < +inf > \ + blinkFrame1 < -50% * > \ + blinkFrame2 < -50% * > \ + blinkFrame3 < -50% * > \ + blinkFrame4 < -50% * > \ + 4 < +inf > \ + blinkReset \ + 2 \ + } \ + 5 < -5 > \ + horizontal { \ + $space \ + blinkRateLabel \ + 2 \ + BRframe < +inf * > \ + } \ + 5 < +inf -100% > \ + horizontal { \ + 3 \ + registerButton < +inf * > \ + 5 < -5 > \ + matchButton < +inf * > \ + 5 < -5 > \ + blinkButton < +inf * > \ + 2 \ + } \ + 3 < -3 > \ + } + + *BRlayout.layout: horizontal { \ + BRdecrease \ + BRtext < +inf -100% * > \ + BRincrease \ + } + + *blink.Label.borderWidth: 0 + *blink.Label.shadowWidth: 0 + *controlPanel*blink*internalWidth: 4 + *controlPanel*blink*Arrow.foreground: gray + *controlPanel*blink*Arrow.background: gray63 + *blink*Arrow.width: 16 + *blink*Arrow.height: 25 + + *blinkFramesLabel.label: Blink Frames: + *blinkFrame1.label: 1 + *blinkFrame2.label: 2 + *blinkFrame3.label: 3 + *blinkFrame4.label: 4 + *blinkReset.label: Reset + + *blinkRateLabel.label: Blink Rate: + *BRframe.frameType: sunken + *BRframe.frameWidth: 2 + *BRtext.width: 40 + *BRtext.height: 25 + *BRdecrease.direction: left + *BRincrease.direction: right + *registerButton.label: Register + *matchButton.label: Match LUTs + *blinkButton.label: Blink + + ! OPTIONS + ! --------------------- + *optionsBox.label: Options + *optionsBox.location: 0 0 220 0 + *optionsBox.shrinkToFit: False + *optionsBox.outerOffset: 5 + *optionsBox*offIcon: square0s + *optionsBox*onIcon: square1s + *optionsBox*selectionStyle: multi + *optionsBox*highlightColor: yellow + *optionsBox.TextToggle.location: 0 0 102 25 + *optionsBox.TextToggle.frameWidth: 0 + *optionsBox*alignment: left + + *pannerButton.label: Panner + *magnifierButton.label: Magnifier + *coordsBoxButton.label: Coords Box + *autoscaleButton.label: Autoscale + *antialiasButton.label: Antialias + *tileFramesButton.label: Tile Frames + *warningsButton.label: Warnings + + + ! CONTROL + ! ---------------------- + *controlBox.frameType: chiseled + *controlBox.frameWidth: 2 + *controlBox.outerOffset: 5 + *controlBox.innerOffset: 5 + *controlBox.height: 30 + + *control.debug: False + *control.layout: horizontal { \ + 1 \ + initializeButton < +inf * > \ + 5 < -5 > \ + normalizeButton < +inf * > \ + 80 < +inf -100% > \ + doneButton < +inf * > \ + 1 \ + } + + *initializeButton.label: Initialize + *normalizeButton.label: Normalize + *doneButton.label: Done + + ! WARNING dialog. + ! --------------------- + *warning.geometry: +400+300 + *warning*background: gray + *warning*borderWidth: 0 + *warning*TextBox.frameWidth: 0 + *warning*TextButton.frameWidth: 2 + *warning*TextButton.width: 40 + *warning*TextButton.height: 25 + + *warn.layout: vertical { \ + 5 < -5 > \ + horizontal { \ + 5 < -5 > \ + warnFrame < +inf * +inf > \ + 5 < -5 > \ + } \ + 1 < -1 > \ + horizontal { \ + 5 < -5 > \ + warnOk < +inf * > \ + 5 < +inf -5 > \ + warnCancel < +inf * > \ + 5 < +inf -5 > \ + warnHelp < +inf * > \ + 5 < -5 > \ + } \ + 1 < -1 > \ + } + + *WFlayout.layout: horizontal { \ + 5 < -5 > \ + vertical { \ + 5 < +inf -5 > \ + warnIcon \ + 5 < +inf -5 > \ + } \ + 5 < -5 > \ + warnText < +inf -inf * +inf -inf > \ + 5 < -5 > \ + } + + *warnLabel.label: Warning + *warnLabel.width: 300 + *warnLabel.height: 20 + *warnFrame.frameType: sunken + *warnFrame.frameWidth: 2 + *warnIcon.location: 0 0 40 40 + *warnIcon.image: WARNING + *warnText.label: generic warning text + *warnText.width: 270 + *warnText.height: 60 + *warnOk.label: OK + *warnCancel.label: Cancel + *warnHelp.label: Help + *warnHelp.sensitive: False + + + !===================================== + ! Print Setup Panel resources. ! + !===================================== + *print_panel.title: Printer Setup + *print_panel.highlightThickness: 1 + *print_panel*background: gray + *print_panel*TextBox.background: gray63 + *print_panel*TextBox.foreground: black + *print_panel*TextToggle.alignment: left + *print_panel*Arrow.background: gray63 + *print_panel*Arrow.foreground: gray + *print_panel*Arrow.width: 16 + *print_panel*Arrow.height: 25 + *print_panel*TextToggle.frameWidth: 0 + *print_panel*TextToggle.height: 20 + *print_panel*Label.borderWidth: 0 + *print_panel*Label.shadowWidth: 0 + *print_panel*Label.background: gray + *print_panel*TextButton.width: 40 + *print_panel*TextButton.height: 25 + + *printLayout.borderWidth: 0 + *printLayout.layout: vertical { \ + -1 \ + printCmdGroup < +inf * > \ + -1 \ + optGroup < +inf -inf * +inf -inf > \ + -1 \ + cmdGroup < +inf * > \ + -1\ + } + + + ! Print Group resources. + !---------------------------------- + *printCmdGroup.borderWidth: 0 + *printCmdGroup.outerOffset: 5 + *printCmdGroup.label: + *printCmdGroup.location: 0 0 400 85 + *printCmdGroup*offIcon: diamond0s + *printCmdGroup*onIcon: diamond1s + *printCmdGroup*highlightColor: cyan + *printCmdGroup*Frame.frameType: sunken + *printCmdGroup*Frame.frameWidth: 2 + *printCmdGroup*Frame.width: 300 + *printCmdGroup*Label.justify: right + *printCmdGroup*Text*editType: edit + *printCmdGroup*TextToggle.width: 70 + *printCmdGroup*shadowWidth: 0 + *printCmdGroup*borderWidth: 0 + *printCmdLayout.borderWidth: 0 + *printCmdLayout*Label.font: 7x13bold + *printCmdLayout.layout: horizontal { \ + -1 \ + labelLayout \ + 5 < -5 > \ + inputLayout < +inf -inf * +inf > \ + 2 \ + } + + *labelLayout.borderWidth: 0 + *labelLayout.layout: vertical { \ + 5 \ + toLabel \ + 11 \ + printerLabel \ + -3 \ + } + *printerLabel.label: Print Command: + *toLabel.label: Print To: + *toPrinter.label: Printer + *toPrinter.on: True + *toFile.label: File + + + *inputLayout*Text*font: -*-helvetica-medium-r-normal-*-12-*-iso8859-1 + *inputLayout.borderWidth: 0 + *inputLayout.layout: horizontal { \ + 3 \ + vertical { \ + 5 \ + horizontal { \ + 5 < -5 > \ + toPrinter \ + 5 < -5 > \ + toFile \ + 5 < +inf -inf > \ + } \ + 5 \ + printcmdFrame < +inf -inf * > \ + 5 \ + } \ + 3 \ + } + *printcmd*string: lpr + *printcmd*height: 22 + *printcmd*Text*editType: edit + *printcmd*Text*font: -*-helvetica-medium-r-normal-*-12-*-iso8859-1 + + ! Main options groups layout resources. + !--------------------------------------- + *optGroup.frameWidth: 2 + *optGroup.frameType: chiseled + *optGroup.label: + *optGroup.location: 0 0 400 265 + *optGroup.outerOffset: 5 + *optGroup.innerOffset: 0 + *optLayout*borderWidth: 0 + *optLayout.layout: horizontal { \ + -1 \ + vertical { \ + 5 < -5 > \ + epsPageGroup < +inf -inf * > \ + 0 < -0 > \ + optionsGroup < +inf -inf * +inf -inf > \ + -1 \ + } \ + 0 < -0 > \ + vertical { \ + 5 < -5 > \ + printColorGroup < +inf -inf * > \ + 0 < -0 > \ + printerGroup < +inf * +inf > \ + -1 \ + } \ + -1 \ + } + + + ! Postscript Options group resources. + ! ----------------------------------- + *epsPageGroup.label: Postscript Options + *epsPageGroup.outerOffset: 5 + *epsPageGroup.innerOffset: 5 + *epsPageGroup.location: 0 0 250 150 + *epsPageGroup*offIcon: diamond0s + *epsPageGroup*onIcon: diamond1s + *epsPageGroup*highlightColor: cyan + *epsPage*Label.justify: left + *epsPage*Label.font: 7x13bold + *epsPage.layout: vertical { \ + -1 \ + epsOrientLabel \ + 4 < -4 > \ + horizontal { \ + 10 \ + epsPortButton \ + epsLandButton \ + -1 \ + } \ + 4 < -4 > \ + epsSizeLabel \ + -1 \ + horizontal { \ + 10 \ + epsLetterButton \ + epsLegalButton \ + epsA4Button \ + -1 \ + } \ + 5 < -5 > \ + horizontal { \ + -1 \ + epsScaleLabel \ + 4 < -4 > \ + ScaleFrame \ + } \ + -1 \ + } + + + ! Page Layout resources. + ! ------------------------------- + *epsOrientLabel.label: Orientation: + *epsPortButton.label: Portrait + *epsPortButton.width: 90 + *epsLandButton.label: Landscape + *epsLandButton.width: 90 + + *epsSizeLabel.label: Paper Size: + *epsLetterButton.label: Letter + *epsLetterButton.width: 75 + *epsLegalButton.label: Legal + *epsLegalButton.width: 75 + *epsA4Button.label: A4 + *epsA4Button.width: 75 + + ! Image scale box resources. + ! ------------------------------- + *epsScaleLabel.label: Image Scale: + *ScaleFrame.frameType: sunken + *ScaleFrame.frameWidth: 2 + *ScaleFrame*shadowWidth: 0 + *ScaleLayout.location: 0 0 100 50 + *ScaleLayout.label: + *ScaleLayout.layout: horizontal { \ + SCdecrease \ + SCtext < +inf -100% * > \ + SCincrease \ + } + *SCdecrease.direction: left + *SCtext.width: 75 + *SCtext.height: 25 + *SCtext.label: 100 % + *SCincrease.direction: right + + + ! Miscellaneous print options box resources. + ! ------------------------------------ + *optionsGroup.outerOffset: 5 + *optionsGroup.innerOffset: 5 + *optionsGroup*onIcon: square1s + *optionsGroup*offIcon: square0s + *optionsGroup.label: Processing Options + *optionsGroup*TextToggle.width: 100 + *optionsGroup*TextToggle.highlightColor: yellow + *options.frameWidth: 2 + *options.location: 0 0 250 75 + *options.layout: horizontal { \ + 10 \ + vertical { \ + -1 \ + epsscaleButton \ + 2 \ + autorotateButton \ + 2 \ + aspectButton \ + -1 \ + } \ + 3 \ + vertical { \ + -1 \ + annotateButton \ + 2 \ + compressButton \ + 25 \ + -1 \ + } \ + -1 \ + } + *epsscaleButton.label: Auto Scale + *autorotateButton.label: Auto Rotate + *annotateButton.label: Annotate + *aspectButton.label: Max Aspect + *compressButton.label: Compress + *compressButton.sensitive: False + +! *epsscaleButton.on: True +! *autorotateButton.on: False +! *spectButton.on: False +! *annotateButton.on: True +! *compressButton.on: False + + + ! Output color box resources. + ! ------------------------------ + *printColorGroup.location: 0 0 150 90 + *printColorGroup.outerOffset: 5 + *printColorGroup.frameWidth: 2 + *printColorGroup*offIcon: diamond0s + *printColorGroup*onIcon: diamond1s + *printColorGroup*highlightColor: cyan + *printColorGroup.innerOffset: 5 + *printColorGroup.label: Output Color + *printColorGroup*TextToggle.width: 100 + *printColor.frameWidth: 2 + *printColor.location: 0 0 250 75 + *printColor.layout: horizontal { \ + 15 \ + vertical { \ + -1 \ + prGrayButton \ + 2 \ + prPseudoButton \ + 2 \ + prRGBButton \ + -1 \ + } \ + -1 \ + } + *prGrayButton.label: Grayscale + *prPseudoButton.label: PseudoColor + *prRGBButton.label: RGB + + ! Printer Selection. + ! -------------------------- + *printerGroup.label: Printers + *printerGroup.location: 0 0 110 100 + *printerGroup.shrinkToFit: True + *printerGroup.outerOffset: 5 + + *printers.debug: False + *printers.layout: vertical { \ + 3 < -3 > \ + horizontal { \ + 2 < -2 > \ + printlistFrame < +inf -inf * +inff -inff > \ + -1 \ + printlistScroll < * +inff -inff > \ + 2 < -2 > \ + } \ + 3 < -3 > \ + } + + *printers*FrameType: sunken + *printers*FrameWidth: 2 + *printers*BorderWidth: 0 + *printers*Label.ShadowWidth: 0 + *printers*thumbColor: gray + + *printlistScroll.location: 0 0 20 10 + *printlistScroll.vertical: True + *printlistScroll*minsize: 10 + *printlist.width: 100 + *printlist.height: 78 + + + ! Panel command resources. + ! ------------------------------ + *cmdGroup.frameType: chiseled + *cmdGroup.frameWidth: 2 + *cmdGroup.outerOffset: 5 + *cmdGroup.innerOffset: 5 + *cmdGroup.label: + *cmdGroup.location: 0 0 150 54 + *cmdGroup*Command.font: 7x13bold + *cmdLayout.borderWidth: 0 + *cmdLayout.layout: horizontal { \ + -1 \ + okayPrint \ + 1 < +inf -1 > \ + printStatus < +inf -inf * +inf -inf > \ + 1 < +inf -1 > \ + donePrint \ + -1 \ + } + *cmdGroup*TextButton*location: 0 0 80 0 + *okayPrint.label: Print + *donePrint.label: Done + + + !===================================== + ! Save Setup Panel resources. ! + !===================================== + *save_panel.title: Save to Disk... + *save_panel*background: gray + *save_panel*TextBox.background: gray63 + *save_panel*TextToggle.alignment: left + *save_panel*AsciiText*background: gray63 + *save_panel*Arrow.background: gray63 + *save_panel*Arrow.foreground: gray + *save_panel*Arrow.width: 16 + *save_panel*Arrow.height: 25 + *save_panel*TextToggle.frameWidth: 0 + *save_panel*TextToggle.height: 20 + *save_panel*Label.borderWidth: 0 + *save_panel*Label.shadowWidth: 0 + *save_panel*TextButton.width: 80 + + + *save_panel*debug: False + *saveLayout.borderWidth: 0 + *saveLayout.layout: vertical { \ + -1 \ + saveNameGroup < +inf * > \ + -1 \ + saveOptGroup < +inf -inf * +inf -inf > \ + -1 \ + saveCmdGroup < +inf * > \ + -1\ + } + + ! Save Name Group resources. + !---------------------------------- + *saveNameGroup.borderWidth: 0 + *saveNameGroup.outerOffset: 5 + *saveNameGroup.label: + *saveNameGroup.location: 0 0 400 60 + *saveNameGroup*offIcon: diamond0s + *saveNameGroup*onIcon: diamond1s + *saveNameGroup*highlightColor: cyan + *saveNameGroup*Frame.frameType: sunken + *saveNameGroup*Frame.frameWidth: 2 + *saveNameGroup*Label.justify: right + *saveNameGroup*Text*editType: edit + *saveNameGroup*Text*font: -*-helvetica-medium-r-normal-*-12-*-iso8859-1 + *saveNameGroup*TextBox*font:-*-helvetica-medium-r-normal-*-12-*-iso8859-1 + *saveNameGroup*shadowWidth: 0 + *saveNameGroup*borderWidth: 0 + *saveNameLayout.borderWidth: 0 + *saveNameLayout*Label.font: 7x13bold + *saveNameLayout.layout: vertical { \ + 5 \ + horizontal { \ + 5 \ + saveLabel \ + 5 \ + fnameFrame < +inf -inf * > \ + 5 \ + } \ + 5 \ + } + *saveLabel.label: File Name: + *saveFile.height: 22 +! *save_panel*saveFile*background: gray63 + + ! Main options groups layout resources. + !--------------------------------------- + *saveOptGroup.frameWidth: 2 + *saveOptGroup.frameType: chiseled + *saveOptGroup.label: + *saveOptGroup.location: 0 0 400 145 + *saveOptGroup.outerOffset: 5 + *saveOptGroup.innerOffset: 0 + *saveOptLayout*borderWidth: 0 + *saveOptLayout.layout: horizontal { \ + -1 \ + vertical { \ + 5 < -5 > \ + fmtGroup < +inf * +inf > \ + -1 \ + } \ + -1 \ + vertical { \ + 10 < -10 > \ + saveDataBox < +inff -100% * +inff -100% > \ + 5 < -5 > \ + } \ + -1 \ + vertical { \ + 5 < -5 > \ + saveColorGroup < +inf * +inf > \ + -1 \ + } \ + -1 \ + } + + ! Output color box resources. + ! ------------------------------ + *saveColorGroup.location: 0 0 125 120 + *saveColorGroup.outerOffset: 5 + *saveColorGroup.frameWidth: 2 + *saveColorGroup*offIcon: diamond0s + *saveColorGroup*onIcon: diamond1s + *saveColorGroup*highlightColor: cyan + *saveColorGroup.innerOffset: 5 + *saveColorGroup.label: Output Color + *saveColorGroup*TextToggle.width: 100 + *saveColor.frameWidth: 2 + *saveColor.layout: horizontal { \ + 3 \ + vertical { \ + 5 \ + svGrayButton \ + 2 \ + svPseudoButton \ + 2 \ + svRGBButton \ + -1 \ + } \ + -1 \ + } + *svGrayButton.label: Grayscale + *svPseudoButton.label: PseudoColor + *svPseudoButton.on: true + *svRGBButton.label: RGB + + *saveDataBox*TextBox.background: gray63 + *saveDataBox.frameType: sunken + *saveDataBox.frameWidth: 2 + + + ! Output format box resources. + ! ----------------------------------- + *fmtGroup.location: 0 0 140 120 + *fmtGroup.outerOffset: 5 + *fmtGroup.frameWidth: 2 + *fmtGroup*offIcon: diamond0s + *fmtGroup*onIcon: diamond1s + *fmtGroup*TextToggle.width: 55 + *fmtGroup*highlightColor: cyan + *fmtGroup.label: File Format + *formats.layout: horizontal { \ + 3 \ + vertical { \ + 7 \ + fitsButton \ + 2 \ + gifButton \ + 2 \ + x11Button \ + 2 \ + rawButton \ + -1 \ + } \ + 2 < -2 > \ + vertical { \ + 7 \ + rasButton \ + 2 \ + tiffButton \ + 2 \ + jpegButton \ + 2 \ + pnmButton \ + -1 \ + } \ + -1 \ + } + *rasButton.label: RAS + *gifButton.label: GIF + *jpegButton.label: JPEG + *tiffButton.label: TIFF + *fitsButton.label: FITS + *x11Button.label: X11 + *pnmButton.label: PNM + *rawButton.label: Raw + + ! Change the sensitivity once these formats are implemented. ! + !------------------------------------------------------------- + *jpegButton.sensitive: false + *x11Button.sensitive: false + *pnmButton.sensitive: false + *rawButton.sensitive: false + + ! Panel command resources. + ! ------------------------------ + *saveCmdLayout.borderWidth: 0 + *saveCmdGroup.frameType: chiseled + *saveCmdGroup.frameWidth: 2 + *saveCmdGroup.outerOffset: 5 + *saveCmdGroup.innerOffset: 5 + *saveCmdGroup.label: + *saveCmdGroup.location: 0 0 400 54 +! *saveCmdLayout*Command.font: 7x13bold + *saveCmdLayout.layout: horizontal { \ + -1 \ + okaySave \ + 1 < +inf -1 > \ + saveStatus \ + 1 < +inf -1 > \ + doneSave \ + -1 \ + } + *okaySave.label: Save + *doneSave.label: Done + + ! File Load Control Panel. + !------------------------------- + *load_panel.geometry: 400x320 + *load_panel.title: File Load Panel + *filesLayout*borderWidth: 0 + *filesLayout*highlightThickness: 0 + *filesLayout*background: gray + *filesLayout*Group.outerOffset: 7 + *filesLayout*Group.shrinkToFit: True + *filesLayout*Group.frameType: chiseled + *filesLayout*Frame*frameType: sunken + *filesLayout*Frame*frameWidth: 2 + *filesLayout*Text*background: gray63 + *filesLayout*Text*font: -*-helvetica-medium-r-normal-*-12-*-iso8859-1 + *filesLayout*TextBox*font: -*-helvetica-medium-r-normal-*-12-*-iso8859-1 + *filesLayout*TextToggle.frameWidth: 0 + *filesLayout*TextToggle.height: 28 + *filesLayout*TextToggle.width: 80 + *filesLayout*TextToggle.alignment: left + *filesLayout*Scrollbar2*background: gray63 + *filesLayout*scrollbarForeground: gray + *filesLayout*Scrollbar2*location: 0 0 20 10 + *filesLayout*Scrollbar2*vertical: True + *filesLayout*Scrollbar2*minsize: 20 + *filesLayout*MultiList*background: gray63 + *filesLayout*MultiList*foreground: black + *filesLayout*MultiList*shadeSurplus: False + *filesLayout*MultiList*width: 120 + *filesLayout*MultiList.font: 7x13bold + *filesLayout*Label.font: 7x13bold + *filesLayout*Label.borderWidth: 0 + *filesLayout*Label.shadowWidth: 0 + *filesLayout.layout: vertical { \ + 5 < +0 -5 > \ + horizontal { \ + 0 < +0 -0 > \ + imagesGroup < +inf -inf * +inf -inf > \ + 0 < +0 -0 > \ + } \ + 0 < +0 -0 > \ + horizontal { \ + 0 < +0 -0 > \ + fbuttonsGroup < +inf -inf * > \ + 0 < +0 -0 > \ + } \ + 0 < +0 -0 > \ + } + + *imagesGroup.label: Images + *imagesGroup.frameWidth: 2 +! *imagesGroup.outerOffset: 5 + *imagesGroup*offIcon: square0s + *imagesGroup*onIcon: square1s + *imagesGroup*highlightColor: yellow + *imagesLayout*Label.shadowWidth: 0 + *imagesLayout*Label.justify: left + *imagesLayout*Command.width: 90 + *imagesLayout*TextButton.width: 90 + *imagesLayout*TextButton.height: 23 + *imagesLayout*TextButton.font: *times*medium*r*normal*-12-* + *imagesLayout.layout: vertical { \ + 7 < +0 -7 > \ + horizontal { \ + 5 \ + rootButton < +inf -inf * > \ + 2 \ + homeButton < +inf -inf * > \ + 2 \ + upButton < +inf -inf * > \ + 2 \ + rescanButton < +inf -inf * > \ + 5 \ + } \ + 7 \ + horizontal { \ + 5 < +0 -5 > \ + vertical { \ + 5 \ + imtemplateLabel < * > \ + 5 \ + imtemplateFrame < +inf -inf * > \ + 10 < +inf -inf > \ + grayToggle < * > \ + 5 \ + browseToggle < * > \ + 5 \ + } \ + 5 \ + horizontal { \ + 5 < +0 -5 > \ + imlistFrame < +inf -inf * +inf -inf > \ + 3 < +0 -3 > \ + imlistScrollbar < * +inf - inf > \ + 0 < +0 -0 > \ + } \ + 5 < +0 -5 > \ + } \ + 5 \ + horizontal { \ + 5 \ + dirLabel < +inf -inf * > \ + 5 \ + } \ + 10 \ + horizontal { \ + 5 < +0 -5 > \ + fnameLabel < * > \ + 5 < +0 -5 > \ + filnamFrame < +inf -inf * > \ + 5 < +0 -5 > \ + frameLabel < * > \ + 5 < +0 -5 > \ + frameFrame < -50% * > \ + 5 < +0 -5 > \ + } \ + 5 < +0 -5 > \ + } + *imtemplateLabel.label: File Pattern: + *imtemplateText*editType: edit + *imtemplateText.height: 20 + *imageList.width: 100 + *upButton.label: Up + *rootButton.label: Root + *homeButton.label: Home + *rescanButton.label: Rescan + *browseToggle.label: Browse + *browseToggle.on: True + *grayToggle.label: Greyscale + *dirLabel.label: Directory: + *dirLabel.alignment: left + *fnameLabel.label: Load File: + *fnameText*editType: edit + *fnameText.height: 20 + *frameLabel.label: Frame: + *frameFrame.label: 1 + + *fbuttonsGroup.label: + *fbuttonsGroup*frameWidth: 2 + *fbuttonsGroup*outerOffset: 5 + *fbuttonsGroup*innerOffset: 5 + *fbuttonsGroup.frameType: sunken + *fbuttonsGroup*Command.font: 7x13bold + *fbuttonsLayout*Command.height: 50 + *fbuttonsLayout*Command.width: 70 + *fbuttonsLayout.layout: horizontal { \ + -1 \ + filesLoadButton \ + 1 < +inf -1 > \ + filesStatus \ + 1 < +inf -1 > \ + filesCloseButton \ + -1 \ + } + + *filesLoadButton.label: Load + *filesStatus.label: + *filesCloseButton.label: Done + + ! Help panel resources. + !---------------------- + *help_panel.title: XImtool Help Summary + *help_panel.width: 450 + *help_panel.height: 525 + *helpLayout*borderWidth: 0 + *helpLayout.background: gray + *helpLayout*Frame*frameType: sunken + *helpLayout*Frame*frameWidth: 2 + *helpLayout*Frame.background: gray + *helpLayout*Layout.background: gray + *helpLayout*ScrollbarBackground: #c0c0c0 + *helpLayout*Scrollbar*background: #c0c0c0 + *helpLayout*Scrollbar*width: 17 + *helpLayout*Scrollbar*height: 17 + *helpLayout*Scrollbar*shadowWidth: 2 + *helpLayout*Scrollbar*cursorName: top_left_arrow + *helpLayout*Scrollbar*pushThumb: true + + + *helpLayout.layout: vertical { \ + -1 \ + horizontal { \ + 0 < +0 -0 > \ + helpMenuLayout < +inf -inf * > \ + 0 < +0 -0 > \ + } \ + 0 < +0 -0 > \ + horizontal { \ + 0 < +0 -0 > \ + helpTextFrame < +inf -inf * +inf -inf > \ + 0 \ + } \ + 0 < +0 -0 > \ + horizontal { \ + 0 < +0 -0 > \ + helpInfoLayout < +inf -inf * > \ + 0 < +0 -0 > \ + } \ + -1 \ + } + *helptext*background: white + *helptext*foreground: black + + *helpMenuLayout*background: gray + *helpMenuLayout*Command.highlightThickness: 2 + *helpMenuLayout*Command.internalHeight: 2 + *helpMenuLayout*Command.font: -*-helvetica-bold-r-normal-*-12-*-*-* + *helpMenuLayout.layout: vertical { \ + 5 \ + horizontal { \ + 5 < +0 -5 > \ + helpBack \ + 2 < +0 -2 > \ + helpForward \ + 2 < +0 -2 > \ + helpHome \ + 20 < +inf -20 > \ + helpClose \ + 5 < +0 -5 > \ + } \ + 5 \ + } + *helpBack.label: Back + *helpBack.sensitive: False + *helpForward.label: Forward + *helpForward.sensitive: False + *helpHome.label: Home + *helpClose.label: Done + + *helpInfoLayout*background: gray + *helpInfoLayout*Label.justify: center + *helpInfoLayout*Label.internalHeight: 0 + *helpInfoLayout.layout: horizontal { \ + 5 \ + vertical { \ + 5 \ + helpIRAFLogo \ + 5 \ + } \ + 1 \ + vertical { \ + 5 \ + horizontal { \ + 0 < +inf -inf > \ + helpInfo1 \ + 0 < +inf -inf > \ + } \ + 0 < +inf -0 > \ + horizontal { \ + 0 < +inf -inf > \ + helpInfo2 \ + 0 < +inf -inf > \ + } \ + 0 < +inf -0 > \ + horizontal { \ + 0 < +inf -inf > \ + helpInfo3 \ + 0 < +inf -inf > \ + } \ + 5 \ + } \ + 1 \ + vertical { \ + 5 \ + helpNOAOLogo \ + 5 \ + } \ + 5 \ + } + *helpInfo1.label: XImtool V1.2 -- Released: 4/30/2000 + *helpInfo2.label: iraf@noao.edu (520) 318-8160 + *helpInfo3.label: NOAO is operated by AURA under cooperative agreement with the NSF + *helpInfoLayout*helpInfo1.font: -*-helvetica-medium-r-normal-*-12-*-*-* + *helpInfoLayout*helpInfo2.font: -*-helvetica-medium-r-normal-*-12-*-*-* + *helpInfoLayout*helpInfo3.font: -*-helvetica-medium-r-normal-*-10-*-*-* + *helpInfoLayout.helpIRAFLogo.internalWidth: 0 + *helpInfoLayout.helpIRAFLogo.internalheight: 0 + *helpInfoLayout.helpIRAFLogo.foreground: steelblue + *helpInfoLayout.helpIRAFLogo.background: white + *helpInfoLayout.helpNOAOLogo.internalWidth: 0 + *helpInfoLayout.helpNOAOLogo.internalheight: 0 + *helpInfoLayout.helpNOAOLogo.foreground: steelblue + *helpInfoLayout.helpNOAOLogo.background: white + + *helpText.width: 450 + *helpText.height: 500 + *helpText.anchorUnderlines: 1 + *helpText.visitedAnchorUnderlines: 1 + *helpText.verticalScrollOnRight: true + *helpText.plainFont: 6x13 + + + ! Define a debug Tcl shell. + !-------------------------------- + *tclShell.title: Interactive Tcl Shell + *tclForm.background: gray + *tclForm*Label.background: gray + *tclForm*Label.borderWidth: 0 + *tclForm*Label.resize: False + *tclForm*Command.resize: False + *tclForm*Command.background: grey75 + *tclForm*Command.font: 7x13bold + *tclLabel.label: Server Command Entry + *tclClear.label: Clear + *tclExecute.label: Execute + *tclEntry*Text.font: 7x13 + *tclEntry*width: 500 + *tclEntry*borderWidth: 1 + *tclEntry*height: 150 + *tclEntry*editType: edit + *tclEntry*scrollHorizontal: whenNeeded + *tclEntry*scrollVertical: never + *tclEntry*displayCaret: True + *tclcloseButton.label: Done + + + ! GUI resources. + ! ------------------------------ + *autoscale: True + *zoomfactors: 1 2 4 8 + *displayCoords: True + *displayPanner: True + *displayMagnifier: False + *blinkRate: 1.0 + *pannerArea: 150*150 + *pannerGeom: -5+5 + *magnifierArea: 100*100 + *magnifierGeom: +5+5 + *wcsboxGeom: -5-5 + *maxContrast: 5.0 + *warnings: True +} + +# Start up the GUI. +createObjects +send colorbar setGterm ; send colorbar activate +send imagewin setGterm ; send imagewin activate +activate + +# Utility procedure to test True/False strings in resources. +proc true {v} {expr {$v == "true" || $v == "True" || $v == "TRUE"}} + +# Utility functions. +proc min {a b} { expr {($a < $b) ? $a : $b} } +proc max {a b} { expr {($a > $b) ? $a : $b} } + +# Global variables. +set version "NOAO/IRAF XImtool Version 1.2" + +set winWidth [send imagewin get width] ;# display window width +set winHeight [send imagewin get height] ;# display window height +set marker none ;# selected marker +set markno 0 ;# used to name new markers +set blinkFrames "1 2" ;# list of blink/tile frames + +set loadP_up 0 +set saveP_up 0 +set printP_up 0 +set infoP_up 0 +set panel_up 0 +set helpP_up 0 + + +proc winResize {w width height} \ + { global winWidth winHeight; set winWidth $width; set winHeight $height} +send imagewin addCallback winResize resize + +# Additional global variables, taking default values from resources. +getResources { + { zoomfactors } + { displayCoords } + { displayPanner } + { displayMagnifier } + { blinkRate } + { pannerArea } + { pannerGeom } + { magnifierArea } + { magnifierGeom } + { wcsboxGeom } + { maxContrast } + { warnings } +} + +set warnings [true $warnings] +set defaultBlinkRate $blinkRate + +# Client state variables (UI parameter objects). Certain of these parameters +# we mirror in Tcl variables here, updating the values with a callback when +# the parameter value changes. Others require special callbacks. + +set frame 1 ;# current display frame +set nframes 0 ;# number of frame buffers +set frames {1 2 3 4} ;# list of image frames +set frameWidth 0 ;# frame buffer width, pixels +set frameHeight 0 ;# frame buffer height, pixels +set frameDepth 8 ;# frame buffer pixel size, bits +set cursorMode 0 ;# true when cursor read pending + +foreach i $frames { + set frameZoomX($i) 0 ;# X zoom factor + set frameZoomY($i) 0 ;# Y zoom factor + set frameCenterX($i) 0 ;# X center of field + set frameCenterY($i) 0 ;# Y center of field + set frameScaleX($i) 0 ;# X scale factor + set frameScaleY($i) 0 ;# Y scale factor + set enhancement($i) none ;# colortable enhancement +} + +# Called when the number of frames changes. +proc setNFrames {param old new} { + global frameMenuDescription nframes frames + set nframes $new + if {$old != $new} { + foreach i {prevButton nextButton} { + send $i set sensitive [expr "$nframes > 1"] + } + editMenu frameMenu frameButton $frameMenuDescription + } + foreach i $frames { + if {$i <= $nframes} { + send frameBox manage frame$i + } else { + send frameBox unmanage frame$i + } + } +}; send nframes addCallback setNFrames + +set frameMenuDescription { + { 1 f.exec "send client setFrame 1" sensitive {[expr "$nframes >= 1"]} } + { 2 f.exec "send client setFrame 2" sensitive {[expr "$nframes >= 2"]} } + { 3 f.exec "send client setFrame 3" sensitive {[expr "$nframes >= 3"]} } + { 4 f.exec "send client setFrame 4" sensitive {[expr "$nframes >= 4"]} } +}; createMenu frameMenu frameButton $frameMenuDescription + +# Called when the frame being displayed changes. +proc frameChanged {param old new} { + global frame + set frame $new + send frameButton set label $frame +}; send frame addCallback frameChanged + +# Called when the frame buffer configuration changes. +proc setFrameSize {param old new} { + global frameWidth frameHeight frameDepth + set frameWidth [lindex $new 0] + set frameHeight [lindex $new 1] + set frameDepth [lindex $new 2] +}; send frameSize addCallback setFrameSize + +# Called when the current frame is zoomed or panned. +proc setFrameView {param old new} { + global frameZoomX frameZoomY frameCenterX frameCenterY + global frameScaleX frameScaleY frame + set frameZoomX($frame) [lindex $new 0] + set frameZoomY($frame) [lindex $new 1] + set frameCenterX($frame) [lindex $new 2] + set frameCenterY($frame) [lindex $new 3] + set frameScaleX($frame) [lindex $new 4] + set frameScaleY($frame) [lindex $new 5] +}; send frameView addCallback setFrameView + +# Called when the color enhancement for a frame changes. +proc setEnhancement {param old new} { + global enhancement + set enhancement([lindex $new 0]) [lrange $new 1 end] +}; send enhancement addCallback setEnhancement + +# Called when the frame title changes (e.g. frame change or new frame loaded). +proc setTitle {param old new} { + send imageTitle set label [string trimright $new] +}; send frameTitle addCallback setTitle + +# Called when the image is flipped in an axis. +proc setFlip {param old new} { + send ${param}Button set state [true $new] +}; foreach i {xflip yflip} { send $i addCallback setFlip } + + +# Various general callbacks. +proc Quit args { send client Quit } +proc nextFrame args { send client nextFrame } +proc prevFrame args { send client prevFrame } +proc setColormap { mapno } { send client setColormap $mapno } +proc xflip args { send client flip x } +proc yflip args { send client flip y } +proc xyflip args { send client flip x y } + +# Initialize bitmaps. +createBitmap xflip 16 16 { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x18, 0x18, + 0x1c, 0x38, 0xfe, 0x7f, 0xfe, 0x7f, 0x1c, 0x38, 0x18, 0x18, 0x10, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + +createBitmap yflip 16 16 { + 0x00, 0x00, 0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0xf0, 0x0f, 0x80, 0x01, + 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0xf0, 0x0f, + 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01, 0x00, 0x00}; + +createBitmap qmark 16 16 { + 0x00, 0x00, 0x00, 0x00, 0xf0, 0x07, 0xf8, 0x0f, 0x18, 0x0c, 0x18, 0x0c, + 0x18, 0x0e, 0x00, 0x07, 0x80, 0x03, 0x80, 0x01, 0x80, 0x01, 0x00, 0x00, + 0x80, 0x01, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00}; + +createBitmap larrow 16 16 { + 0x00, 0x00, 0x00, 0x03, 0x80, 0x03, 0xc0, 0x03, 0xe0, 0x1e, 0x70, 0x1e, + 0x38, 0x18, 0x1c, 0x18, 0x1c, 0x18, 0x38, 0x18, 0x70, 0x1e, 0xe0, 0x1e, + 0xc0, 0x03, 0x80, 0x03, 0x00, 0x03, 0x00, 0x00}; + +createBitmap rarrow 16 16 { + 0x00, 0x00, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x03, 0x78, 0x07, 0x78, 0x0e, + 0x18, 0x1c, 0x18, 0x38, 0x18, 0x38, 0x18, 0x1c, 0x78, 0x0e, 0x78, 0x07, + 0xc0, 0x03, 0xc0, 0x01, 0xc0, 0x00, 0x00, 0x00}; + +createBitmap panel 16 16 { + 0x00, 0x00, 0xf8, 0x1f, 0xf8, 0x1f, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, + 0x98, 0x19, 0x98, 0x19, 0x98, 0x19, 0x98, 0x19, 0x98, 0x19, 0x18, 0x18, + 0x18, 0x18, 0x18, 0x18, 0xf8, 0x1f, 0xf8, 0x1f}; + +createBitmap brightness 15 15 { + 0x00, 0x00, 0x80, 0x00, 0x84, 0x10, 0xe8, 0x0b, 0x10, 0x04, 0x08, 0x08, + 0x08, 0x08, 0x0e, 0x38, 0x08, 0x08, 0x08, 0x08, 0x10, 0x04, 0xe8, 0x0b, + 0x84, 0x10, 0x80, 0x00, 0x00, 0x00}; + +createBitmap contrast 15 15 { + 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x30, 0x07, 0x08, 0x0f, 0x08, 0x0f, + 0x04, 0x1f, 0x04, 0x1f, 0x04, 0x1f, 0x08, 0x0f, 0x08, 0x0f, 0x30, 0x07, + 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00}; + +createBitmap solid 64 24 { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + +send panelButton "set bitmap panel; addCallback panel" +send xflipButton "set bitmap xflip; addCallback xflip" +send yflipButton "set bitmap yflip; addCallback yflip" +send helpButton "set bitmap qmark; addCallback Help" +send prevButton "set bitmap larrow; addCallback prevFrame" +send nextButton "set bitmap rarrow; addCallback nextFrame" + + +# WINDOW the current frame. +proc windowColormap {x y} \ +{ + global winWidth winHeight maxContrast + + send client windowColormap \ + [expr "double($x) / $winWidth"] \ + [expr "(double($y) - $winHeight / 2.0) / $winHeight * \ + $maxContrast * 2.0"] +} + +# WINDOW the current frame, but only one color at a time. +proc windowRGB {color x y save_flag} \ +{ + global winWidth winHeight maxContrast + + send client windowRGB $color \ + [expr "double($x) / $winWidth"] \ + [expr "(double($y) - $winHeight / 2.0) / $winHeight * \ + $maxContrast * 2.0"] $save_flag +} + + +# ZOOM and PAN. +set xcen 0 +set ycen 0 +foreach i $frames {set zoomindex($i) 0} +set nzoomfactors 0 +foreach i $zoomfactors { + set zoomfactor($nzoomfactors) $i + incr nzoomfactors +} + +# Zoom or pan image at given center. +proc zoom {x y} \ +{ + global xcen ycen frame + global zoomindex zoomfactor + global nzoomfactors + + set rx $x; set ry $y + set raster 0 + + # Convert raw screen coordinates to frame buffer raster coordinates. + send imagewin unmapPixel $x $y raster rx ry + + # Select a pixel. + set rx [expr "int ($rx)"] + set ry [expr "int ($ry)"] + + # If the pointer did not move (much) zoom the image, otherwise + # pan it. + + send imagewin setCursorType busy + if {sqrt(pow($x-$xcen, 2) + pow($y-$ycen, 2)) < 4} { + set zoomindex($frame) [expr [incr zoomindex($frame)] % $nzoomfactors] + set mag $zoomfactor($zoomindex($frame)) + send client zoom $mag $mag $rx $ry + } else { + send client pan $rx $ry + set xcen $x + set ycen $y + } + + # Move the pointer so that it tracks the object feature the user + # selected. + + send imagewin setCursorPos $rx $ry $raster + send imagewin getCursorPos xcen ycen + send imagewin setCursorType idle +} + +# Zoom using a marker to indicate the region to be displayed. +proc zoomMarker {marker aspect} \ +{ + global xcen ycen frame + global winWidth winHeight + global zoomindex nzoomfactors + + # getRegion returns: "rectangle raster x y width height rotangle". + set region [send $marker getRegion unmap] + + set raster [lindex $region 1] + set xcen [expr "int([lindex $region 2]) + 0.5"] + set ycen [expr "int([lindex $region 3]) + 0.5"] + set snx [expr "[lindex $region 4] * 2"] + set sny [expr "[lindex $region 5] * 2"] + + # Compute the magnification ratio. + set xmag [expr "$winWidth / $snx"] + set ymag [expr "$winHeight / $sny"] + if {$aspect == "equal"} { + set mag [expr "($xmag < $ymag) ? $xmag : $ymag"] + set xmag $mag; set ymag $mag + } + + # Zoom the image. + send client zoomAbs $xmag $ymag $xcen $ycen + + # The following causes a button2 to redisplay the full image. + send imagewin setCursorPos $xcen $ycen $raster + send imagewin getCursorPos xcen ycen + set zoomindex($frame) [expr "$nzoomfactors - 1"] +} + +proc resetView {param old new} { + global zoomindex xcen ycen frames + global frameWidth frameHeight + + if {$new == "done"} { + foreach i $frames { + send client setFrame $i + set xcen [expr $frameWidth / 2] + set ycen [expr $frameHeight / 2] + send client zoom 1 1 $xcen $ycen + set zoomindex($i) 0 + send client setColormap Grayscale + normalize + } + send client setFrame 1 + } +}; #send initialize addCallback resetView + + +# CURSOR READ stuff. +proc setCursorMode {param old new} \ +{ + global cursorMode + + if {$new == "on"} { + send imagewin "activate; setCursorType ginMode" + set cursorMode 1 + } elseif {$new == "off"} { + send imagewin "setCursorType idle; deactivate" + set cursorMode 0 + } +} + +proc keyInput {widget event sx sy data} \ +{ + global cursorMode frame + + if {!$cursorMode || $event != "keyPress"} \ + return + if {[lindex $data 0] == "??"} \ + return + + # Convert raw screen coordinates to raster pixel coordinates. + send imagewin unmapPixel $sx $sy raster rx ry + + # Return the cursor value and exit cursor mode. + send client retCursorVal $rx $ry $frame 1 [lindex $data 0] +} + +proc resetCursorMode args { + global cursorMode frame + if {$cursorMode} { + send imagewin getCursorPos x y + send client retCursorVal $x $y $frame 1 ^D + } +}; send initialize addCallback resetCursorMode + +send cursorMode addCallback setCursorMode +send imagewin addCallback keyInput input + + +# MARKER stuff. The active marker is determined by the global variable +# "marker", which is the marker the pointer is in, or which the pointer +# was most recently in. + +# Translations when pointer is inside marker. +set markerTranslations { \ + !Shift <Btn1Motion>: m_rotateResize() + <Btn1Motion>: m_moveResize() + !Shift <Btn1Down>: m_raise() m_markpos() + <Btn1Down>: m_raise() m_markposAdd() + <Btn1Up>: m_redraw() m_destroyNull() + <Btn2Down>: m_lower() + <Btn3Down>: popup(markerMenu) + <Btn3Up>: popdown(markerMenu) + !Ctrl <Key>b: call(prevFrame,$name) + !Ctrl <Key>f: call(nextFrame,$name) + !Ctrl <Key>h: call(move_cursor,-1,0) + !Ctrl <Key>j: call(move_cursor,0,1) + !Ctrl <Key>k: call(move_cursor,0,-1) + !Ctrl <Key>l: call(move_cursor,1,0) + !Ctrl <Key>n: call(normalize) + !Ctrl <Key>m: call(toggleMagnifier) + !Ctrl <Key>p: call(togglePanner) + !Ctrl <Key>c: call(cpZoomAction,centerFrame) + !Ctrl <Key>i: call(cpInvert) + !Ctrl <Key>s: call(cpMatchFrames) + !Ctrl <Key>r: call(cpRegisterFrames) + !Alt <Key>1: call(cpSetFrame,frame1) + !Alt <Key>2: call(cpSetFrame,frame2) + !Alt <Key>3: call(cpSetFrame,frame3) + !Alt <Key>4: call(cpSetFrame,frame4) + !Ctrl <Key>1: call(cpZoom,1,1,fixed) + !Ctrl <Key>2: call(cpZoom,2,2,fixed) + !Ctrl <Key>3: call(cpZoom,3,3,fixed) + !Ctrl <Key>4: call(cpZoom,4,4,fixed) + !Ctrl <Key>5: call(cpZoom,5,5,fixed) + !Ctrl <Key>6: call(cpZoom,6,6,fixed) + !Ctrl <Key>7: call(cpZoom,7,7,fixed) + !Ctrl <Key>8: call(cpZoom,8,8,fixed) + !Ctrl <Key>9: call(cpZoom,9,9,fixed) + <Key>BackSpace: m_deleteDestroy() + <Key>Delete: m_deleteDestroy() + <KeyPress>: m_input() + <Motion>: track-cursor() +} + +# Popup menu in effect when inside marker. +createMenu markerMenu imagewin { + { Marker f.title } + { f.dblline } + { Zoom f.exec { + zoomMarker $marker equal + send $marker destroy + } } + { Fill f.exec { + zoomMarker $marker fill + send $marker destroy + } } + { Print f.exec { + send $marker getRect interior x0 y0 nx ny + setPrintCorners $x0 [expr $y0 + $ny -1] \ + [expr $x0 + $nx -1] $y0 + send client print $x0 $y0 $nx $ny + } } + { Save f.exec { + send imagewin setCursorType busy + send $marker getRect interior x0 y0 nx ny + send client save $x0 $y0 $nx $ny + send imagewin setCursorType idle + } } + { Info f.exec { + send infoText append \ + [format "%s\n" [send $marker getRegion unmap]] + } } + { Unrotate f.exec { + send $marker setAttribute rotangle 0 + } } + { f.line } + { Color f.menu markerColor } + { Type f.menu markerType } + { f.line } + { Destroy f.exec { + send $marker destroy + } } +} + +createMenu markerType markerMenu { + { Type f.title } + { f.dblline } + { Rectangle f.exec "m_setType $marker rectangle" } + { Box f.exec "m_setType $marker box" } + { Circle f.exec "m_setType $marker circle" } + { Ellipse f.exec "m_setType $marker ellipse" } + { Polygon f.exec "m_setType $marker polygon" } +} + +createMenu markerColor markerMenu { + { Color f.title } + { f.dblline } + { "" f.exec "m_setColor $marker black" + bitmap solid foreground black } + { "" f.exec "m_setColor $marker white" + bitmap solid foreground white } + { "" f.exec "m_setColor $marker red" + bitmap solid foreground red } + { "" f.exec "m_setColor $marker green" + bitmap solid foreground green } + { "" f.exec "m_setColor $marker blue" + bitmap solid foreground blue } + { "" f.exec "m_setColor $marker magenta" + bitmap solid foreground magenta } + { "" f.exec "m_setColor $marker cyan" + bitmap solid foreground cyan } + { "" f.exec "m_setColor $marker yellow" + bitmap solid foreground yellow } +} + +proc m_setType {marker type} { + send $marker "markpos; set type $type; redraw" +} +proc m_setColor {marker color} { + send $marker "markpos; + set lineColor $color; set highlightColor $color; redraw" +} + +# Callback executed when a marker gets or loses the focus. +proc selectMarker {active_marker event event_data} \ +{ + global marker + switch $event { + focusIn { set marker $active_marker } + focusOut { } + } +} + +# Create marker action. Makes a new marker. +proc makeMarker {parent x y} \ +{ + global markerTranslations markno + set marker marker$markno; incr markno + + send $parent createMarker $marker \ + type rectangle \ + createMode interactive \ + translations $markerTranslations \ + x $x \ + y $y + + send $marker addCallback selectMarker focusIn focusOut +} + + +# WCSBOX -- Real time coordinate display. +set track_enable 0 + +proc wcsUpdate {x y} \ +{ + global track_enable frame + + # Convert screen coords to raster pixel. + send imagewin unmapPixel $x $y raster rx ry rz + + # Set the current frame to the frame the pointer is within. + if {$frame && $raster} { + set track_frame [send client getFrame $raster] + if {$frame != $track_frame} { + send client setFrame $track_frame + } + } + + # Update coords box. + if {$track_enable} { + if {$raster} { + set text [send client encodewcs $rx $ry $rz] + } else { + set text [format " %7.2f %7.2f %7.1f " $rx $ry $rz] + } + send wcsbox "set text \{$text\}; redraw noerase" + } +} + +proc setTrack {state} \ +{ + global track_enable wcsboxGeom + global winWidth winHeight + + if {$state} { + if {$track_enable} \ + return + + send imagewin createMarker wcsbox { + type text + createMode noninteractive + width 25ch + height 1ch + lineWidth 0 + imageText true + textBgColor black + textColor yellow + visible false + } + + set box_width [send wcsbox get width] + set box_height [send wcsbox get height] + set defGeom [format "%sx%s-5-5" $box_width $box_height] + send imagewin parseGeometry $wcsboxGeom $defGeom x y width height + + send wcsbox setAttributes \ + x $x \ + y $y \ + activated true \ + visible true \ + sensitive true + + send wcsbox { + addCallback wcsboxDestroyCallback destroy + addCallback wcsboxMoved moveResize + } + + send imagewin addCallback wcsboxWindowResize resize + set track_enable 1 + send imagewin getCursorPos x y + wcsUpdate $x $y + magnifierMapImage $x $y + + } elseif {$track_enable} { + set track_enable 0 + send wcsbox destroy + } +} + +proc wcsboxDestroyCallback args { + global track_enable + send imagewin deleteCallback wcsboxWindowResize + set track_enable 0 +} + +# If the window is resized make the wcsbox track the corner. +proc wcsboxWindowResize args { + global track_enable + global wcsboxGeom + + if {$track_enable} { + # Get new location. + set box_width [send wcsbox get width] + set box_height [send wcsbox get height] + set defGeom [format "%sx%s-5-5" $box_width $box_height] + send imagewin parseGeometry $wcsboxGeom $defGeom x y width height + + # Move the marker. + send wcsbox "\ + deleteCallback wcsboxMoved; \ + markpos; setAttributes x $x y $y; redraw; \ + addCallback wcsboxMoved moveResize" + } +} + +proc wcsboxMoved {marker event position} { + global wcsboxGeom + send wcsbox getRect boundary x y width height + set wcsboxGeom [send imagewin getGeometry $x $y $width $height] +} + +proc resetWcsbox {param old new} { + global track_enable wcsboxGeom displayCoords + if {$new == "done"} { + setTrack [true $displayCoords] + } elseif {$track_enable} { + setTrack 0 + if {$new == "restart"} { + set wcsboxGeom -5-5 + } + } +}; send initialize addCallback resetWcsbox + + +# PANNER. The full frame mapped into the main image window is displayed at a +# reduced resolution in a marker (known as the panner window) within the main +# image window. The currently displayed region of the frame is indicated +# using a small marker within the panner window. This small marker may be +# moved or resized to pan or zoom the image in the main display window. + +set panner_x 0 +set panner_y 0 +set panner_width 0 +set panner_height 0 +set prm_width 0 +set prm_height 0 + +set panner_enable 0 +set panner_pan_enable 0 +set panner_region_enable 0 +set panner_mapping 0 + +# Panner window translations. +set pannerWinTranslations { \ + !Shift <Btn1Motion>: m_rotateResize() + <Btn1Motion>: m_moveResize() + !Shift <Btn1Down>: m_raise() m_markpos() + <Btn1Down>: m_raise() m_markposAdd() + <Btn1Up>: m_redraw() m_destroyNull() + <Btn2Down>: m_lower() + !Ctrl <Key>b: call(prevFrame,$name) + !Ctrl <Key>f: call(nextFrame,$name) + !Ctrl <Key>h: call(move_cursor,-1,0) + !Ctrl <Key>j: call(move_cursor,0,1) + !Ctrl <Key>k: call(move_cursor,0,-1) + !Ctrl <Key>l: call(move_cursor,1,0) + !Ctrl <Key>n: call(normalize) + !Ctrl <Key>m: call(toggleMagnifier) + !Ctrl <Key>p: call(togglePanner) + !Ctrl <Key>c: call(cpZoomAction,centerFrame) + !Ctrl <Key>i: call(cpInvert) + !Ctrl <Key>s: call(cpMatchFrames) + !Ctrl <Key>r: call(cpRegisterFrames) + !Alt <Key>1: call(cpSetFrame,frame1) + !Alt <Key>2: call(cpSetFrame,frame2) + !Alt <Key>3: call(cpSetFrame,frame3) + !Alt <Key>4: call(cpSetFrame,frame4) + !Ctrl <Key>1: call(cpZoom,1,1,fixed) + !Ctrl <Key>2: call(cpZoom,2,2,fixed) + !Ctrl <Key>3: call(cpZoom,3,3,fixed) + !Ctrl <Key>4: call(cpZoom,4,4,fixed) + !Ctrl <Key>5: call(cpZoom,5,5,fixed) + !Ctrl <Key>6: call(cpZoom,6,6,fixed) + !Ctrl <Key>7: call(cpZoom,7,7,fixed) + !Ctrl <Key>8: call(cpZoom,8,8,fixed) + !Ctrl <Key>9: call(cpZoom,9,9,fixed) + <Btn2Up>: call(pannerPanXY,$x,$y) + <Key>BackSpace: m_deleteDestroy() + <Key>Delete: m_deleteDestroy() + <KeyPress>: graphics-input() + <Motion>: track-cursor() call(wcsUpdate,$x,$y) +} + + +# setPanner -- Turn the panner on or off. + +proc togglePanner args { + global panner_enable + + if {$panner_enable} { + setPanner 0 + } else { + setPanner 1 + } +} + +proc setPanner {state} \ +{ + global winWidth winHeight frameWidth frameHeight + global frame panner_mapping pannerWinTranslations pannerArea + global panner_enable panner_region_enable panner_pan_enable + global pannerGeom panner_x panner_y panner_width panner_height + + if {$state} { + if {$panner_enable} \ + return + + # Determine where to place the panner. + set scale \ + [expr sqrt(double($pannerArea) / ($frameWidth * $frameHeight))] + set scaled_width [expr int($frameWidth * $scale) / 2 * 2 + 1] + set scaled_height [expr int($frameHeight * $scale) / 2 * 2 + 1] + set defGeom [format "%sx%s-5+5" $scaled_width $scaled_height] + send imagewin parseGeometry $pannerGeom $defGeom x y width height + + # Create the main panner window (marker). + send imagewin createMarker pannerWin \ + type rectangle \ + createMode noninteractive \ + width [expr $width / 2] \ + height [expr $height / 2] \ + x [expr $x + $width / 2] \ + y [expr $y + $height / 2] \ + lineColor 8 \ + highlightColor 8 \ + translations $pannerWinTranslations \ + visible true \ + sensitive true \ + activated true + + # Update the panner window position variables so that it comes up + # in the same place the next time. + + send pannerWin getRect boundary \ + panner_x panner_y panner_width panner_height + set pannerGeom [send imagewin getGeometry \ + $panner_x $panner_y $panner_width $panner_height] + + # Register callbacks. + send frame addCallback pannerMapImage + send frameRegion addCallback pannerSetRegion + send imagewin addCallback pannerImagewinResized resize + send resize addCallback pannerImagewinResized + + send pannerWin { + addCallback pannerMapImage moveResize; + addCallback pannerMoved moveResize; + addCallback pannerDestroy destroy; + addCallback pannerWinConstraint constraint; + } + + # Map display frame to panner window. + set panner_enable 1 + set panner_region_enable 1 + set panner_mapping [send imagewin nextMapping] + pannerMapImage init; send imagewin refreshMapping $panner_mapping + + # Draw a marker in the panner window outlining displayed region. + send imagewin createMarker pannerRegionMarker \ + type box \ + createMode noninteractive \ + translations $pannerWinTranslations \ + lineColor green \ + highlightColor green \ + sensitive true + + # Fire up the panner region marker. + send client getSource raster sx sy snx sny + pannerSetRegion dummy dummy [concat $frame $sx $sy $snx $sny] + send pannerRegionMarker "\ + addCallback pannerPanImage moveResize; \ + addCallback pannerDestroy destroy; \ + addCallback pannerRegionConstraint constraint; \ + setAttributes visible true activated true; \ + redraw" + set panner_pan_enable 1 + + } elseif {$panner_enable} { + pannerDestroy + } +} + + +# pannerDestroy -- Delete the panner. + +proc pannerDestroy args { + global panner_enable panner_region_enable panner_pan_enable + global panner_mapping + + if {$panner_enable} { + set panner_enable 0 + set panner_pan_enable 0 + set panner_region_enable 0 + + send imagewin freeMapping $panner_mapping + send imagewin deleteCallback pannerImagewinResized + send resize deleteCallback pannerImagewinResized + send frame deleteCallback pannerMapImage + send frameRegion deleteCallback pannerSetRegion + + if [send server queryObject pannerRegionMarker] { + send pannerRegionMarker destroy + } + if [send server queryObject pannerWin] { + send pannerWin destroy + } + } +} + + +# pannerMapImage -- Map the current display frame into the panner window. +# Called when the frame changes or the panner window is moved or resized. +# The panner window displays a small dezoomed version of the full frame. + +proc pannerMapImage args { + global panner_enable frame + global panner_mapping + + if {!$panner_enable || $frame == 0} \ + return + + set raster [send client getRaster] + send pannerWin getRect interior dx dy dnx dny + send imagewin queryRaster $raster width height + + if [send imagewin activeMapping $panner_mapping] { + send imagewin raiseMapping $panner_mapping + } + send imagewin setMapping $panner_mapping 0 \ + $raster pixel 0 0 $width $height \ + 0 pixel $dx $dy $dnx $dny +} + + +# pannerSetRegion -- Adjust the pannerWin region marker to outline the +# region displayed in the main display window. This is called in response +# to a frameRegion event when the main display mapping changes, e.g. when +# the frame changes or the user zooms or pans the main window. The region +# marker is moved and resized to reflect the new view. + +proc pannerSetRegion {param old new} { + global panner_enable panner_region_marker + global panner_region_enable panner_pan_enable + global frame frameWidth frameHeight prm_width prm_height + + if {!$panner_enable || !$panner_region_enable || $frame == 0} \ + return + + # new: frame sx sy snx sny + set src_frame [lindex $new 0] + set sx [lindex $new 1]; set snx [lindex $new 3] + set sy [lindex $new 2]; set sny [lindex $new 4] + + if {$src_frame != $frame} \ + return + + send pannerWin getRect interior px py pnx pny + + set x [expr ($sx + $snx/2.0) / $frameWidth * $pnx + $px] + set y [expr ($sy + $sny/2.0) / $frameHeight * $pny + $py] + set width [expr ($snx/2.0) / $frameWidth * $pnx + 1] + set height [expr ($sny/2.0) / $frameHeight * $pny + 1] + + set pan_save $panner_pan_enable; set panner_pan_enable 0 + set panner_region_enable 0 + + send pannerRegionMarker "\ + markpos; \ + setAttributes x $x y $y width $width height $height; \ + redraw; raise" + send pannerRegionMarker getAttributes width prm_width height prm_height + + set panner_region_enable 1 + set panner_pan_enable $pan_save +} + + +# pannerPanImage -- Pan or zoom the image in the main image window. This is +# called when the user moves the region marker within the panner window. + +proc pannerPanImage {marker event position} { + global panner_pan_enable + global winWidth winHeight + global prm_width prm_height + + if {!$panner_pan_enable} \ + return + + # position: x y width height. + set new_width [lindex $position 2] + set new_height [lindex $position 3] + + # region: type raster x y width height. + set region [send pannerRegionMarker getRegion unmap] + set x [expr [lindex $region 2] + 1]; set width [lindex $region 4] + set y [expr [lindex $region 3] + 1]; set height [lindex $region 5] + + set panner_pan_enable 0 + if {$new_width == $prm_width && $new_height == $prm_height} { + send client pan $x $y + } else { + set xscale [expr ($winWidth / 2.0) / $width] + set yscale [expr ($winHeight / 2.0) / $height] + send client zoom $xscale $yscale $x $y + } + set panner_pan_enable 1 +} + + +# pannerPanXY -- Pan to the point X,Y in the panner window coordinate +# system. Called when the user clicks MB2 in the panner window. + +proc pannerPanXY {x y} { + send imagewin unmapPixel $x $y raster rx ry + send client pan $rx $ry +} + + +# pannerMoved -- Called when the user moves the panner window. We need to +# move the region marker to the new window location and record the new location +# so that the window will come up in the same place if closed and reopened. + +proc pannerMoved {marker event position} { + global winWidth winHeight + global frame panner_pan_enable pannerGeom + global panner_x panner_y panner_width panner_height + + # Move the region marker to the new location. + set pan_save $panner_pan_enable; set panner_pan_enable 0 + send client getSource raster sx sy snx sny + pannerSetRegion dummy dummy [concat $frame $sx $sy $snx $sny] + set panner_pan_enable $pan_save + + # Update the panner window position variables so that it comes up + # in the same place the next time. + + send pannerWin getRect boundary \ + panner_x panner_y panner_width panner_height + set pannerGeom [send imagewin getGeometry \ + $panner_x $panner_y $panner_width $panner_height] + + send pannerRegionMarker raise +} + + +# pannerWinConstraint -- Called when the panner window is moved, resized, or +# rotated. Constrain the panner window to remain within the image window; +# rotation is not permitted. + +proc pannerWinConstraint {marker event attributes} { + global winWidth winHeight + global panner_width panner_height + + set width $panner_width + set height $panner_height + set constraints [list {}] + + # Check the width and height first as we need these below. + foreach i $attributes { + set new [lindex $i 2] + switch [lindex $i 0] { + width { set ww [expr $winWidth / 2] + if {$new > $ww} { + lappend constraints "width $ww" + set width $ww + } else { + set width $new + } + } + height { set wh [expr $winHeight / 2] + if {$new > $wh} { + lappend constraints "height $wh" + set height $wh + } else { + set height $new + } + } + rotangle { lappend constraints "rotangle 0" + } + } + } + + # Constrain X and Y. + foreach i $attributes { + set new [lindex $i 2] + switch [lindex $i 0] { + x { set pw [expr $width / 2] + if {$new < $pw} { + lappend constraints "x $pw" + } elseif {$new > $winWidth - $pw} { + lappend constraints "x [expr $winWidth - $pw]" + } + } + y { set ph [expr $height / 2] + if {$new < $ph} { + lappend constraints "y $ph" + } elseif {$new > $winHeight - $ph} { + lappend constraints "y [expr $winHeight - $ph]" + } + } + } + } + + return $constraints +} + + +# pannerRegionConstraint -- Called when the region marker in the panner +# window is moved, resized, or rotated. + +proc pannerRegionConstraint {marker event attributes} { + global winWidth winHeight + + set constraints [list {}] + send pannerWin getRect interior p_x p_y p_width p_height + send pannerRegionMarker getAttributes width rwidth height rheight + + # Since the panner region marker is a box marker x,y and width,height + # will not both change in the same call, so we can process them all + # independently. + + foreach i $attributes { + set new [lindex $i 2] + + switch [lindex $i 0] { + x { set left [expr $p_x + $rwidth + 1] + set right [expr $p_x + $p_width - $rwidth - 1] + if {$new < $left} { + lappend constraints "x $left" + } elseif {$new > $right} { + lappend constraints "x $right" + } + } + y { set top [expr $p_y + $rheight + 1] + set bottom [expr $p_y + $p_height - $rheight - 1] + if {$new < $top} { + lappend constraints "y $top" + } elseif {$new > $bottom} { + lappend constraints "y $bottom" + } + } + width { set ww [expr $winWidth / 2] + if {$new > $ww / 2} { + lappend constraints "width $ww" + } + } + height { set wh [expr $winHeight / 2] + if {$new > $wh / 2} { + lappend constraints "height $wh" + } + } + rotangle { lappend constraints "rotangle 0" + } + } + } + + return $constraints +} + + +# pannerImagewinResized -- If the display window is resized make the panner +# track the corner. + +proc pannerImagewinResized args { + global panner_enable panner_mapping + global pannerGeom panner_x panner_y panner_width panner_height + + if {$panner_enable} { + set old_x $panner_x; set old_width $panner_width + set old_y $panner_y; set old_height $panner_height + + # Get new location of panner window. + set defGeom [format "%sx%s-5+5" $panner_width $panner_height] + send imagewin parseGeometry $pannerGeom $defGeom x y width height + + # Reposition the marker. + send pannerWin "\ + markpos; \ + setAttributes \ + x [expr $x + $width / 2] \ + y [expr $y + $height / 2] \ + width [expr $width / 2] \ + height [expr $height / 2]; \ + redraw" + + # Update the panner window position variables so that it comes up + # in the same place the next time. + send pannerWin getRect boundary \ + panner_x panner_y panner_width panner_height + set pannerGeom [send imagewin getGeometry \ + $panner_x $panner_y $panner_width $panner_height] + + # Make sure the panner window is on top. + send imagewin raiseMapping $panner_mapping + + # Refresh the panner window if it did not move. + if {$panner_x == $old_x && $panner_y == $old_y && + $panner_width == $old_width && $panner_height == $old_height} { + send imagewin refreshMapping $panner_mapping + } + } +} + + +# resetPanner -- Reinitialize the panner. + +proc resetPanner {param old new} { + global pannerGeom displayPanner + if {$new == "done"} { + setPanner [true $displayPanner] + } else { + setPanner 0 + if {$new != "startup"} { + set pannerGeom -5+5 + } + } +}; send initialize addCallback resetPanner + + + +# MAGNIFIER. A subraster around the cursor in the main image window is +# displayed at a high resolution in a marker (known as the magnifier window) +# within the main image window. + +set magnifier_x 0 +set magnifier_y 0 +set magnifier_width 0 +set magnifier_height 0 +set mrm_width 0 +set mrm_height 0 + +set magnifier_enable 0 +set magnifier_mag_enable 0 +set magnifier_mapping 0 + +createMenu magzoomMenu imagewin { + { "Zoom Factors" f.title } + { f.dblline } + { "Zoom 1" f.exec "setMagnifierZoom 1" } + { "Zoom 2" f.exec "setMagnifierZoom 2" } + { "Zoom 4" f.exec "setMagnifierZoom 4" } + { "Zoom 8" f.exec "setMagnifierZoom 8" } + { "Zoom 16" f.exec "setMagnifierZoom 16" } +} + +# Magnifier window translations. +set magnifierWinTranslations { \ + !Shift <Btn1Motion>: m_rotateResize() + <Btn1Motion>: m_moveResize() + !Shift <Btn1Down>: m_raise() m_markpos() + <Btn1Down>: m_raise() m_markposAdd() + <Btn1Up>: m_redraw() m_destroyNull() + <Btn2Down>: m_lower() + <Btn3Down>: popup(magzoomMenu) + <Btn3Up>: popdown(magzoomMenu) + !Ctrl <Key>m: call(toggleMagnifier) + !Ctrl <Key>p: call(togglePanner) + <Key>BackSpace: m_deleteDestroy() + <Key>Delete: m_deleteDestroy() + <KeyPress>: graphics-input() + <Motion>: track-cursor() call(wcsUpdate,$x,$y) +} + + +# setMagnifier -- Turn the magnifier on or off. + +set magAlreadyOn 0 + +proc setDynamicMagnifier {state} \ +{ + global magAlreadyOn magnifier_enable + + if {$state} { + set magAlreadyOn $magnifier_enable + } + if {$magAlreadyOn} { + return + } else { + setMagnifier $state + } +} + + +proc toggleMagnifier args { + global magnifier_enable + + if {$magnifier_enable} { + setMagnifier 0 + send pbMagM set state False + } else { + setMagnifier 1 + send pbMagM set state True + } +} + + +proc setMagnifier {state} \ +{ + global winWidth winHeight frameWidth frameHeight + global frame magnifier_mapping magnifierWinTranslations magnifierArea + global magnifier_enable magnifier_height + global magnifierGeom magnifier_x magnifier_y magnifier_width + + if {$state} { + if {$magnifier_enable} \ + return + + # Determine where to place the magnifier. + set scale [expr sqrt(double($magnifierArea) / (512 * 512))] + set scaled_width [expr int(512 * $scale) / 2 * 2 + 1] + set scaled_height [expr int(512 * $scale) / 2 * 2 + 1] + set defGeom [format "%sx%s-5+5" $scaled_width $scaled_height] + send imagewin parseGeometry $magnifierGeom $defGeom x y width height + + # Create the main magnifier window (marker). + send imagewin createMarker magnifierWin \ + type rectangle \ + createMode noninteractive \ + width [expr $width / 2] \ + height [expr $height / 2] \ + x [expr $x + $width / 2] \ + y [expr $y + $height / 2] \ + lineColor 8 \ + highlightColor 8 \ + translations $magnifierWinTranslations \ + visible true \ + sensitive true \ + activated true + + # Update the magnifier window position variables so that it comes up + # in the same place the next time. + + send magnifierWin getRect boundary \ + magnifier_x magnifier_y magnifier_width magnifier_height + set magnifierGeom [send imagewin getGeometry \ + $magnifier_x $magnifier_y $magnifier_width $magnifier_height] + + # Register callbacks. + send imagewin addCallback magnifierImagewinResized resize + send resize addCallback magnifierImagewinResized + send magnifierWin addCallback magnifierMovedMapImage moveResize + + send magnifierWin { + addCallback magnifierMoved moveResize; + addCallback magnifierDestroy destroy; + addCallback magnifierWinConstraint constraint; + } + + # Map display frame to magnifier window. + set magnifier_enable 1 + set magnifier_mapping [send imagewin nextMapping] + send imagewin refreshMapping $magnifier_mapping + + # create cross-hair + send imagewin createMarker magPointer \ + type rectangle \ + createMode noninteractive \ + width 3 \ + height 3 \ + lineWidth 3 \ + lineColor green \ + highlightcolor green \ + activated true \ + visible true + + # set its position and size + setMagPointerPosition + magnifierMapImage [expr $winWidth / 2] [expr $winHeight / 2] + + } elseif {$magnifier_enable} { + magnifierDestroy + } +} + + +# magnifierDestroy -- Delete the magnifier. + +proc magnifierDestroy args { + global magnifier_enable + global magnifier_mapping + + if {$magnifier_enable} { + set magnifier_enable 0 + + send imagewin freeMapping $magnifier_mapping + send imagewin deleteCallback magnifierImagewinResized + send resize deleteCallback magnifierImagewinResized + send frame deleteCallback magnifierMapImage + + if [send server queryObject magnifierWin] { + send magnifierWin destroy + } + if [send server queryObject magPointer] { + send magPointer destroy + } + } +} + + +# magnifierMoved -- Called when the user moves the magnifier window. We need to +# move the region marker to the new window location and record the new location +# so that the window will come up in the same place if closed and reopened. + +proc magnifierMoved {marker event position} { + global winWidth winHeight magnifierGeom frame + global magnifier_x magnifier_y magnifier_width magnifier_height + + # Move the region marker to the new location. + send client getSource raster sx sy snx sny + + # Update the magnifier window position variables so that it comes up + # in the same place the next time. + + send magnifierWin getRect boundary \ + magnifier_x magnifier_y magnifier_width magnifier_height + set magnifierGeom [send imagewin getGeometry \ + $magnifier_x $magnifier_y $magnifier_width $magnifier_height] +} + + +# magnifierWinConstraint -- Called when the magnifier window is moved, resized, +# or rotated. Constrain the magnifier window to remain within the image window; +# rotation is not permitted. + +proc magnifierWinConstraint {marker event attributes} { + global winWidth winHeight + global magnifier_width magnifier_height + + set width $magnifier_width + set height $magnifier_height + set constraints [list {}] + + # Check the width and height first as we need these below. + foreach i $attributes { + set new [lindex $i 2] + switch [lindex $i 0] { + width { set ww [expr $winWidth / 2] + if {$new > $ww} { + lappend constraints "width $ww" + set width $ww + } else { + set width $new + } + } + height { set wh [expr $winHeight / 2] + if {$new > $wh} { + lappend constraints "height $wh" + set height $wh + } else { + set height $new + } + } + rotangle { lappend constraints "rotangle 0" + } + } + } + + # Constrain X and Y. + foreach i $attributes { + set new [lindex $i 2] + switch [lindex $i 0] { + x { set pw [expr $width / 2] + if {$new < $pw} { + lappend constraints "x $pw" + } elseif {$new > $winWidth - $pw} { + lappend constraints "x [expr $winWidth - $pw]" + } + } + y { set ph [expr $height / 2] + if {$new < $ph} { + lappend constraints "y $ph" + } elseif {$new > $winHeight - $ph} { + lappend constraints "y [expr $winHeight - $ph]" + } + } + } + } + + return $constraints +} + + +# magnifierRegionConstraint -- Called when the region marker in the magnifier +# window is moved, resized, or rotated. + +proc magnifierRegionConstraint {marker event attributes} { + global winWidth winHeight + + set constraints [list {}] + send magnifierWin getRect interior p_x p_y p_width p_height + + # Since the magnifier region marker is a box marker x,y and width,height + # will not both change in the same call, so we can process them all + # independently. + + foreach i $attributes { + set new [lindex $i 2] + + switch [lindex $i 0] { + x { set left [expr $p_x + $rwidth + 1] + set right [expr $p_x + $p_width - $rwidth - 1] + if {$new < $left} { + lappend constraints "x $left" + } elseif {$new > $right} { + lappend constraints "x $right" + } + } + y { set top [expr $p_y + $rheight + 1] + set bottom [expr $p_y + $p_height - $rheight - 1] + if {$new < $top} { + lappend constraints "y $top" + } elseif {$new > $bottom} { + lappend constraints "y $bottom" + } + } + width { set ww [expr $winWidth / 2] + if {$new > $ww / 2} { + lappend constraints "width $ww" + } + } + height { set wh [expr $winHeight / 2] + if {$new > $wh / 2} { + lappend constraints "height $wh" + } + } + rotangle { lappend constraints "rotangle 0" + } + } + } + + return $constraints +} + + +# magnifierImagewinResized -- If the display window is resized make the +# magnifier track the corner. + +proc magnifierImagewinResized args { + global magnifier_enable magnifier_mapping magnifier_height + global magnifierGeom magnifier_x magnifier_y magnifier_width + + if {$magnifier_enable} { + set old_x $magnifier_x; set old_width $magnifier_width + set old_y $magnifier_y; set old_height $magnifier_height + + # Get new location of magnifier window. + set defGeom [format "%sx%s+5+5" $magnifier_width $magnifier_height] + send imagewin parseGeometry $magnifierGeom $defGeom x y width height + + # Reposition the marker. + send magnifierWin "\ + markpos; \ + setAttributes \ + x [expr $x + $width / 2] \ + y [expr $y + $height / 2] \ + width [expr $width / 2] \ + height [expr $height / 2]; \ + redraw" + + # Update the magnifier window position variables so that it comes up + # in the same place the next time. + send magnifierWin getRect boundary \ + magnifier_x magnifier_y magnifier_width magnifier_height + set magnifierGeom [send imagewin getGeometry \ + $magnifier_x $magnifier_y $magnifier_width $magnifier_height] + + # Make sure the magnifier window is on top. + send imagewin raiseMapping $magnifier_mapping + + # Refresh the magnifier window if it did not move. + if {$magnifier_x == $old_x && $magnifier_y == $old_y && + $magnifier_width == $old_width && $magnifier_height == $old_height} { + send imagewin refreshMapping $magnifier_mapping + } + } +} + + +# resetMagnifier -- Reinitialize the magnifier. + +proc resetMagnifier {param old new} { + global magnifierGeom displayMagnifier + if {$new == "done"} { + setMagnifier [true $displayMagnifier] + } else { + setMagnifier 0 + if {$new != "startup"} { + set magnifierGeom +5+5 + } + } +}; send initialize addCallback resetMagnifier + + +set last_mag_x [expr $winWidth / 2] +set last_mag_y [expr $winHeight / 2] + +# magnifierMovedMapImage -- Front end to magnifierMapImage, called when +# magnifier window is moved or resized. + +proc magnifierMovedMapImage args { + global last_mag_x last_mag_y + + magnifierMapImage $last_mag_x $last_mag_y + setMagPointerPosition +} + + +# The following code was borrowed from the SAOtng GUI by Eric Mandel of SAO +#-------------------------------------------------------------------------- + +# globals for magnifier +set mag_w 0 +set mag_h 0 + +# +# setMagnifierZoom -- set the zoom factor for the magnifier +# +proc setMagnifierZoom { zoom } \ +{ + global mag_w mag_h + + send magnifierWin getRect boundary \ + magnifier_x magnifier_y magnifier_width magnifier_height + set mag_w [expr int( ( $magnifier_width + $zoom - 1 ) / $zoom) ] + set mag_h [expr int( ( $magnifier_height + $zoom - 1 ) / $zoom) ] + + #set mw [expr int (($magnifier_width - 1) / ($mag_w * 2))] + #if { $mw < 4 } { set mw 4 } + #set mh [expr int (($magnifier_height - 1) / ($mag_h * 2))] + #if { $mh < 4 } { set mh 4 } + #send magPointer "setAttributes width $mw height $mh; redraw" +} + +# magnifierMapImage -- Map the of the current display frame centered on the +# pointer into the magnifier window. Called when the frame changes, the +# pointer moves in the main image window, or (via magnifierMovedMapImage) +# the magnifier window is moved or resized. + +set magnifierROP 0 + +proc magnifierMapImage {x y} \ +{ + global magnifier_enable frame + global last_mag_x last_mag_y + global magnifier_mapping + global winWidth winHeight + global mag_w mag_h + global magnifierROP + + if {!$magnifier_enable || $frame == 0} \ + return + + if {abs($last_mag_x-$x) != 1 && abs($last_mag_y-$y) != 1} { + # For efficiency we won't compute the sqrt of the distance but instead + # just compare the square. Use a threshold of 6 pixels so when we + # narrow in on the ROI the magnifier is still (mostly) correctly. + set diff [expr (($last_mag_x-$x) * ($last_mag_x-$x)) + \ + (($last_mag_y-$y) * ($last_mag_y-$y))] + if {$diff > 36} { + set last_mag_x $x + set last_mag_y $y + return + } + } + + set last_mag_x $x + set last_mag_y $y + + send magnifierWin getRect interior dx dy dnx dny + if [send imagewin activeMapping $magnifier_mapping] { + send imagewin raiseMapping $magnifier_mapping + } + # initialize the magnifier zoom factor, if necessary + if { !$mag_w || !$mag_h } { + setMagnifierZoom 4 + } + + set sx [expr $x - $mag_w / 2 ] + set sy [expr $y - $mag_h / 2 ] + + # Constrain the source rectangle within the main image window + # (not overlapping an edge or the magnifier window). + + if {$sx > [expr $dx - $mag_w] && $sx < [expr $dx + $dnx] && + $sy > [expr $dy - $mag_h] && $sy < [expr $dy + $dny] } { + + # The source rectangle would overlap the magnifier window; fix that. + + set dist(l) [expr $sx - ($dx - $mag_w)] + set dist(b) [expr $dy + $dny - $sy] + set dist(r) [expr $dx + $dnx - $sx] + set dist(t) [expr $sy - ($dy - $mag_h)] + + # Put the distances in order. + + foreach j [array names dist] { + set alreadyset($j) 0 + } + + for {set i 0} {$i < 4} {incr i} { + set candidate "" + foreach j [array names dist] { + if {!$alreadyset($j)} { + if {$candidate == ""} { + set candidate $j + set minsofar $dist($j) + } elseif {$dist($j) < $minsofar} { + set candidate $j + set minsofar $dist($j) + } + } + } + set order($i) $candidate + set alreadyset($candidate) 1 + } + + # Try the sides in order, using the first one where there's room. + + for {set i 0} {$i < 4} {incr i} { + if {$order($i) == "l"} { + if {$dx >= $mag_w} { + set sx [expr $dx - $mag_w] + break + } + } elseif {$order($i) == "b"} { + if {$winHeight >= $dy + $dny + $mag_h} { + set sy [expr $dy + $dny] + break + } + } elseif {$order($i) == "r"} { + if {$winWidth >= $dx + $dnx + $mag_w} { + set sx [expr $dx + $dnx] + break + } + } elseif {$order($i) == "t"} { + if {$dy >= $mag_h} { + set sy [expr $dy - $mag_h] + break + } + } + } + } + + # Make sure we don't go beyond an edge of the main window. + + if {$sx < 0} { + set sx 0 + } else { + set sxmax [expr $winWidth - $mag_w] + if {$sx > $sxmax} { + set sx $sxmax + } + } + + if {$sy < 0} { + set sy 0 + } else { + set symax [expr $winHeight - $mag_h] + if {$sy > $symax} { + set sy $symax + } + } + + # Map 32 x 32 centered on pointer in main window. + set err [catch {send imagewin setMapping $magnifier_mapping $magnifierROP \ + 0 pixel $sx $sy $mag_w $mag_h \ + 0 pixel $dx $dy $dnx $dny}] + if { $err != 0 } { + Print "There was a problem setting up the magnifier ... recovering" + } +} + + +# set the position of the magnifier marker in the center of the mag window +proc setMagPointerPosition args \ +{ + global magnifier_enable + + if { !$magnifier_enable } { + return + } + + send magnifierWin "getAttributes x x y y" + set xpos [expr $x + 1] + set ypos [expr $y + 1] + + send magPointer "setAttributes x $xpos y $ypos visible true; redraw" +} + + + +# FRAME BLINK. +set blinkId 0 +set blinkIndex 0 + +proc toggleBlink args { + global blinkId blinkRate blinkIndex + global optionsMenuDescription + + if {$blinkId} { + deleteTimedCallback $blinkId + set blinkId 0 + } else { + set blinkId [postTimedCallback blink [expr int($blinkRate * 1000)]] + } + + set blinkIndex 0 + editMenu optionsMenu viewButton $optionsMenuDescription +} + +proc blink args { + global blinkId blinkRate blinkFrames blinkIndex + + send client setFrame [lindex $blinkFrames $blinkIndex] + incr blinkIndex + if {$blinkIndex >= [llength $blinkFrames]} { + set blinkIndex 0 + } + + set blinkId [postTimedCallback blink [expr int($blinkRate * 1000)]] +} + +proc resetBlink args { + global blinkId + if {$blinkId} \ + toggleBlink +}; send initialize addCallback resetBlink + + + +# Normalize -- Reset the view parameters for the current frame. +proc normalize args { + global zoomindex zoomfactor + global frameWidth frameHeight + global xcen ycen frame + + #set zoomindex($frame) 0 + #set xcen [expr $frameWidth / 2] + #set ycen [expr $frameHeight / 2] + #send client zoom 1 1 $xcen $ycen + send client windowColormap 0.5 1.0 +} + + +# Popdown menus. +createMenu fileMenu fileButton { + { "Info" f.exec { + send info map + infoUpdate + } } + { "Load" f.exec { + send client setLoadOption rescan + send load_panel map + set loadP_up 1 + } } + { "Save" f.exec { + Save + } } + { "Save As..." f.exec { + send save_panel map + set saveP_up 1 + } } + { "Print" f.exec { + send imagewin setCursorType busy + Print + send imagewin setCursorType idle + } } + { "Print Setup" f.exec { + send print_panel map + set printP_up 1 + } } + { "TclShell" f.exec { + send tclShell map + } } + { f.line } + { "Reset" f.exec { + # Do a hard reset. + send client Reset + #resetView initialize done done + } } + { "Quit" f.exec Quit } +} + +createMenu viewMenu viewButton { + { "Next frame" f.exec nextFrame } + { "Prev frame" f.exec prevFrame } + { f.line } + { "Colormap" f.menu cmapMenu } + { "Flip" f.menu flipMenu } + { f.line } + { "Equal aspect" f.exec { + set xmag $frameZoomX($frame) + set ymag $frameZoomY($frame) + set zoom [expr ($xmag + $ymag) / 2.0] + cpZoom $zoom $zoom fixed + } } + { "Integer zoom" f.exec { + set xmag [expr round ($frameZoomX($frame))] + set ymag [expr round ($frameZoomY($frame))] + cpZoom $xmag $ymag fixed + } } + { "Toggle zoom" f.exec toggleZoom } + { "Unzoom" f.exec { + set zoomindex($frame) 0 + set mag $zoomfactor($zoomindex($frame)) + send client zoom $mag $mag $xcen $ycen + } } +} + +createMenu cmapMenu viewMenu { + { "Colormaps" f.title } + { f.dblline } + { "Normalize" f.exec normalize } + { "Invert" f.exec cpInvert } + { "Optimize" f.exec cpOptimize sensitive false } + { f.line } + { "Grayscale" f.exec "send client setColormap Grayscale" } + { "Color" f.exec "send client setColormap Color" } + { "Heat" f.exec "send client setColormap Heat" } + { "HSV" f.exec "send client setColormap HSV" } + { "AIPS0" f.exec "send client setColormap AIPS0" } + { "Halley" f.exec "send client setColormap Halley" } + { "Ramp" f.exec "send client setColormap Ramp" } + { "Standard" f.exec "send client setColormap Standard" } + { "Staircase" f.exec "send client setColormap Staircase" } + { "Rainbow1" f.exec "send client setColormap Rainbow1" } + { "Rainbow2" f.exec "send client setColormap Rainbow2" } + { "Random8" f.exec "send client setColormap Random8" } +} + +createMenu flipMenu viewMenu { + { "Flip X" f.exec xflip } + { "Flip Y" f.exec yflip } + { "Flip XY" f.exec xyflip } +} + +set optionsMenuDescription { + { "Autoscale" f.exec { + set value [send autoscaleButton get on] + send autoscaleButton set on [expr !$value] + cpSetAutoscale + } } + { "Antialias" f.exec { + set value [send antialiasButton get on] + send antialiasButton set on [expr !$value] + cpSetAntialias + } } + { "Panner" f.exec { setPanner [expr !$panner_enable] } } + { "Magnifier" f.exec { setMagnifier [expr !$magnifier_enable] }} + { "Coords box" f.exec { setTrack [expr !$track_enable] } } + { "Tile frames" f.exec { + set value [send tileFramesButton get on] + send tileFramesButton set on [expr !$value] + cpSetTileFrames + } } + { "Clear frame" f.exec clearFrame } + { "Fit frame" f.exec fitFrame } + { "Match LUTs" f.exec cpMatchFrames } + { "Register" f.exec cpRegisterFrames } + { {$blinkId ? "Stop blink" : "Blink frames"} + f.exec toggleBlink } + { f.line } + { "Control Panel" f.exec { panel + set panel_up 1 + } } + { "Print Panel" f.exec { send print_panel map + set printP_up 1 + } } + { "Load Panel" f.exec { send client setLoadOption rescan + send load_panel map + set loadP_up 1 + } } + { "Save Panel" f.exec { send save_panel map + set saveP_up 1 + } } +}; createMenu optionsMenu optionsButton $optionsMenuDescription + + +# MAIN CONTROL PANEL +# --------------------------- + + +foreach i $frames {set saveView($i) "1 1"} + +send prevFrame set bitmap larrow +send nextFrame set bitmap rarrow +send contrastLabel set bitmap contrast +send brightnessLabel set bitmap brightness +send contrastSlider resizeThumb 0.1 1.0 +send brightnessSlider resizeThumb 0.1 1.0 + +proc controlPanelDone args { + global panel_up + send controlShell unmap + send panelButton set state 0 + set panel_up 0 +}; send doneButton addCallback controlPanelDone + +# panel -- Toggle control panel display. +proc panel args { + global panel_up + if {$panel_up} { + send controlShell unmap + send panelButton set state 0 + set panel_up 0 + } else { + send controlShell map + send panelButton set state 1 + set panel_up 1 + } +} + +# resetPanel -- Calling during startup or in an initialize, to reset things. +proc resetPanel {param old new} { + global frame nframes frames + global displayPanner displayCoords displayMagnifier + global blinkFrames warnings + + switch $new { + startup { + } + restart { foreach i $frames { + send frame$frame set on 0 + } + } + done { if {$frame} { + send frame$frame set on 1 + } + + cpResetBlink + set button 1 + foreach i $blinkFrames { + send blinkFrame$button set label $i + incr button + } + + cpResetEnhance + send pannerButton set on [true $displayPanner] + send magnifierButton set on [true $displayMagnifier] + send coordsBoxButton set on [true $displayCoords] + send warningsButton set on $warnings + } + } +}; send initialize addCallback resetPanel + + +# Frame selection. +# ------------------------------- +proc cpSetFrame {widget args} { + send $widget set on 0 + send client setFrame [send $widget get label] +} + +proc cpFrameChanged {param old new} { + if {$old > 0} { + send frame$old set on 0 + } + if {$new > 0} { + send frame$new set on 1 + } +} + +send prevFrame addCallback prevFrame +send nextFrame addCallback nextFrame +send frame addCallback cpFrameChanged +foreach i $frames {send frame$i addCallback cpSetFrame} + +# Frame buttons. +proc cpFrameAction {widget args} { + global frameZoomX frameZoomY frame + switch $widget { + aspect { set xmag $frameZoomX($frame) + set ymag $frameZoomY($frame) + set zoom [expr round (($xmag + $ymag) / 2.0)] + cpZoom $zoom $zoom fixed + } + flipX { send client flip x } + flipY { send client flip y } + flipXY { send client flip x y } + clearFrame { clearFrame } + fitFrame { fitFrame } + } +} +foreach widget {aspect flipX flipY flipXY clearFrame fitFrame} { + send $widget addCallback cpFrameAction +} + +# clearFrame -- Clear the current display frame. +proc clearFrame args { + global warnings + if {$warnings} { + Wexec client \ + "Clearing the frame will destroy\n\ + all data in the frame" \ + clearFrame + } else { + send client clearFrame + } +} + +# fitFrame -- Resize the display window to fit the frame buffer. +proc fitFrame args { + global frameWidth frameHeight winWidth winHeight + set dw [expr [send display get width] - $winWidth] + set dh [expr [send display get height] - $winHeight] + send display "resize [expr $frameWidth + $dw] [expr $frameHeight + $dh]" +}; + +proc initFitFrame { param old new } { + if { [lindex $new 0] == "resize"} { + fitFrame + } + pannerMapImage init +}; send frameFit addCallback initFitFrame + + +# Zoom and pan buttons. +# ------------------------------- +proc cpZoomAction {widget args} { + global frameWidth frameHeight + + switch $widget { + x1 { cpZoom 1 1 fixed } + + z2 { cpZoom 2 2 fixed } + z3 { cpZoom 3 3 fixed } + z4 { cpZoom 4 4 fixed } + z5 { cpZoom 5 5 fixed } + z8 { cpZoom 8 8 fixed } + + d2 { cpZoom [expr 1.0/2] [expr 1.0/2] fixed } + d3 { cpZoom [expr 1.0/3] [expr 1.0/3] fixed } + d4 { cpZoom [expr 1.0/4] [expr 1.0/4] fixed } + d5 { cpZoom [expr 1.0/5] [expr 1.0/5] fixed } + d8 { cpZoom [expr 1.0/8] [expr 1.0/8] fixed } + + zoomIn { cpZoom 2.0 2.0 relative } + zoomOut { cpZoom 0.5 0.5 relative } + + centerFrame { send client pan \ + [expr $frameWidth/2.0] \ + [expr $frameHeight/2.0] + } + + toggleZoom { toggleZoom } + } +} + +proc cpZoom {zoom_x zoom_y mode} { + global frameZoomX frameZoomY zoomindex frame + + if {$mode == "fixed"} { + send client zoom $zoom_x $zoom_y + } else { + send client zoom \ + [expr $frameZoomX($frame) * $zoom_x] \ + [expr $frameZoomY($frame) * $zoom_y] + } + + set zoomindex($frame) 0 +} + +proc toggleZoom args { + global frameZoomX frameZoomY frameCenterX frameCenterY + global frameWidth frameHeight saveView frame + + if {$frameZoomX($frame) != 1 && $frameZoomY($frame) != 1} { + set saveView($frame) \ + "$frameZoomX($frame) $frameZoomY($frame) \ + $frameCenterX($frame) $frameCenterY($frame)" + send client zoom 1 1 \ + [expr $frameWidth/2.0] \ + [expr $frameHeight/2.0] + } else { + send client zoom $saveView($frame) + } +} + +foreach widget {toggleZoom centerFrame zoomIn zoomOut \ + x1 z2 z3 z4 z5 z8 d2 d3 d4 d5 d8} { + send $widget addCallback cpZoomAction +} + +# Frame data display. +# ------------------------------- +set cpFrame 0 +set cpXcen 0 +set cpYcen 0 +set cpXmag 0 +set cpYmag 0 +set cpXscale 0 +set cpYscale 0 + +proc cpDisplayFrameData {name old new} { + global cpFrame cpXcen cpYcen + global cpXmag cpYmag cpXscale cpYscale + + set update 0 + switch $name { + frame { if {$new != $cpFrame} { + set cpFrame $new + set update 1 + } + } + frameView { # Parse the frameView input. + set xmag [lindex $new 0]; set ymag [lindex $new 1] + set xcen [lindex $new 2]; set ycen [lindex $new 3] + set xnorm [lindex $new 4]; set ynorm [lindex $new 5] + + # We need client coords and the overall scale factors. + set text [send client encodewcs $xcen $ycen] + set xcen [lindex $text 0] + set ycen [lindex $text 1] + set xscale [expr $xmag * $xnorm] + set yscale [expr $ymag * $ynorm] + + if {$xcen != $cpXcen || $ycen != $cpYcen || + $xmag != $cpXmag || $ymag != $cpYmag || + $xscale != $cpXscale || $yscale != $cpYscale} { + + set cpXcen $xcen; set cpXscale $xscale + set cpYcen $ycen; set cpYscale $yscale + set cpXmag $xmag; set cpYmag $ymag + set update 1 + } + } + } + + if {$update} { + set header [format "-- Frame %d --" $cpFrame] + set center [format "X center: %0.1f\nY center: %0.1f" $cpXcen $cpYcen] + if {int($cpXmag) >= 10} { + set zoom1 [format " X zoom: %0.1f" $cpXmag] + set zoom2 [format " Y zoom: %0.1f" $cpYmag] + } else { + set zoom1 [format "X zoom: %0.1f" $cpXmag] + set zoom2 [format "Y zoom: %0.1f" $cpYmag] + } + if {int($cpXscale) >= 10} { + set scale1 [format "X scale: %0.1f" $cpXscale] + set scale2 [format "Y scale: %0.1f" $cpYscale] + } else { + set scale1 [format "X scale: %0.2f" $cpXscale] + set scale2 [format "Y scale: %0.2f" $cpYscale] + } + send frameData set label [format "%s\n%s\n%s\n%s\n%s\n%s" \ + $header $center $scale1 $scale2 $zoom1 $zoom2] + } +}; foreach p {frame frameView} {send $p addCallback cpDisplayFrameData} + + +# Frame enhancement. +# ------------------------------- +set cpEnhanceDisable 0 +set cpEnhanceId 0 +set cpEnhanceMode none +set cpEnhanceVal 0 +set cpListItem none + +# Windowing the colormap is slow when the mouse is not in the image window, +# so it is necessary to execute the windowColormap in a work procedure. +# This allows any number of slider motion events to be processed for each +# windowColormap, preventing slider events from queueing up. + +proc cpResetEnhance args { + global cpListItem cpEnhanceId + set cpListItem none + set cpEnhanceId 0 +} + +proc cpSetEnhancement {widget cbtype x y} { + global cpEnhanceMode cpEnhanceVal cpEnhanceId cpEnhanceDisable + set cpEnhanceMode $widget + set cpEnhanceVal $x + if {!$cpEnhanceId && !$cpEnhanceDisable} { + set cpEnhanceId [postWorkProc cpEnhanceProc] + } +} +proc cpEnhanceProc args { + global cpEnhanceMode cpEnhanceVal cpEnhanceId + global enhancement frame maxContrast + set val $cpEnhanceVal + + if {$cpEnhanceMode == "contrastSlider"} { + set contrast [lindex $enhancement($frame) 2] + send client windowColormap [lindex $enhancement($frame) 1] \ + [expr (($contrast < 0) ? -$val : $val) * $maxContrast] + } else { + send client windowColormap $val + } + + set cpEnhanceId 0 + return done +} + +proc cpInvert args { + global enhancement frame + set contrast [lindex $enhancement($frame) 2] + send client windowColormap [lindex $enhancement($frame) 1] \ + [expr -1.0 * $contrast] +} + +proc cpDisplayEnhancement {param old new} { + global cpEnhanceId maxContrast cpEnhanceDisable + global cpListItem enhancement frame + + if {!$frame} \ + return + set enhance $enhancement($frame) + if {[llength $enhance] < 3} \ + return + + set colortable [lindex $enhance 0] + set offset [lindex $enhance 1] + set scale [lindex $enhance 2] + + send colordata set label [format "-- %s --\nCon %0.2f Brt %0.2f" \ + $colortable $scale $offset] + + if {$colortable != $cpListItem} { + send colorlist highlight $colortable + set cpListItem $colortable + } + + if {!$cpEnhanceId && !$cpEnhanceDisable} { + set cpEnhanceDisable 1 + send contrastSlider moveThumb [expr abs($scale) / $maxContrast] + send brightnessSlider moveThumb $offset + set cpEnhanceDisable 0 + } +} + +foreach i {enhancement frame} { + send $i addCallback cpDisplayEnhancement +} +send contrastSlider addCallback cpSetEnhancement scroll +send brightnessSlider addCallback cpSetEnhancement scroll +send invertButton addCallback cpInvert + + +# Colortable display and selection. +# ------------------------------- +set cpScrollHeight 0 + +proc cpSetColorList {param old new} { + send colorlist setList $new resize +}; send colortables addCallback cpSetColorList + +proc cpResizeScrollbar {widget cbtype flags x y w h cw ch} { + global cpScrollHeight + set newHeight [expr $ch - $h] + if {$newHeight && $newHeight != $cpScrollHeight} { + send colorlistScroll setScrollbar 0.0 [expr double($h) / $ch] + set rowHeight [send colorlist get rowHeight] + set rowSpacing [send colorlist get rowSpacing] + send colorlistScroll set increment [expr ($ch <= $h) ? 0 : \ + "double ($rowHeight + $rowSpacing) / ($ch - $h)"] + set cpScrollHeight $newHeight + } +}; send colorlistPort addCallback cpResizeScrollbar + +proc cpScrollColorlist {widget cbtype pos} { + global cpScrollHeight + send colorlist set y [expr -int($cpScrollHeight * $pos)] +}; send colorlistScroll addCallback cpScrollColorlist scroll + +proc cpSelectColor {widget cbtype selections indices} { + global colortable + foreach selection $selections { + send client setColormap $selection + } +}; send colorlist addCallback cpSelectColor + + +# Frame blink. +# ------------------------------- +send BRtext set label $blinkRate + +proc cpSetBlinkRate {widget args} { + global blinkRate + if {$widget == "BRincrease"} { + if {$blinkRate < 0.01} { + set blinkRate 0.125 + } else { + set blinkRate [expr $blinkRate * 2.0] + } + } else { + set blinkRate [expr $blinkRate / 2.0] + if {$blinkRate < 0.01} { + set blinkRate 0 + } + } + send BRtext set label $blinkRate +} +foreach widget {BRincrease BRdecrease} { + send $widget addCallback cpSetBlinkRate +} + +proc cpSetBlinkFrame {widget args} { + global blinkFrames nframes + + set frame [send $widget get label] + if {$frame == " "} { + set frame 1 + } else { + incr frame + if {$frame > $nframes} { + set frame " " + } + } + send $widget set label $frame + + set blinkFrames {} + foreach i {1 2 3 4} { + set frame [send blinkFrame$i get label] + if {$frame != " "} { + lappend blinkFrames $frame + } + } +}; foreach i $frames {send blinkFrame$i addCallback cpSetBlinkFrame} + +proc cpBlink {widget args} { + global blinkRate blinkId + + if {$blinkRate < 0.01} { + send $widget set state 0 + blink + } elseif {($blinkId != 0) != [send $widget get state]} { + toggleBlink + } +}; send blinkButton addCallback cpBlink + +proc cpResetBlink args { + global blinkRate blinkFrames blinkIndex frames + global defaultBlinkRate + + foreach i $frames { + send blinkFrame$i set label " " + } + set blinkRate $defaultBlinkRate + send BRtext set label $blinkRate + set blinkIndex 0 +}; send blinkReset addCallback cpResetBlink + +proc cpTraceBlink {name element op} { + upvar $name blinkId + send blinkButton set state [expr $blinkId != 0] +}; trace variable blinkId w cpTraceBlink + +proc cpSetBlinkFrames {param old new} { + global blinkFrames frames + set blinkFrames {} + foreach i $frames { + if {$i <= $new} { + lappend blinkFrames $i + } + } + cpResetBlink + set button 1 + foreach i $blinkFrames { + send blinkFrame$button set label $i + incr button + } +}; send nframes addCallback cpSetBlinkFrames + +proc cpRegisterFrames args { + global blinkFrames + send client registerFrames \{$blinkFrames\} +}; send registerButton addCallback cpRegisterFrames + +proc cpMatchFrames args { + global blinkFrames + send client matchFrames \{$blinkFrames\} +}; send matchButton addCallback cpMatchFrames + + +# Options buttons. +# ------------------------------- +proc cpSetPanner {widget args} { + setPanner [send $widget get on] +}; send pannerButton addCallback cpSetPanner + +proc cpTracePanner {name element op} { + upvar $name panner_enable + send pannerButton set on $panner_enable +}; trace variable panner_enable w cpTracePanner + +proc cpSetMagnifier {widget args} { + setMagnifier [send $widget get on] +}; send magnifierButton addCallback cpSetMagnifier + +proc cpTraceMagnifier {name element op} { + upvar $name magnifier_enable + send magnifierButton set on $magnifier_enable +}; trace variable magnifier_enable w cpTraceMagnifier + +proc cpSetCoordsBox {widget args} { + setTrack [send $widget get on] +}; send coordsBoxButton addCallback cpSetCoordsBox + +proc cpTraceCoordsBox {name element op} { + upvar $name track_enable + send coordsBoxButton set on $track_enable +}; trace variable track_enable w cpTraceCoordsBox + +proc cpSetWarnings args { + global warnings + set warnings [send warningsButton get on] +}; send warningsButton addCallback cpSetWarnings + +proc cpSetAutoscale args { + set value [send autoscaleButton get on] + send client setOption autoscale [expr {$value ? "True" : "False"}] +}; send autoscaleButton addCallback cpSetAutoscale + +proc cpTrackAutoscale {param old new} { + send autoscaleButton set on [true $new] +}; send autoscale addCallback cpTrackAutoscale + +proc cpSetAntialias args { + set value [send antialiasButton get on] + send client setOption antialias [expr {$value ? "True" : "False"}] +}; send antialiasButton addCallback cpSetAntialias + +proc cpTrackAntialias {param old new} { + send antialiasButton set on [true $new] +}; send antialias addCallback cpTrackAntialias + +proc cpSetTileFrames args { + global blinkFrames + set value [send tileFramesButton get on] + send client setOption tileFrames \ + [expr {$value ? "True" : "False"}] \{ $blinkFrames \} +}; send tileFramesButton addCallback cpSetTileFrames + +proc cpTrackTileFrames {param old new} { + send tileFramesButton set on [true $new] +}; send tileFrames addCallback cpTrackTileFrames + +proc tileFramesToggle args { + set value [send tileFramesButton get on] + send tileFramesButton set on [expr !$value] + cpSetTileFrames +} + + +# Warning dialog. This pops up a dialog box with the given warning message, +# and executes the given command if the user pushes OK. +# +# Usage: Wexec object message [ok_action [cancel_action]] +# +# The message text is displayed in a popup and the user hits the ok or +# cancel button to close the popup. If an action has been posted for the +# button selected then it is sent to the named object. Only one alert can +# be in effect at a time; posting another alert before the first has +# completed causes the new alert to override the first. + +set W_object "" +set W_ok_command "" +set W_cancel_command "" + +proc Wexec {object msg args} { + global W_object W_ok_command W_cancel_command + set W_object $object + set W_ok_command [lindex $args 0] + set W_cancel_command [lindex $args 1] + send warnText set label $msg + send warning map +} + +proc Wbutton {widget args} { + global W_object W_ok_command W_cancel_command + switch $widget { + warnOk { if [llength $W_ok_command] { + send $W_object $W_ok_command + } + } + warnCancel { if [llength $W_cancel_command] { + send $W_object $W_cancel_command + } + } + } + send warning unmap +}; foreach w {warnOk warnCancel} {send $w addCallback Wbutton} + +# The parameter "alert" is used to forward alerts from the client. +proc setAlert {param old new} { + Wexec client [lindex $new 0] [lindex $new 1] [lindex $new 2] +}; send alert addCallback setAlert + + +# Global control panel buttons. +# ------------------------------- +proc cpInitialize args { + send imagewin setCursorType busy + send client initialize + send imagewin setCursorType idle +} +send initializeButton addCallback cpInitialize +send normalizeButton addCallback normalize + +# Temporarily deactivate some buttons. +send optimizeButton setSensitive false + + +# INFO box. +#----------- +proc infoDone args { send info unmap } +send infoDone addCallback infoDone +proc infoClear args { send infoText set string "" } +send infoUpdate addCallback infoUpdate +send infoClear addCallback infoClear + +proc infoUpdate args { + global version frame nframes + global frameWidth frameHeight frameDepth + global enhancement + global cpXcen cpYcen + global cpXmag cpYmag cpXscale cpYscale + + if {$frame == 0} { + send infoText set string "initializing display..." + } else { + set line1 $version + set line2 [format "Image:\t\t%s" [send imageTitle get label]] + set line3 [format "Frame %d of %d:\t%d x %d" \ + $frame $nframes $frameWidth $frameHeight] + set cmap [lindex $enhancement($frame) 0] + set brt [lindex $enhancement($frame) 1] + set con [lindex $enhancement($frame) 2] + set line4 [format "Colormap:\t%s" $cmap] + set line5 [format "Enhancement:\tBrt=%s Cont=%s" $brt $con] + + set center [format "X: %0.1f\n\t\tY: %0.1f" $cpXcen $cpYcen] + set line6 [format "Center:\t\t%s" $center] + + set line7 [format "Zoom:\t\tX: %0.2f\n\t\tY: %0.2f" $cpXmag $cpYmag] + set line8 [format "Scale:\t\tX: %0.2f\n\t\tY: %0.2f" $cpXscale $cpYscale] + + send infoText set string [ + format "%s\n\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n\n" \ + $line1 $line2 $line3 $line4 $line5 $line6 $line7 $line8 + ] + } +} +foreach param { frame frameView nframes frameSize frameTitle enhancement } { + send $param addCallback infoUpdate +} + + +# Cursor positioning routines +#---------------------------- + +proc move_cursor { xstep ystep args } { + set raster 0 + send imagewin getCursorPos rx ry + send imagewin setCursorPos [expr $rx + $xstep] [expr $ry + $ystep] $raster +} + + +# Print Panel Functions. +#------------------------ +# Global variables needed for the print setup panel + +set printColor prGrayButton +set orientation epsPortButton +set page_size epsLetterButton +set imageScale 100 + +set epsWidgets { epsPageGroup epsOrientLabel epsSizeLabel + epsPortButton epsLandButton epsLetterButton epsLegalButton epsA4Button + ScaleFrame SCdecrease SCtext SCincrease +} + + +proc psetup_init args { + global printColor orientation page_size imageScale #format + + set_printer toPrinter callback 1 + send SCtext set label [ format "%d %%" $imageScale ] + send $printColor set on true + send $orientation set on true + send $page_size set on true +} + + +proc doPrintOptions { param old new } { + global imageScale page_size orientation imageScale printColor + global warnings + + send printStatus set label {} + set val [join [lrange $new 1 end] " "] + + # print [format "doPrintOptions %s = %s" [lindex $new 0] $val] + switch [lindex $new 0] { + autoscale { if { $val == "True" } { + send epsscaleButton set on true + } elseif { $val == "False" } { + send epsscaleButton set on false + } + } + autorotate { if { $val == "True" } { + send autorotateButton set on true + } elseif { $val == "False" } { + send autorotateButton set on false + } + } + maxaspect { if { $val == "True" } { + send aspectButton set on true + } elseif { $val == "False" } { + send aspectButton set on false + } + } + annotate { if { $val == "True" } { + send annotateButton set on true + } elseif { $val == "False" } { + send annotateButton set on false + } + } + compress { if { $val == "True" } { + send compressButton set on true + } elseif { $val == "False" } { + send compressButton set on false + } + } + orientation { send $orientation set on false + if { $val == "portrait" } { + send epsPortButton set on true + set orientation epsPortButton + } elseif { $val == "landscape" } { + send epsPortButton set on false + set orientation epsLandButton + } + } + papersize { send $page_size set on false + if { $val == "letter" } { + send epsLetterButton set on true + set page_size epsLetterButton + } elseif { $val == "legal" } { + send epsLegalButton set on true + set page_size epsLegalButton + } elseif { $val == "A4" } { + send epsA4Button set on true + set page_size epsA4Button + } + } + imscale { set imageScale $val + send SCtext set label [ format "%d %%" $imageScale ] + } + colortype { send $printColor set on false + if { $val == "gray" } { + send prGrayButton set on true + set printColor prGrayButton + } elseif { $val == "pseudo" } { + send prPseudoButton set on true + set printColor prPseudoButton + } elseif { $val == "rgb" } { + send prRGBButton set on true + set printColor prRGBButton + } + } + printerName { if [send toPrinter get on] { + send printlist highlight $val + } + } + printCmd { if [send toPrinter get on] { + send printcmd set string $val + } + } + printFile { if [send toFile get on] { + send printcmd set string $val + } + } + deviceType { if { $val == "Printer" } { + send printerLabel set label "Print Command:" + send toPrinter set on true + send toFile set on false + } elseif { $val == "File" } { + send printerLabel set label "File Name:" + send toPrinter set on false + send toFile set on true + send printlist unhighlight + } + } + + status { send printStatus set label $val + send server synchronize + } + warning { if {$warnings} { Wexec server $val } + } + } +}; send printOptions addCallback doPrintOptions + + +# Print options procedures. +# ------------------------------- + +set prOptsWidgets { + toPrinter toFile + prGrayButton prPseudoButton prRGBButton + epsLandButton epsPortButton + epsLetterButton epsLegalButton epsA4Button + SCincrease SCdecrease +} +set prSimpleOptions { + epsscaleButton autorotateButton aspectButton annotateButton compressButton +} + +proc prPrintCommand { widget cbtype args } { + if [send toFile get on] { + send client setPrintOption printfile $args + send printStatus set label [format "output file set to %s" $args] + } else { + send client setPrintOption printcmd $args + send printStatus set label [format "print command set to %s" $args] + } +}; send printcmd addCallback prPrintCommand + +proc prOptionToggle { widget cbtype args } { + global imageScale + + # Handle the image scale widgets first. + #print [ format "prOptionToggle %s" $widget ] + switch $widget { + SCincrease { set scale [expr $imageScale + 5] + send client setPrintOption imscale $scale + return + } + SCdecrease { set scale [ expr $imageScale - 5 ] + send client setPrintOption imscale $scale + return + } + } + + # If it's not one of those it must be one of the radio toggles. + set val [ send $widget get on ] + #print [ format "prOptionToggle %s = %s" $widget $val ] + if { $val == 1 } { + switch $widget { + toPrinter { send client setPrintOption devicetype printer } + toFile { send client setPrintOption devicetype file } + + epsLandButton { send client setPrintOption orientation landscape } + epsPortButton { send client setPrintOption orientation portrait } + + epsLetterButton { send client setPrintOption papersize letter } + epsLegalButton { send client setPrintOption papersize legal } + epsA4Button { send client setPrintOption papersize A4 } + + prGrayButton { send client setPrintOption colortype gray } + prPseudoButton { send client setPrintOption colortype pseudo } + prRGBButton { send client setPrintOption colortype rgb } + } + } else { + send $widget set on true + } + +} ; foreach w $prOptsWidgets { send $w addCallback prOptionToggle } + +proc prSimpleOptionToggle { widget args } { + set val [ send $widget get on ] + #print [ format "prSimpleOptionToggle %s = %s" $widget $val ] + + switch $widget { + epsscaleButton { send client setPrintOption autoscale $val } + autorotateButton { send client setPrintOption autorotate $val } + aspectButton { send client setPrintOption maxaspect $val } + annotateButton { send client setPrintOption annotate $val } + compressButton { send client setPrintOption compress $val } + } +} ; foreach w $prSimpleOptions { send $w addCallback prSimpleOptionToggle } + + + +# Printer display and selection. +# ------------------------------- +set psScrollHeight 0 + +proc psSetPrintList {param old new} { + send printlist setList $new resize + send printlist highlight 0 +}; send printerList addCallback psSetPrintList + +proc psResizeScrollbar {widget cbtype flags x y w h cw ch} { + global psScrollHeight + set newHeight [expr $ch - $h] + if {$newHeight && $newHeight != $psScrollHeight} { + send printlistScroll setScrollbar 0.0 [expr double($h) / $ch] + set rowHeight [send printlist get rowHeight] + set rowSpacing [send printlist get rowSpacing] + send printlistScroll set increment [expr ($ch <= $h) ? 0 : \ + "double ($rowHeight + $rowSpacing) / ($ch - $h)"] + set psScrollHeight $newHeight + } +}; send printlistPort addCallback psResizeScrollbar + +proc psScrollPrintlist {widget cbtype pos} { + global psScrollHeight + send printlist set y [expr -int($psScrollHeight * $pos)] +}; send printlistScroll addCallback psScrollPrintlist scroll + +proc psSelectPrint {widget cbtype selections indices} { + global printerlist + foreach selection $selections { + send client setPrintOption printername $selection + } +}; send printlist addCallback psSelectPrint + + +proc printQuit { args } { + send print_panel unmap +} ; send donePrint addCallback printQuit + +proc Print { args } { + global winWidth winHeight + send imagewin setCursorType busy + + # Get the print command or file template if not previous reset. + set val [ send printcmd get string ] + if [send toFile get on] { + send client setPrintOption printfile $val + } else { + send client setPrintOption printcmd $val + } + setPrintCorners 0 [expr $winWidth - 1] [expr $winHeight - 1] 0 + + send client print + send imagewin setCursorType idle +} ; send okayPrint addCallback Print + + +# setPrintCorners -- Tell the client the WCS of the image being printed. + +proc setPrintCorners { lx ly ux uy args } { + global winWidth winHeight + + # Convert raw corner screen coordinates to frame buffer raster coords. + send imagewin unmapPixel $lx $ly raster llx lly + set llx [expr "int ($llx)"] + set lly [expr "int ($lly)"] + set str [send client encodewcs $llx $lly] + scan $str "%g %g %g" llx_r lly_r z + set llx_i [expr "int ($llx_r)"] + set lly_i [expr "int ($lly_r)"] + + send imagewin unmapPixel $ux $uy raster urx ury + set urx [expr "int ($urx)"] + set ury [expr "int ($ury)"] + set str [send client encodewcs $urx $ury] + scan $str "%g %g %g" urx_r ury_r z + set urx_i [expr "int ($urx_r)"] + set ury_i [expr "int ($ury_r)"] + + send client setPrintOption corners $llx_i $lly_i $urx_i $ury_i +} + + +#-------------------------- +# Save panel functions. +#-------------------------- +# Global variables needed for the save setup panel + +set format rasButton +set saveColor svPseudoButton + +set fileFmtButtons { + rasButton gifButton jpegButton tiffButton + fitsButton x11Button pnmButton rawButton +} + + +# Format group procedures. +#--------------------------------- + +# Select a format. + +proc set_format { widget func state args } { + global format saveColor + + send $format set on false + if {$widget == $format} { + send $widget set on true + } else { + switch $widget { + rasButton { send client setSaveOption format ras } + gifButton { send client setSaveOption format gif } + jpegButton { send client setSaveOption format jpeg } + tiffButton { send client setSaveOption format tiff } + fitsButton { send client setSaveOption format fits } + x11Button { send client setSaveOption format x11 } + pnmButton { send client setSaveOption format pnm } + rawButton { send client setSaveOption format raw } + } + } +} ; foreach fmt $fileFmtButtons { send $fmt addCallback set_format } + +proc setSaveFile { widget cbtype args } { + send client setSaveOption fname $args + send saveStatus set label [format "output file set to %s" $args] +}; send saveFile addCallback setSaveFile + + +proc doSaveOptions { param old new } { + global format saveColor + global warnings + + send saveStatus set label {} + set val [join [lrange $new 1 end] " "] + + #print [format "doSaveOptions %s = %s" [lindex $new 0] $val] + switch [lindex $new 0] { + format { + # Now (de)sensitize the color options depending on the format, + # force the color choice when needed. + send $format set on false + switch [lindex $val 0] { + ras { #send svRGBButton setSensitive false + send svPseudoButton setSensitive true + set format rasButton + } + gif { send svRGBButton setSensitive false + send svPseudoButton setSensitive true + if {$saveColor == "svRGBButton"} { + send $saveColor set on false + send svPseudoButton set on true + set saveColor svPseudoButton + } + set format gifButton + } + jpeg { send svRGBButton setSensitive true + send svPseudoButton setSensitive true + set format jpegButton + } + tiff { send svRGBButton setSensitive false + send svPseudoButton setSensitive true + set format tiffButton + } + fits { send svRGBButton setSensitive false + send svPseudoButton setSensitive false + send $saveColor set on false + send svGrayButton set on true + set saveColor svGrayButton + set format fitsButton + } + x11 { send svRGBButton setSensitive true + send svPseudoButton setSensitive true + set format x11Button + } + pnm { send svRGBButton setSensitive true + send svPseudoButton setSensitive true + set format pnmButton + } + raw { send svRGBButton setSensitive true + send svPseudoButton setSensitive true + set format rawButton + } + } + send $format set on true + } + color { send $saveColor set on false + switch [lindex $val 0] { + grayscale { send svGrayButton set on true + set saveColor svGrayButton + } + pseudocolor { send svPseudoButton set on true + set saveColor svPseudoButton + } + rgb { send svRGBButton set on true + set saveColor svRGBButton + } + } + } + fname { send saveFile set string $val + } + status { send saveStatus set label $val + send server synchronize + } + text { send saveData set label $val + } + warning { if {$warnings} { Wexec server $val } + } + } +} ; send saveOptions addCallback doSaveOptions + + +# Color group procedures. +#--------------------------------- +send svGrayButton addCallback "send client setSaveOption color grayscale" +send svPseudoButton addCallback "send client setSaveOption color pseudocolor" +send svRGBButton addCallback "send client setSaveOption color rgb" + +send doneSave addCallback "send save_panel unmap" + +proc Save { args } { + send imagewin setCursorType busy + + # Get the print command or file template if not previous reset. + set val [ send saveFile get string ] + send client setSaveOption fname $val + send saveStatus set label [format "output file set to %s" $args] + + send client save + send imagewin setCursorType idle + #send save_panel unmap +} ; send okaySave addCallback Save + + +# ------------------------------------------ +# Image and objects list display and section +# ------------------------------------------ + +set load_frame 1 + +proc filesTextHighlight { widget event args } { + if { $event == "enterNotify" } { + send $widget set displayCaret True + } elseif { $event == "leaveNotify" } { + send $widget set displayCaret False + } +} +send imtemplateText addEventHandler filesTextHighlight enterWindowMask +send imtemplateText addEventHandler filesTextHighlight leaveWindowMask +send fnameText addEventHandler filesTextHighlight enterWindowMask +send fnameText addEventHandler filesTextHighlight leaveWindowMask + +send rootButton addCallback "send client setLoadOption root" +send homeButton addCallback "send client setLoadOption home" +send upButton addCallback "send client setLoadOption up" +send rescanButton addCallback "send client setLoadOption rescan" + +proc setPattern { widget mode pattern args } { + send client setLoadOption pattern $pattern +} ; send imtemplateText addCallback setPattern + +proc doLoadOptions { param old new } { + global warnings loadP_up + + set val [ join [lrange $new 1 end] " " ] + + #print [format "doLoadOptions %s = %s" [lindex $new 0] $val] + switch [lindex $new 0] { + pattern { send imtemplateText set string [format "%s" $val ] } + curdir { send dirLabel set label [format "Directory: %s" $val ] } + newfile { send fnameText set string $val + if { [ string last / $val ] < 0 } { + if { [send browseToggle get on] == 0 } { + send load_panel unmap + set loadP_up 0 + } + } + } + status { send filesStatus set label $val + if { ! $loadP_up } { send imageTitle set label $val } + send server synchronize + } + warning { if {$warnings} { Wexec server $val } } + gray { send grayToggle set on $val } + } +} ; send loadOptions addCallback doLoadOptions + +proc toggleGraymap { widget args } { + send client setLoadOption gray [ send grayToggle get on ] +} ; send grayToggle addCallback toggleGraymap + +proc fileLoad { widget mode fname args } { + global load_frame loadP_up + send imagewin setCursorType busy + send client load $fname $load_frame + set fpath [format "%s/%s" \ + [string range [send dirLabel get label] 12 end] \ + $fname ] + if { [ string last / $fname ] < 0 && [ file isfile $fpath] == 1 } { + if { [send browseToggle get on] == 0 } { + send load_panel unmap + set loadP_up 0 + } + } + send imagewin setCursorType idle +} ; send fnameText addCallback fileLoad + + +set imlistScrollheight 0 + +proc setFileList {param old new} { + send imageList setList $new resize +}; send filelist addCallback setFileList + +proc flresizeScrollbar { widget cbtype flags x y w h cw ch } { + global imlistScrollheight + set newheight [expr $ch - $h] + if { $newheight != $imlistScrollheight } { + send imlistScrollbar setScrollbar 0.0 [expr double($h) / $ch] + set imlistScrollheight $newheight + } +} ; send imlistPorthole addCallback flresizeScrollbar + +proc flscrollList { widget cbtype pos } { + global imlistScrollheight + send imageList set y [expr -int($imlistScrollheight * $pos)] +} ; send imlistScrollbar addCallback flscrollList scroll + +proc flSelectPrint {widget cbtype selections args} { + global load_frame loadP_up + foreach selection $selections { + send client load $selection $load_frame + if { [ string last / $selection ] < 0 } { + if { [send browseToggle get on] == 0 } { + send load_panel unmap + set loadP_up 0 + } + } + } +}; send imageList addCallback flSelectPrint + +proc fileSetFrame {widget args} { + global nframes load_frame + + set frame [send $widget get label] + if {$frame == $nframes} { + set frame 1 + } else { + incr frame + } + send $widget set label $frame + set load_frame $frame +}; send frameFrame addCallback fileSetFrame + +proc fileLoadB args { + global load_frame loadP_up + send imagewin setCursorType busy + set fname [send fnameText get string] + if {$fname == ""} { + Wexec client "No image name specified" + } else { + send client load $fname $load_frame + set fpath [format "%s/%s" \ + [string range [send dirLabel get label] 12 end] \ + $fname ] + if { [ string last / $fname ] < 0 && [ file isfile $fpath] == 1 } { + if { [send browseToggle get on] == 0 } { + send load_panel unmap + set loadP_up 0 + } + } + send imagewin setCursorType idle + } +} ; send filesLoadButton addCallback fileLoadB + +proc fileQuit args { + send load_panel unmap + set loadP_up 0 +} ; send filesCloseButton addCallback fileQuit + + +# More Panel toggles + +proc infoPanel args { + global infoP_up + if {$infoP_up} { + send info unmap + set infoP_up 0 + } else { + send info map + set infoP_up 1 + } +} + +proc pannerPanel args { + global panner_enable + setPanner [expr !$panner_enable] +} + +proc magnifierPanel args { + global magnifier_enable + setMagnifier [expr !$magnifier_enable] +} + +proc wcsPanel args { + global track_enable + setTrack [expr !$track_enable] +} + +proc loadPanel args { + global loadP_up + if {$loadP_up} { + send load_panel unmap + set loadP_up 0 + } else { + send client setLoadOption rescan + send load_panel map + set loadP_up 1 + } +} + +proc savePanel args { + global saveP_up + if {$saveP_up} { + send save_panel unmap + set saveP_up 0 + } else { + send save_panel map + set saveP_up 1 + } +} + +proc printPanel args { + global printP_up + if {$printP_up} { + send print_panel unmap + set printP_up 0 + } else { + send print_panel map + set printP_up 1 + } +} + + +#------------------------------------ +# Define procedure for the help panel +#------------------------------------ + +# Help Panel Bitmaps +#------------------- +createBitmap iraf_logo 45 45 { +0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, +0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xff, +0xff, 0x3f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xf0, 0xff, 0xff, 0xff, +0xff, 0x3f, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xe0, 0xff, 0xff, 0xff, +0xff, 0x3f, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xc0, 0xff, 0xff, 0xff, +0xff, 0x3f, 0x80, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x80, 0xfc, 0xff, 0xff, +0xff, 0x3f, 0x84, 0xf8, 0xff, 0xff, 0xff, 0x1f, 0x84, 0xf4, 0xff, 0xff, +0xff, 0x1b, 0x04, 0x09, 0x00, 0xfc, 0xff, 0x11, 0x04, 0x11, 0xf8, 0xff, +0x7f, 0x10, 0x04, 0x21, 0xc0, 0xff, 0x1f, 0x10, 0x04, 0x41, 0xf0, 0xff, +0x00, 0x18, 0x04, 0x01, 0xe0, 0xff, 0x00, 0x18, 0x00, 0x81, 0xc0, 0xff, +0x00, 0x08, 0x00, 0x01, 0xe0, 0xff, 0x07, 0x08, 0x00, 0x01, 0xf1, 0xff, +0x1f, 0x08, 0x80, 0x21, 0xf0, 0xff, 0xff, 0x08, 0xc0, 0x41, 0xf4, 0xff, +0xff, 0x08, 0xc0, 0x41, 0xf8, 0xff, 0xff, 0x09, 0xc0, 0xc1, 0xf0, 0xff, +0xff, 0x0b, 0x80, 0xc1, 0xf1, 0xff, 0xff, 0x07, 0x80, 0x81, 0xe1, 0xff, +0xff, 0x07, 0x80, 0x01, 0xc1, 0xff, 0xff, 0x07, 0x00, 0x01, 0xc0, 0xff, +0xff, 0x07, 0xc2, 0x05, 0x81, 0xff, 0xff, 0x07, 0xf2, 0x07, 0x81, 0xff, +0xff, 0x07, 0xf2, 0x17, 0x03, 0xff, 0xff, 0x03, 0xfa, 0x7f, 0x02, 0xfe, +0xff, 0x03, 0xfe, 0xff, 0x02, 0xfe, 0xff, 0x03, 0xfe, 0xff, 0x03, 0xfc, +0xff, 0x03, 0xff, 0xff, 0x07, 0xfc, 0xff, 0x83, 0xff, 0xff, 0x0f, 0xf8, +0xff, 0xc1, 0xff, 0xff, 0x3f, 0xf0, 0xff, 0xe1, 0xff, 0xff, 0x7f, 0xf8, +0xff, 0xf1, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xe0, +0xff, 0xf8, 0xff, 0xff, 0xff, 0xe3, 0xff, 0xfc, 0xff, 0xff, 0xff, 0xe7, +0xff, 0xfc, 0xff, 0xff, 0xff, 0xef}; send helpIRAFLogo "set bitmap iraf_logo" + +createBitmap noao_logo 45 45 { +0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0xfe, 0xff, 0xff, +0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, +0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, +0xff, 0x7f, 0x00, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, +0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, +0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x03, 0xfe, 0xff, 0xff, +0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, +0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x8f, 0xff, 0xff, 0xff, +0xff, 0xff, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff, +0xff, 0xff, 0x03, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x03, 0xfe, 0xff, 0xff, +0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x01, 0xfc, 0xff, 0xff, +0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0xff, 0x7f, 0x00, 0xf0, 0xff, 0xff, +0xff, 0x7f, 0x00, 0xf0, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xe0, 0xff, 0xff, +0xff, 0x3f, 0x00, 0xe0, 0xff, 0xff, 0xff, 0x1f, 0x00, 0xc0, 0xff, 0xff, +0xff, 0x1f, 0x00, 0xc0, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x80, 0xff, 0xff, +0xff, 0x0f, 0x00, 0x80, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, +0xff, 0x03, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x03, 0x00, 0x00, 0xfe, 0xff, +0xff, 0x01, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x01, 0x00, 0x00, 0xfc, 0xff, +0xff, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x00, 0xf8, 0xff, +0x7f, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xf0, 0xff, +0x3f, 0x00, 0x00, 0x00, 0xe0, 0xff}; send helpNOAOLogo "set bitmap noao_logo" + +# Stuff for keeping track of visited anchors. +set links { 0 } +set linkIndex 0 +set visited(0) empty + +send helpInfo1 set label $version + +proc Help args { + global helpP_up + if {$helpP_up == 0} { + send client help + } else { + send help_panel unmap + set helpP_up 0 + } +} + +proc helpPanel args { + global helpP_up + if {$helpP_up} { + send help_panel unmap + set helpP_up 0 + } else { + send help_panel map + set helpP_up 1 + } +} + +proc helpQuit args { + global helpP_up + send help_panel unmap + set helpP_up 0 + send helpButton set state 0 + send helpText setText "" +}; send helpClose addCallback helpQuit + +proc getHelpText { param old new } { + send helpText setText $new + helpPanel +}; send help addCallback getHelpText + +proc anchorSelected {widget cbtype event text href args} { + global visited links linkIndex + set anchID [send helpText anchorToId $href] + set visited($href) 1 + if {$linkIndex == 0} { + send helpBack set sensitive True + if {[lindex $links 1] != $anchID} { + set links { 0 } + send helpForward set sensitive False + } + } + if {$linkIndex > 0 && [lindex $links [expr $linkIndex + 1]] != $anchID} { + set links [lrange $links 0 $linkIndex] + } + if {[lindex $links [expr $linkIndex + 1]] != $anchID} { + lappend links $anchID + incr linkIndex + } else { + send helpForward set sensitive False + incr linkIndex + } + if {$linkIndex == [expr [llength $links] - 1]} { + send helpForward set sensitive False + } + send helpText gotoId $anchID + send helpText retestAnchors +}; send helpText addCallback anchorSelected anchor + +proc testAnchor {widget cbtype href} { + global visited + return [info exists visited($href)] +}; send helpText addCallback testAnchor testAnchor + + +# Callbacks to position forwards and backwards in link list. +proc hlpForward args { + global links linkIndex + incr linkIndex + if {$linkIndex <= [llength $links]} { + set anchID [lindex $links $linkIndex] + send helpText gotoId $anchID + send helpText retestAnchors + if {$linkIndex == [expr [llength $links] - 1]} { + send helpForward set sensitive False + send helpBack set sensitive True + } else { + send helpBack set sensitive True + } + } else { + incr linkIndex -1 + } +}; send helpForward addCallback hlpForward + +proc hlpBack args { + global links linkIndex + incr linkIndex -1 + if {$linkIndex >= 0} { + set anchID [lindex $links $linkIndex] + send helpText gotoId $anchID + send helpText retestAnchors + if {$linkIndex == 0} { send helpBack set sensitive False } + if {$linkIndex >= 0} { send helpForward set sensitive True } + } else { + incr linkIndex 1 + } +}; send helpBack addCallback hlpBack + +proc hlpHome args { + global links linkIndex + set links { 0 } + set linkIndex 0 + send helpText gotoId 0 + send helpForward set sensitive False + send helpBack set sensitive False +}; send helpHome addCallback hlpHome + + + +#------------------------------------ +# Define some TCL debug procedures. +#------------------------------------ + +set tclP_up 0 + +proc tclCommandClear {widget args} { send tclEntry set string "" } +proc tclCommandExecute {widget args} { send server [send tclEntry {get string}] +} +proc tclCommand {widget mode command args} { send server $command } +proc tclClose {widget args} { send tclShell unmap } +proc tclOpen { args } { + global tclP_up + send tclShell map + set tclP_up 1 +} + +proc tclPanel args { + global tclP_up + if {$tclP_up} { + send tclShell unmap + set tclP_up 0 + } else { + send tclShell map + set tclP_up 1 + } +} + +send tclClear addCallback tclCommandClear +send tclExecute addCallback tclCommandExecute +send tclEntry addCallback tclCommand +send tclcloseButton addCallback tclClose + diff --git a/vendor/x11iraf/ximtool/OLD/ximtool-mag.html b/vendor/x11iraf/ximtool/OLD/ximtool-mag.html new file mode 100644 index 00000000..96a959f7 --- /dev/null +++ b/vendor/x11iraf/ximtool/OLD/ximtool-mag.html @@ -0,0 +1,697 @@ +<HTML> <HEAD> +<TITLE>XImtool On-Line Help Summary</TITLE> +</HEAD> <BODY> +<H2>Welcome to XImtool V1.1</H2> + +XImtool is an image display server developed by the IRAF Project at the +National Optical Astronomy Observatories. To view images you need +client software (such as IRAF) to load images into the display, or it can +load images directly when run as a standalone task. XImtool is +interchangeable with older display servers such as <I>SAOimage</I> / +<I>IMTOOL</I> and with newer servers like <I>SAOtng</I>, but offers many new +features not available elsewhere. +<P> +More <a href=#toc>detailed help</a> is available on the following topics: +<DL><DL> +<DT>Basic Usage:</DT> +<UL> +<LI><A HREF="#basic">Getting Started</A> -- The basics. </LI> +<LI><A HREF="#gui">GUI Overview</A> -- What it looks like. </LI> +<LI><A HREF="#mouse">Mouse Operations</A> -- Doing stuff. </LI> +<LI><A HREF="#keystroke">Keystroke Accelerators</A> -- Keystroke summary.</LI> +<LI><A HREF="#markers">Markers</A> -- Pan/Mag/WCS markers, general markers.</LI> +<LI><A HREF="#control">Control Panel</A> -- Operating the Control panel.</LI> +<LI><A HREF="#load">Load Panel</A> -- Load panel operation and options.</LI> +<LI><A HREF="#save">Save Panel</A> -- Save panel operation and options.</LI> +<LI><A HREF="#print">Print Panel</A> -- Print panel operation and options.</LI> +<LI><A HREF="#info">Info Panel</A> -- Information panel.</LI> +</UL></DL></DL> +<DL><DL> +<DT>Advanced Features:</DT> +<UL> +<LI><A HREF="#comline">Command-line Options</A> -- Startup flags. </LI> +<LI><A HREF="#client">Client Connections</A> -- Use as a display server. </LI> +<LI><A HREF="#framebuf">Frame Buffers</A> -- Explanation of Frame buffers. </LI> +<LI><A HREF="#pprinter">Printer Configurations</A> -- Configuring output devices. </LI> +<LI><A HREF="#tclshell">TclShell</A> -- Expert-mode interactive shell.</LI> +</UL></DL></DL> +<P> +Please contact <I>iraf@noao.edu</I> with comments, bugs, or suggestions. +<P> +<HR></P> + +<a name=#toc> <h2>Table of Contents:</h2> </a> +<PRE> + <A HREF="#basic">Getting Started</A> + <A HREF="#gui">GUI Overview</A> + <A HREF="#mouse">Mouse Operations</A> + <A HREF="#keystroke">Keystroke Accelerators</A> + <A HREF="#comline">Command-line Options</A> + <A HREF="#client">Client Connections</A> + <A HREF="#framebuf">Frame Buffers</A> + <A HREF="#markers">Markers</A> + <A HREF="#panner">Panner Marker</A> + <A HREF="#magnifier">Magnifier Marker</A> + <A HREF="#coords">Coords Box Marker</A> + <A HREF="#genmark">General Markers</A> + <A HREF="#markmenu">Menu Options</A> + <A HREF="#control">Control Panel</A> + <A HREF="#cview">View Controls</A> + <A HREF="#cenhance">Enhancement Controls</A> + <A HREF="#cblink">Blink Controls</A> + <A HREF="#copts">Options:</A> + <A HREF="#cautoscale">Autoscale</A> + <A HREF="#cantialias">Antialiasing</A> + <A HREF="#ctile">Tile Frames</A> + <A HREF="#cwarnings">Warnings</A> + <A HREF="#ccmap">Colormap Selection</A> + <A HREF="#cbltin">Builtin Colormaps</A> + <A HREF="#cuser">User-defined Colormaps</A> + <A HREF="#load">Load Panel</A> + <A HREF="#lbrowse">Directory browsing</A> + <A HREF="#lpattern">File Patterns</A> + <A HREF="#lload">Direct File Load</A> + <A HREF="#lframe">Frame Selections</A> + <A HREF="#save">Save Panel</A> + <A HREF="#sfname">File Name</A> + <A HREF="#sformat">Format</A> + <A HREF="#scolor">Color</A> + <A HREF="#print">Print Panel</A> + <A HREF="#popts">Postscript Options</A> + <A HREF="#pcolors">Color Options</A> + <A HREF="#pproc">Processing Options</A> + <A HREF="#pprinter">Printer selection</A> + <A HREF="#info">Info Panel</A> + <A HREF="#tclshell">TclShell</A> +</PRE> +<P> +<HR> +<h2><a name=#basic>Getting Started</a></h2> +As a display server, XImtool is started as a separate process from client +software such as IRAF. Once it is running it will accept +<a href=#client>client connections</a> simultaneously on fifo pipes, unix +domain sockets, or inet sockets. A display client like the IRAF DISPLAY +task makes a connection and sends the image across using an IIS protocol +(other/different protocols may be supported in the future). Once the image +is loaded in the display buffer it may be <a href=#cenhance>enhanced</a>, +<a href=#save>saved to a disk file</a> in a number of different formats, or +<a href=#print>printed</a> as Encapsulated Postscript to a printer or disk file. +<P> +When run in standalone mode, images may be loaded on the +<a href=#comline>command line</a> or by using the <a href=#load>Load Panel</a>. +This allows you to browse images and perform the same manipulations as if +they had been displayed by a client. +<hr> + +<h2><a name=#gui>GUI Overview</a></h2> +<p> +The GUI consists of a large image display window and a number of smaller +pannels that control various specific functions such as image +<a href=#load>Load</a>, <a href=#save>Save</a> and <a href=#print>Print</a> +as well as a general purpose <a href=#control>Control Panel</a>. The main +window menubar has several menu buttons to the left: the <I>Files</I> menu +is used to load/save/print an image as well as quit the task. The <I>View</I> +menu let's you select the image orientation, zoom, colormap or frame. The +<I>Options</I> menu allows you to call up control panels, toggle markers +or blinking etc. Some of this functionality is duplicated elsewhere in +the GUI. The right side of the menubar contains command buttons to flip the +image as well as buttons for frame selection and the help button. +<p> +For more detailed information on the operation of the control panels please +see the on-line help (i.e. use the '?' button or Alt-h keystroke in the +main image window). + +<h2><a name=#mouse>Mouse Operations</a></h2> +Clicking and dragging MB1 (mouse button 1) in the main image +window creates a rectangular region <a href=#markers>marker</a>, used +to select a region of the image. If you do this accidentally and don't +want the marker, put the pointer in the marker and type DELETE or +BACKSPACE to delete the marker. With the pointer in the marker, +MB3 will call up a <a href=#markmenu>marker menu</a> listing some things + you can do with the marker, like zoom the outlined region. MB1 can be used +to drag or resize the marker. <a href=#markers>See below</a> for more +information on markers. +<p> +Clicking on MB2 in the main image window pans (one click) or zooms (two +clicks) the image. Further clicks cycle through the builtin zoom factors. +Moving the pointer to a new location and clicking moves the feature under +the pointer to the center of the display window. Holding down the Shift +key while clicking MB2 will cause a full-screen crosshair cursor to appear +until the button is released, this can be useful for fine positioning of the +cursor. +<p> +MB3 is used to adjust the contrast and brightness of the displayed image. +The position of the pointer within the display window determines the +contrast and brightness values. Click once to set the values corresponding +to the pointer location, or click and drag to continuously adjust the display. +<hr> + +<h2><a name=#keystroke>Keystroke Accelerators</a></h2> + The following keystrokes are currently defined in the GUI: +<pre> + +Ctrl-b Backward frame Alt-b Blink frames (toggle) +Ctrl-c Center frame? Alt-c Control panel +Ctrl-f Forward frame Alt-h Help +Ctrl-i Invert? Alt-i Info box popup +Ctrl-m Match LUTs Alt-l Load file popup +Ctrl-n Normalize Alt-p Print popup +Ctrl-p Print Alt-s Save popup +Ctrl-r Register Alt-t TclShell popup +Ctrl-t Tile frames toggle +Ctrl-u Unzoom (zoom=1) +Ctrl-x Flip X Ctrl-Alt-q Quit +Ctrl-y Flip Y Ctrl-Alt-f Fitframe + +Ctrl-= Print +Ctrl-< Decrease blink rate Ctrl-+ Zoom in +Ctrl-> Increase blink rate Ctrl-- Zoom out + +Ctrl-[hjkl] Move cursor one pixel +Ctrl-[arrow] Move cursor one pixel +Ctrl-Shift-[hjkl] Move cursor ten pixels +Ctrl-Shift-[arrow] Move cursor ten pixels +Alt-1 thru Alt-4 Set frame displayed +Ctrl-1 thru Ctrl-9 Set integer zoom factor +</pre> +NOTE: These keystrokes only work with the cursor in the main image window, +not on the subwindows or in markers. +<hr> + +<h2><a name=#client>Client Connections</a></h2> +Ximtool allows clients to connect in any of the following ways: +</DL> +<DT><B>fifo pipes</B></DT> +<DD>The traditional approach. The default, global /dev/imt1[io] pipes may +be used, or a private set of fifos.</DD> +<DT><B>tcp/ip socket</B></DT> +<DD>Clients connect via a tcp/ip socket. There is a default port, or a +custom port may be specified. This permits connecting to the server over a +remote network connection anywhere on the Internet.</DD> +<DT><B>unix domain socket</B></DT> +<DD> Like a tcp/ip socket, but limited to a single host system. Usually +faster than a tcp/ip socket, and comparable to a fifo. By default each user +gets their own unix domain socket, so this option allows multiple users +to run ximtools on the same host without having to customize things.</DD> +</DL> +By default ximtool listens simultaneously for client connctions on all three +types of ports. Clients communicate with XImtool using the IIS protocol, +other protocols may be supported in the future. +<hr> + +<h2><a name=#framebuf>Frame Buffers</a></h2> +XImtool starts up using default frame buffer of 512x512 pixels. When loading +disk images the frame buffer configuration file will be searched for a +defined frame buffer that is the same size or larger than the current image, +when used as a display server the frame buffer configuration number is passed +in by the client. The default file used is /usr/local/lib/imtoolrc, this can +be overridden by defining a <b>IMTOOLRC</b> environment variable naming the +file to be used, or by creating a <b>.imtoolrc</b> file in your home +directory. +<P> +The format of the frame buffer configuration file is +<pre> + configno nframes width height [extra fields] +e.g. + 1 2 512 512 + 2 2 800 800 + 3 1 1024 1024 # comment +</pre> +At most 128 frame buffer sizes may be defined. +<hr> + +<h2><a name=#comline>Command-line Options</a></h2> + The following command-line options are currently recognized: +<pre> + -basePixel < num > Base colormap pixel number + -cmap1 < file > User cmap 1 + -cmap2 < file > User cmap 2 + -cmapDir1 < dir > User cmapDir 1 + -cmapDir1 < dir > User cmapDir 2 + -cmapInitialize < bool > Initialize colormap at startup + -cmapName < name > Private colormap name + -config < num > Initial config number + -defgui Print default GUI to stdout + -displayPanner < bool > Display panner box + -displayCoords < bool > Display wcs coords box + -displayMagnifier < bool > Display magnifier box + -fifo < pipe > Fifo pipe to use + -fifo_only Use fifo pipes only + -gui < file > GUI file to use + -help Print command-line summary + -imtoolrc < file > Frame buffer configuration file + -inet_only Use inet sockets only + -invert Invert colormap on startup? + -maxColors < num > Number of colors + -memModel < type > Memory model (fast,small,beNiceToServer) + -nframes < num > Number of frames at startup + -port < num > Inet port to use + -printConfig < file > Printer configuration file + -port_only Use inet sockets only + -tile Tile frames on startup? + -unix < name > Unix socket to use + -unix_only Use unix sockets only + < file > File to load on startup +</pre> +<hr> +<h2><a name=#markers>Markers</a></h2> +<h3><a name=#panner>Panner Marker</a></h3> +<P> +The panner window always displays the full frame buffer. Try setting the +frame buffer configuration to a nonsquare frame buffer (e.g. imtcryo) and +then displaying a square image (e.g. dev$pix) and the panner will show you +exactly where the image has been loaded into the frame. +<P> +The panner window uses two markers, one for the window border and one to +mark the displayed region of the frame. Most of the usual marker keystrokes +mentioned <a href=#genmark>below</a> apply to these markers as well, e.g. +you can use MB1 to reposition on the panner window within the main image +display window, or to drag the region marker within the panner (pan the +image). Resizing the region marker zooms the image; this is a non-aspect +constrained zoom. The panner window itself can be resized by dragging a +corner with MB1. Typing delete or backspace anywhere in the panner window +deletes the panner. +<P> +A special case is MB2. Hitting MB2 anywhere in the panner window pans the +image to that point. This is analogous to typing MB2 in the main display +window to pan the image. + +<h3><a name=#magnifier>Magnifier Marker</a></h3> +<P> +The magnifier marker can be used to zoom in on a small area around the +cursor. It will be updated as the cursor moves but only for small motions +(either mouse movement or with the <a href=#mouse>cursor movement +keystrokes</a>) to minimize the +impact on the system. The zoom factor is expressed as some fraction of the +size of the magnifier marker itself. The default zoom is 4, i.e. the area +in the marker represents and area in the image that's one-fourth the size +of the marker. Other zoom factors may be selected using the popup menu +created by hitting MB1 in the marker. +<P> +By default the magnifier marker is not visible, to toggle it select the +<I>Magnifier</I> option from the <I>Options</I> menubar button. Alternatively, +for just a quick look holding down the Shift and MB1 buttons will display +the marker until the button is released. + +<h3><a name=#coords>Coords Box Marker</a></h3> +<P> +Ximtool provides a limited notion of world coordinates, allowing frame +buffer pixel coordinates and pixel values to be converted to some arbitrary +client defined coordinate system. The coords box feature is used to display +these world coordinates as the pointer is moved about in the image window. +<P> +The quantities displayed in the coords box are X, Y, and Z: the X,Y world +coordinates of the pointer, and Z, the world equivalent of the pixel value +under the pointer. All coordinate systems are linear. The precision of a +displayed quantity is limited by the range of values of the associated raw +frame buffer value. For example, if the display window is 512x512 only 512 +coordinate values are possible in either axis (the positional precision can +be increased however by zooming the image). More seriously, at most about +200 pixel values can be displayed since this is the limit on the range of +pixel values loaded into the frame buffer. If a display pixel is saturated +a "+" will be displayed after the intensity value. +<P> +The coords box is a marker (text marker) and it can be moved and resized +with the pointer like any other marker. + +<h3><a name=#genmark>General Markers</a></h3> +Although ximtool doesn't do much with markers currently, they are a general +feature of the Gterm widget and are used more extensively in other programs +(e.g. the prototype IRAF science GUI applications). Ximtool uses markers +for the marker zoom feature discussed above, and also for the +<a href=#panner>panner</a> and the <a href=#coords>coords box</a>. All +markers share some of the same characteristics, so it is worthwhile learning +basic marker manipulation keystrokes. +<UL> +<LI> MB1 anywhere inside a marker may be used to drag the marker. +<LI> MB1 near a marker corner or edge, depending on the type of marker, +resizes the marker. +<LI> Shift-MB1 on the corner of most markers will rotate the marker. +<LI> Markers stack, if you have several markers and you put one on top +of the other. The active marker is highlighted to tell you which of the +stacked markers is active. If the markers overlap, this will be marker +"on top" in the stacking order. +<LI> MB2 in the body of a marker "lowers" the marker, i.e. moves it to +the bottom of the stacking order. +<LI> Delete or backspace in a marker deletes it. +<LI> Markers have their own translation resources and so the default +<a href=#keystroke>keystroke commands</a> will not be recognized when the +cursor is in a marker. +</UL> +For example, try placing the pointer anywhere in the coords box, then press +MB1 and hold it down, and drag the coords box marker somewhere else on the +screen. You can also resize the coords box by dragging a corner, or delete +it with the delete or backspace key. (The Initialize button will get the +original coords box back if you delete it). +<P> +<h4><a name=#markmenu>Marker Menu Options</a></h4> +<UL> +<LI> MB3 (mouse button 3) calls up the marker menu (by default). +<LI> <B>Zoom</B> does an equal aspect zoom of the region outlined by the marker. +In this way you can mark a region of the image and zoom it up. +<LI> <B>Fill</B> exactly zooms the area outlined by the marker, making it fill +the display window. Since the marker is not likely to be exactly square, +the aspect ratio of the resultant image will not be unitary. +<LI> <B>Print</B> prints the region outlined by the marker to the printer or +file currently configured by the <a href=#print>Print Panel</a>. +<LI> <B>Save</B> saves the region outlined by the marker to the file currently +configured by the <a href=#save>Save Panel</a>. +<LI> <B>Info</B> prints a description of the marked region. The text is +printed in the <a href=#info>Info Panel</a>. +<LI> <B>Unrotate</B> unrotates a rotated marker. +<LI> <B>Color</B> is a menu of possible marker colors. +<LI> <B>Type</B> is a menu of possible marker types. This is still a little +buggy and it isn't very useful, but you can use it to play with different +types of markers. +<LI> <B>Destroy</B> destroys the marker. You can also hit the delete or +backspace key in a marker to destroy the marker. +</UL> + +<hr> +<h2><a name=#control>Control Panel</a></h2> +<h3><a name=#cview>View Controls</a></h3> +<P> The <b>Frame</b> box will list only the frame buffers you currently have +defined. Currently, the only way to destroy a frame buffer is to change the +frame buffer configuration, new frame buffers (up to 4) will be created +automatically if requested by the client. +<P> The <b>text display window</b> gives the field X,Y center, X,Y scale +factors, and the X,Y zoom factors. The scale factor and the zoom factor +will be the same unless autoscale is enabled. The scale is in units of +display pixels per frame buffer pixel, and is an absolute measure (it doesn't +matter whether or not <a href=#cautoscale>autoscale</a> is enabled). Zoom is +relative to the autoscale factor, which is 1.0 if autoscaling is disabled. +This information is also presented in the <a href=#info>Info panel</a>. +<P> The numbers in the <b>Zoom</b> box are zoom factors. Blue numbers zoom, +red numbers dezoom. <b>Zoom In</b> and <b>Zoom Out</b> may be used to go to +larger or smaller zoom factors, e.g. "Ctrl-5" followed by "Zoom In" will get you +to zoom factor 10. Specific zoom factors may also be accessed directly as +Control <a href=#keystrokes>keystrokes</a>, e.g. Ctrl-5 will set zoom factor 5. +<b>Center</b> centers the field. <b>Toggle Zoom</b> toggles between the +current zoom/center values, and the unzoomed image. +<P> <b>Aspect</b> recomputes the view so that the aspect ratio is 1.0. +Aspect also integerizes the zoom factor (use the version in the View menu +if you don't want integerization). +<P> <b>Fit Frame</b> makes the display window the same size as the frame +buffer. Note that <a href=#cautoscale>autoscale</a> has much the same effect, +and allows you to resize the display window to any size you want, or view +images to large to fit on the screen. + +<h3><a name=#cenhance>Enhancement Controls</a></h3> + +<P> At the top is a scrolled list of all the <a href=#cbltin>available +colormaps</a>. Click on the one you want to load it. You can add your own +<a href=#cuser>colormaps</a> to this list. +<P> The two sliders adjust the <b>contrast</b> (upper slider) and +<b>brightness</b> (lower slider) of the display. The <b>Invert</b> button +inverts the colormap (multiples the contrast by -1.0). Note that due to the +use of the private colormap the sliders are a bit sluggish when dragged to +window the display. If this is annoying, using MB3 in the display window is +faster. +<P>The <b>Normalize</b> button (on the bottom of the control panel) will +normalize the enhancement, i.e. set the contrast and brightness to the default +one-to-one values (1.0, 0.5). This is the preferred setting for many of the +pseudocolor colortables and for private colormaps loaded from disk images. + +<h3><a name=#cblink>Blink Controls</a></h3> +<UL> +<LI> <b>Blink frames</b> is the list of frames to be blinked. When blink +mode is in effect ximtool just cycles through these frames endlessly, pausing +"blink rate" seconds between each frame. The same frame can be entered in +the list more than once. To program an arbitrary list of blink frames, hit +the <b>Reset</b> button and click on each blink frame button until it is set +to the desired frame number. +<LI> The <b>Blink Rate</b> can be adjusted as slow or as fast as you want +using the arrow buttons. If you set the blink rate small enough it will go +to zero, enabling single step mode (see below). +<LI> The <b>Register</b> button registers all the blink frames with the current +display frame. Frames not in the blink list are not affected. +<LI> The <b>Match LUTs</b> button sets the enhancement of all blink frames to +the same values as the display frame. Frames not in the blink list are not +affected. +<LI> The <b>Blink</b> button turns blink on and off. When the blink rate is +set to zero the Blink button will single step through the blink frames, one +frame per button press. +</UL> +<P> +NOTE: you can blink no matter what ximtool options are in effect, but many +of these will slow blink down. To get the fastest blink you may want to +turn off the panner and coords box, and match the LUTs of all the blink +frames. All the ximtool controls are fully active during blink mode, plus +you can load frames etc. + + +<h3><a name=#copts>Options:</a></h3> +<DL> +<DT><b><a name=#cautoscale>Autoscale</a></b></DT> +<DD> If autoscale is enabled then at zoom=1, the frame buffer will be +automatically scaled to fit within the display window. With autoscale +disabled (the default), the image scale is more predictable, but the image +may be clipped by the display window, or may not fill the display window.</DD> + +<DT><b><a name=#cantialias>Antialiasing</a></b></DT> +<DD> When dezooming an image, i.e., displaying a large image in a smaller +display window, antialiasing causes all the data to be used to compute the +displayed image. If antialiasing is disabled then image is subsampled to +compute the displayed image. Antialiasing can prevent subsampling from +omitting image features that don't fall in the sample grid, but it is +significantly slower than dezooming via subsampling. The default is no +antialising. </DD> + +<DT><b><a name=#ctile>Tile Frames</a></b></DT> +<DD> The default display mode is to view one frame at a time. In tile frames +mode, 2 or 4 frames may be viewed simultaneously in the display window. All +the usual operations (zoom and pan, colortable enhancement, cursor readback, +etc.) still work for each frame even when in tile frames mode. </DD> + +<DT><b><a name=#cwarnings>Warnings</a></b></DT> +<DD> The warnings options toggles whether you see warning dialog boxes in +situations like overwriting an existing file, clearing the frame buffer, etc. +</DD> +</DL> + +<h3><a name=#ccmap>Colormap Selection</a></h3> +By default XImtool will display images using either a grayscale colormap +if loaded by a client, or a private colormap when loading an image from +disk that contains a colormap. Each frame defines its own colormap so +you can define different colormaps or enhancements for each frame, they +will change automatically as you cycle through the frames. + +<h4><a name=#cbltin>Builtin Colormaps</a></h4> +Once loaded, the colormap may either be changed using the builtin colormap +menu under the <b>View</b> menu button on the main window, or from the +<a href=#cenhance>Enhancement</a> box on the <a href=#control>control panel</a>. Ximtool has about a dozen colormap +options builtin, other <a href=#cuser>user-defined colormaps</a> may +optionally be loaded. + +<h4><a name=#cuser>User-defined Colormaps</a></h4> +The cmap[12] and cmapDir[12] resources (or <a href=#comline>command line +arguments</a> are used to tell ximtool which specific colormaps to make +available or where to look for colortables respectively. The colortables +are loaded when ximtool starts up, or when it is reinitialized (e.g. by +pressing the <b>Initialize</b> button in the <a href=#control>control +panel</a>). Ximtool will ignore any files in the colormap directory +which do not look like colortables. New colortables will also be added +for each images loaded from disk. +<P> +The format of a user lookup table is very simple: each row defines one +colortable entry, and consists of three columns defining the red, green, +and blue values scaled to the range 0.0 (off) to 1.0 (full intensity). +<PRE> + R G B + R G B + (etc.) +</PRE> +Blank lines and comment lines (# ...) are ignored. +<P> +Usually 256 rows are provided, but the number may actually be anything in +the range 1 to 256. Ximtool will interpolate the table as necessary to +compute the colortable values used in Ximtool. Ximtool uses at most 201 +colors to render pixel data, so it is usually necessary to interpolate the +table when it is loaded. +<P> +The name of the colortable as it will appear in the Ximtool control panel +is the root name of the file, e.g., if the file is "rainbow.lut" the +colortable name will be "rainbow". Lower case names are suggested to avoid +name collisions with the builtin colortables. Private colormaps for disk +images will be have the same name as the image loaded. If the same colortable +file appears in multiple user colortable directories, the first one will be +used. +<P> +The directory "luts" in the ximtool source directory contains a sample set +of colortable files. This can be installed as /usr/local/lib/imtoolcmap +when ximtool is installed. +<hr> + +<h2><a name=#load>Load Panel</a></h2> +The Load Panel allows you load images from disk directly to the frame buffer, +this is analogous to loading an image on the command line except that +browsing is possible. At present recognized formats include IRAF OIF format +(i.e. .imh extension), simple FITS files, GIF, and Sun rasterfiles. The +task will automatically sense the format of the image and load it +appropriately. Images with private colormaps (such as GIF) will be loaded +using the private colormap by default (meaning that changing the +brightness/contrast enhancements will render a random-colored image). If +the <b>Grayscale</b> button is enabled the image will be converted to +grayscale and loaded with the standard grayscale colormap. +<P> +When loading new images the frame buffer configuration table +(<em>imtoolrc</em>) will be searched for a frame buffer that is the same size +or larger than the new image size, if no frame buffer can be found a custom +buffer exactly the size of the image will be created. This means that the +image may not fill the display window when loaded, or you may see a subsection +of the image in the main display window. Setting the +<a href=#cautoscale>autoscale</a> option will scale the entire image to fit +the main display window. +<P> +Images with more colors than can be displayed will automatically be quantized +to the number of available colors before display. Formats which allow more +than 8-bit pixels will be sampled to determine an optimal range in the data +to be used to compute the transformation to the number of display colors. +This is the same transformation used by the IRAF DISPLAY task. + +<DL> +<DT><B><a name=#lbrowse>Directory browsing</a></B></DT> +<DD> +The load panel contains a list of files in the current directory that may +be selected for loading by selecting with left mouse button. If the file +is a directory the contents of the new directory will be loaded, if it's +a plain file an attempt will be made to load it as an image. Directories +in the list are identified with a trailing '/' character, you will always +see any directories available even if a <a href=#lpattern>filter</a> is +specified. +<P> +The <b>Root</b> button will reset the current directory to the system root +directory. The <b>Home</b> button will reset the current directory to the +user's login directory, the <b>Up</b> button moves up one directory level, +and <b>Rescan</b> reloads the file list by rescanning the directory. The +current working directory is given below the file selection window.</DD> + +<DT><B><a name=#lpattern>File Patterns</a></B></DT> +<DD> By default all files and directories will be listed. You may specify a +filter to e.g. select only those files with a given extension like "*.fits" +to list only files with a ".fits" extension. Directories will always be seen +in the list and are identified with a trailing '/' character. Any valid +unix pattern matching string will be recognized.</DD> +<DT><B><a name=#lload>Direct File Load</a></B></DT> +<DD> If you know exactly which file you wish to load, you may enter its name +in the <b>Load File</b> text box and either hit <cr> or the Load button to +load it. An absolute or relative path name may be given, if a simple filename +is specified it will be searched for in the current working directory.</DD> +<DT><B><a name=#lframe>Frame Selections</a></B></DT> +<DD> By default images will be loaded into frame number 1, you may select a +different frame using the <b>Frame</b> menu button.</DD> +</DL> +<hr> + +<h2><a name=#save>Save Panel</a></h2> +The Save Panel lets you save the current contents of the main display window +to a disk file (including the Panner/Coords markers, any general graphics +markers, or overlay graphics displayed by the client program). Presently, +only the contents of the main display window may be saved, there is no +facility for saving the undisplayed contents of the entire frame buffer +other than to enable the <a href=#cautoscale>autoscale</a> feature. A limited +number of formats are currently available, others will be added in future +versions. +<DL> +<DT><b><a name=#sfname>File Name</a></b></DT> +<DD> The <b>File Name</b> text box allows you to enter the file name of the +saved file. A "%d" anywhere in the name will be replaced by a sequence number +allowing multiple frames to be saved with unique names. </DD> +<DT><b><a name=#sformat>Format</a></b></DT> +<DD> The <B>Format</B> box allows you to choose the format of the image to be +created. Not all formats are currently implemented. </DD> +<DT><b><a name=#scolor>Color</a></b></DT> +<DD> The <b>Color</b> box lets you choose the color type of the image to be +created. The options will change depending on the format, e.g. FITS doesn't +allow color so no color options will be allowed. Formats which allow 24-bit +images will be written using the current colormap after converting to a 24-bit +image, pseudocolor images will be written with the current colormap. </DD> +</DL> +<hr> + +<h2><a name=#print>Print Panel</a></h2> +The Print Panel allows you dump the contents of the main display window as +Enacpsulated Postscript to either a named printer device or to a disk file. +The <b>Print To</b> selects the type of output, the <b>Print Command</b> +box will adjust accordingly, either as a Unix printer command or as a file +name. A "%d" anywhere in the name for disk output will be replaced by a +sequence number allowing multiple frames to be saved with unique names. +<a href=#pprinter>Selecting printers</a> from the installed list will +automatically change the command to be used to generate the output. This +command does not necessarily need to be a printer command, the +<a href=#pprinter>printer configuration file</a> lets you define any command +string to process the image. +<h3><a name=#pcolors>Color Options</a></h3> +The <b>Color</b> box lets you choose the color type of the image to be created. +PseudoColor or 24-bit postscript will be created using the current colormap. +<h3><a name=#popts>Postscript Options</a></h3> +<DL> +<DT>Orientation</DT> +<DD> Set the page orientation. +<DT>Paper Size</DT> +<DD> Select the paper size to be used. +<DT>Image Scale</DT> +<DD> Set the scale factor used to compute the final image size. +</DL> +<h3><a name=#pproc>Processing Options</a></h3> +<DL> +<DT>Auto Scale</DT> +<DD> The auto scale toggles whether or not the image is automatically scaled +to fit the page. If not enabled, the <b>image scale</b> will be used to +dtermine the output image size. +<DT>Auto Rotate</DT> +<DD> Auto rotate determines whether or not the image will be rotated to fit +on the page. When set, an image larger than the current orientation will be +rotated and possibly scaled to fit the page. +<DT>Max Aspect</DT> +<DD> Max Aspect takes images smaller than the page and automatically increases +the scale so the image fills the page in the current orientation. +<DT>Annotate</DT> +<DD> The annotate option toggles whether or not the final file includes +annotation such as the image title, a colorbar, and axis labels. +</DL> +<h3><a name=#pprinter>Printer selection</a></h3> +The printer selection list lets choose the printer to be used. The printer +configuration file is /usr/local/lib/ximprint.cfg by default or may be reset +using the <em>printConfig</em> resource. The format of the file is simply +<pre> + <b>name</b> < tab > <em>command</em> +</pre> +The <b>name</b> value is what appears in the selection list and may be more +than a single word, the <em>command</em> can be any command that accepts EPS +input from a pipe, the two fields must be separated by a tab character. +Normally the command will be +a simple 'lpr -Pfoo' or some such, but can also include converters or +previewers. At most 128 printer commands may be used. +<hr> + +<h2><a name=#info>Info Panel</a></h2> + The information panel is underused at present but is meant to provide +basic information about the frame being displayed. It is updated to be +current while changing enhancements, pan/zoom regions, or frame selection. +In cases where the image title string is truncated in the main display window, +the user can always pop up the info window to see the full title. +<hr> + +<h2><a name=#tclshell>TclShell</a></h2> + The <em>TclShell</em> is mostly used as a development or debugging +tool for the GUI. It allows the user to type commands directly to the +TCL interpreter letting you send messages to the object manager or execute +specific procedures in the TCL code that makes up the GUI. Most users will +never need this, but for an example of what it does, bring it up and type a +command such as +<pre> + send helpButton set background red +</pre> +Cool, huh. +<hr> + +<h2><a name=#acknowledgements>Acknowledgements</a></h2> + <I>XImtool</I> was developed by the IRAF Group at the National Optical +Astronomy Observatories in Tucson, AZ. For further information or to report +problems please contact <I>iraf@noao.edu</I> +<hr> +This document was last updated 11/6/96. + +</BODY> +</HTML> diff --git a/vendor/x11iraf/ximtool/OLD/ximtool-mag.man b/vendor/x11iraf/ximtool/OLD/ximtool-mag.man new file mode 100644 index 00000000..c4fcaae0 --- /dev/null +++ b/vendor/x11iraf/ximtool/OLD/ximtool-mag.man @@ -0,0 +1,1493 @@ +.\" @(#)ximtool.1 1.1 10-Dec-96 MJF +.TH XIMTOOL-MAG 1 "10 Dec 1996" "X11IRAF Project" +.SH NAME +ximtool-mag \- interactive image display program for the X Window System with experimental GUI +.SH SYNOPSIS +.B "ximtool-mag" [\-\fItoolkitoption\fP ...] [ \fIoptions\fP ...] [\fIimagename\fP] +.SH OPTIONS +.TP 5 +.B "-basePixel \fIN\fP" +The base colormap cell used by the colormap. This essentially allows you +to reserve \fIbasePixel\fP colors in the global colormap for other applications. +The default is 64, if changed you'll need to also specify the +\fI-cmapInitialize\fP option or resource. +.TP 5 +.B "-cmap1 \fIfile\fP" +User colormap 1. This flag allows you to specify a colormap to be made +available at task startup. +.TP 5 +.B "-cmap2 \fIfile\fP" +User colormap 2. This flag allows you to specify a second colormap to be +made available at task startup. +.TP 5 +.B "-cmapDir1 \fIdir\fP" +User colormap directory 1. Specifies a directory to be searched for colormaps. +.TP 5 +.B "-cmapDir2 \fIdir\fP" +User colormap directory 2. Specifies a directory to be searched for colormaps. +By default this points to the system directory /usr/local/lib/imtoolcmap, +allowing a set of site default colormaps to be defined here. +.TP 5 +.B "-cmapInitialize \fIbool\fP" +Initialize the ximtool colormap at startup. When setting the \fIbasePixel\fP +option or resource this is required in order to force the Gterm widget to +update its global colormap resource in the X server. The default is +\fIfalse\fP. +.TP 5 +.B "-cmapName \fIname\fP" +Name used for private colormap. The default for all IRAF imaging +applications is \fIimage\fP. Gterm widget based imaging applications +which have the same value of cmapName will share the same colormap, +minimizing colormap flashing and allowing multiple applications to be +run at the same time. +.TP 5 +.B "-config \fIN\fP" +Initial frame buffer configuration number. The default value is 1, indicating +a 512x512 frame buffer with 2 frames. See below for information on the frame +buffers. +.TP 5 +.B "-defgui" +Print the default GUI to the stdout. The GUI is a Tcl program that may be +customized by the user and reloaded using the \fI-gui\fP option or +the \fIgui\fP resource parameter. +.TP 5 +.B "-displayPanner \fIbool\fP" +Display panner marker window at startup. If set, a panner window showing +the full frame buffer will appear in the upper-right side of the main display +window. +.TP 5 +.B "-displayMagnifier \fIbool\fP" +Display magnifier marker window at startup. If set, a magnifier window showing +a zoomed section around the cursor will appear in the upper-left side of the +mail display window. +.TP 5 +.B "-displayCoords \fIbool\fP" +Display WCS coordinate marker window at startup. If set, a coordinate +readout text marker showing will appear in the lower-right side of the main +display window. +.TP 5 +.B "-fifo \fIpipe\fP" +Specifies the name of the fifo pipe to be used, the \fIi\fP +and \fIo\fP suffixes will be added automatically. The default pipe names +will be /dev/imt1i (input pipe) and /dev/imt1o (output pipe). +.TP 5 +.B "-fifo_only" +If set, only fifo pipes will be used for communication with a client program, +sockets will be disabled. +.TP 5 +.B "-gui \fIfile\fP" +Specifies the GUI file to be used. +.TP 5 +.B "-help" +Print a summary of command line options to the screen. +.TP 5 +.B "-imtoolrc \fIfile\fP" +Specifies the frame buffer configuration file to be used. See below for +information on frame buffers. +.TP 5 +.B "-inet_only" +If set, only inet sockets will be used for communication with a client program, +fifo pipes and unix sockets will be disabled. +.TP 5 +.B "-invert" +Start XImtool using inverted colormaps. When set, a "normalized" display +will always be the inverse of the selected colormap. +.TP 5 +.B "-maxColors \fIN\fP" +Specify the max number of colors to be used for the display. +.TP 5 +.B "-memModel \fItype\fP" +Determines how ximtool uses memory in the ximtool client and the X server. +The options are \fIfast\fP, \fIbeNiceToServer\fP, and \fIsmall\fP. The +default is \fIfast\fP, which uses server pixmaps to make frame blink fast. +This is recommended unless server memory is very limited. Note that even in +fast mode, the server pixmap is only the size of the display window, so memory +usage is reasonable even if the frame buffer is very large. +.TP 5 +.B "-nframes \fIN\fP" +Specifies the number of frame buffers to configure at startup. By default +there will be 2 frames available, a maximum of 4 frames are allowed. +.TP 5 +.B "-port \fIN\fP" +Specifies the port number to use when connecting through an inet socket. +.TP 5 +.B "-port_only" +Same as \fI-inet_only\fP option. If set, only inet sockets will be used for +communication with a client program. +.TP 5 +.B "-printConfig \fIname\fP" +Specifies the printer configuration file to use. By default this will be +/usr/local/lib/ximprint.cfg. See below for more information on configuring +output devices. +.TP 5 +.B "-tile" +The default display mode is to view one frame at a time. In tile frames mode, +2 or 4 frames may be viewed simultaneously in the display window. All the +usual operations (zoom and pan, colortable enhancement, cursor readback, etc.) +still work for each frame even when in tile frames mode. +.TP 5 +.B "-unix \fIname\fP" +Specifies the unix domain socket name to use. A "%d" in the filename will +be replaced with the user id. +.TP 5 +.B "-unix_only" +If set, only unix domain sockets will be used for communication with a client +program, inet sockets and fifos will be disabled. + +.SH "RESOURCES" +XImtool is implemented as a client program which is responsible for loading +the frame buffers/colormaps, communicating with clients, etc, and a +user-modifiable GUI file written as a Tcl script which handles all the user +interface details. The \fIclient resources\fP described below will be common +to any user-defined GUI, the \fIgui resources\fP may change depending on how +extensively the GUI has been modified by the user. Each of these components +has its own set of resources, but to the user setting them is the same as +with any other application. + +\fIGterm\fP widget resources (i.e. those for the main image window or +colorbar) may be set as either client or GUI resources. See the +\fIxgterm(1)\fP man page for a complete description of \fIGterm\fP widget +resources. + +.SS "CLIENT RESOURCES" +The client resources generally define the initial state of the application +or set configuration parameters. +.RS +.TP 25 +.B "Resource Name" +\fBDefault Value\fP +.sp -0.5 +.TP 25 +defConfig +1 +.sp -0.5 +.TP 25 +defNFrames +0 +.sp -0.5 +.TP 25 +tileBorderWidth +3 +.sp -0.5 +.TP 25 +tileBorderColor +9 +.sp -0.5 +.TP 25 +autoscale +false +.sp -0.5 +.TP 25 +antialias +false +.sp -0.5 +.TP 25 +antialiasType +boxcar +.sp -0.5 +.TP 25 +tileFrames +false +.sp -0.5 +.TP 25 +highlightFrames +true +.sp -0.5 +.TP 25 +gui +default +.sp -0.5 +.TP 25 +imtoolrc +/usr/local/lib/imtoolrc +.sp -0.5 +.TP 25 +invert +false +.sp -0.5 +.TP 25 +memModel +fast +.sp -0.5 +.TP 25 +basePixel: +64 +.sp -0.5 +.TP 25 +maxColors: +216 +.sp -0.5 +.TP 25 +cmapInitialize: +false +.sp -0.5 +.TP 25 +cmap1 +none +.sp -0.5 +.TP 25 +cmap2 +none +.sp -0.5 +.TP 25 +cmapDir1 +none +.sp -0.5 +.TP 25 +cmapDir2 +/usr/local/lib/imtoolcmap +.sp -0.5 +.TP 25 +input_fifo +/dev/imt1i +.sp -0.5 +.TP 25 +output_fifo +/dev/imt1o +.sp -0.5 +.TP 25 +unixaddr +/tmp/.IMT%d +.sp -0.5 +.TP 25 +port +5137 +.RE +.LP +Description of ximtool client resources: + +.TP 18 +.B "defConfig" +Default frame buffer configuration number on startup. See below for more +information on frame buffers. +.TP 18 +.B "defNFrames" +Default number of frames on startup. Set to zero to use the value from +the frame buffer configuration (\fIimtoolrc\fP) file. +.TP 18 +.B "tileBorderWidth" +.sp -0.5 +.TP 18 +.B "tileBorderColor" +Used by the tile frames option. Specifies how far +apart to space the frames in tile frames mode. +Color "9" refers to the Gterm widget resource color9, +which is assigned a color with its own resource. +.TP 18 +.B "autoscale" +Enable/disable the autoscale option. +.TP 18 +.B "antialias" +Enable/disable the antialias option. +.TP 18 +.B "antialiasType" +Type of antialiasing. +.TP 18 +.B "tileFrames" +Enable/disable the tile frames option. +.TP 18 +.B "highlightFrames" +Determines whether the current frame is highlighted when in tile frames mode. +.TP 18 +.B "gui" +The GUI to be executed. "default" refers to the default, builtin ximtool GUI. +You can replace this with your own GUI file if you are bold enough, and +completely change the look and functionality of the GUI if desired. +.TP 18 +.B "imtoolrc" +Where to find the imtoolrc file. This defines the +recognized frame buffer configurations. +.TP 18 +.B "invert" +Start Ximtool using an inverted colormap. When set, a "normalized" display +will always be the inverse of the selected colormap. +.TP 18 +.B "memModel" +Determines how ximtool uses memory in the ximtool client and the X server. +The options are "fast", "beNiceToServer", and "small". The default is fast, +which uses server pixmaps to make frame blink fast. This is recommended +unless server memory is very limited. Note that even in fast mode, the server +pixmap is only the size of the display window, so memory usage is reasonable +even if the frame buffer is very large. +.sp -0.5 +.TP 18 +.B "basePixel" +.sp -0.5 +.TP 18 +.B "maxColors" +These two resources determine the region of colormap space used to +render image pixels. +.TP 18 +.B "cmapInitialize" +Initialize the ximtool colormap at startup. This is sometimes necessary to +clear a previous ximtool colormap allowing a new basePixel and maxColors to +take effect. +.TP 18 +.B "cmap1" +.sp -0.5 +.TP 18 +.B "cmap2" +User colormap files. The intent here is to allow individual colormaps to be +conveniently specified as a resource. +.TP 18 +.B "cmapDir1" +.sp -0.5 +.TP 18 +.B "cmapDir2" +User or system colormap directories. By default cmapDir2 points to the system +directory /usr/local/lib/imtoolcmap, allowing a set of site default colormaps +to be defined here. This leaves cmapDir1 available to a user colormap +directory. +.TP 18 +.B "input_fifo" +.sp -0.5 +.TP 18 +.B "output_fifo" +The input and output fifos for fifo i/o. "Input" and "output" are from the +client's point of view. Note that only one display server can use a +fifo-pair at one time. +.TP 18 +.B "unixaddr" +Template address for unix domain socket. The user must have write permission +on this directory, or the file must already exist. %d, if given, is +replaced by the user's UID. +.TP 18 +.B "port" +TCP/IP port for the server. Note that only one server can listen on a port +at one time, so if multiple ximtool servers are desired on the same +machine, they should be given different ports. + +.SS "GUI RESOURCES" + +In principle ximtool can have any number of different GUIs, each of which +defines its own set of resources. GUIs typically define a great many +resources, but most of these are not really intended for modification by +the user (although one can modify them if desired). + +The following are some of the more useful resources used by the default +ximtool GUI. The \fIimagewin\fR resources are Gterm widget resources. +.RS +.TP 35 +.B " Resource Name" +\fBDefault Value\fP +.sp -0.5 +.TP 35 + .geometry: + +.sp -0.5 +.TP 35 + *controlShell.geometry: + +.sp -0.5 +.TP 35 + *info.geometry: +420x240 +.sp -0.5 +.TP 35 + *load_panel.geometry: + +.sp -0.5 +.TP 35 + *save_panel.geometry: + +.sp -0.5 +.TP 35 + *print_panel.geometry: + +.sp -0.5 +.TP 35 + *help_panel.geometry: + +.sp -0.5 +.TP 35 + *cmapName: +image +.sp -0.5 +.TP 35 + *basePixel: +64 +.sp -0.5 +.TP 35 + *imagewin.warpCursor: +true +.sp -0.5 +.TP 35 + *imagewin.raiseWindow: +true +.sp -0.5 +.TP 35 + *imagewin.deiconifyWindow: +true +.sp -0.5 +.TP 35 + *imagewin.ginmodeCursor: +circle +.sp -0.5 +.TP 35 + *imagewin.ginmodeBlinkInterval: +500 +.sp -0.5 +.TP 35 + *imagewin.color0: +black +.sp -0.5 +.TP 35 + *imagewin.color1: +white +.sp -0.5 +.TP 35 + *imagewin.color8: +#7c8498 +.sp -0.5 +.TP 35 + *imagewin.color9: +steelblue +.sp -0.5 +.TP 35 + *imagewin.width: +512 +.sp -0.5 +.TP 35 + *imagewin.height: +512 +.sp -0.5 +.TP 35 + *autoscale: +True +.sp -0.5 +.TP 35 + *zoomfactors: +1 2 4 8 +.sp -0.5 +.TP 35 + *displayCoords: +True +.sp -0.5 +.TP 35 + *displayPanner: +True +.sp -0.5 +.TP 35 + *displayMagnifier: +False +.sp -0.5 +.TP 35 + *blinkRate: +1.0 +.sp -0.5 +.TP 35 + *pannerArea: +150*150 +.sp -0.5 +.TP 35 + *pannerGeom: +-5+5 +.sp -0.5 +.TP 35 + *magnifierArea: +100*100 +.sp -0.5 +.TP 35 + *magnifierGeom: ++5+5 +.sp -0.5 +.TP 35 + *wcsboxGeom: +-5-5 +.sp -0.5 +.TP 35 + *maxContrast: +5.0 +.sp -0.5 +.TP 35 + *warnings: +True +.RE +.LP +Description of selected resources: + +.TP 22 +.B ".geometry" +Geometry of main image window. +.TP 22 +.B "*controlShell.geometry" +Geometry of control panel shell. +.TP 22 +.B "*info.geometry" +Geometry of info box. +.TP 22 +.B "*load_panel.geometry" +Geometry of file load panel. +.TP 22 +.B "*save_panel.geometry" +Geometry of save control panel. +.TP 22 +.B "*print_panel.geometry" +Geometry of print control panel. +.TP 22 +.B "*help_panel.geometry" +Geometry of help box. +.TP 22 +.B "*cmapName" +Name used for private colormap. The default for all IRAF imaging applications +is "image". Gterm widget based imaging applications which have the same value +of cmapName will share the same colormap, minimizing colormap flashing and +allowing multiple applications to be run at the same time. +.TP 22 +.B "*basePixel" +The base colormap cell used by the display colormap. +.TP 22 +.B "*imagewin.warpCursor" +Warp pointer into image window when initiating a cursor read. +.TP 22 +.B "*imagewin.raiseWindow" +Raise image window when initiating a cursor read. +.TP 22 +.B "*imagewin.deiconifyWindow" +Deiconify image window if necessary when initiating a cursor read. +.TP 22 +.B "*imagewin.ginmodeCursor" +Type of cursor when a cursor read is in progress. The default is a +circle. Any selection from the X cursor font can be used. A special +case is "full_crosshair" which is the full crosshair cursor of the +Gterm widget. +.TP 22 +.B "*imagewin.ginmodeBlinkInterval" +Determines whether the cursor blinks when a cursor read is in progress. +The value is given in milliseconds. +.TP 22 +.B "*imagewin.color0" +Background color. +.TP 22 +.B "*imagewin.color1" +Foreground color. +.TP 22 +.B "*imagewin.color8" +Color assigned the panner window. +.TP 22 +.B "*imagewin.color9" +Color used for the tileFrames highlight. +.TP 22 +.B "*imagewin.width" +Width of the main image window. +.TP 22 +.B "*imagewin.height" +Height of the main image window. +.TP 22 +.B "*pannerArea" +Area in pixels of the panner window. +.TP 22 +.B "*pannerGeom" +Where to place the panner window. +.TP 22 +.B "*magnifierArea" +Area in pixels of the magnifier window. +.TP 22 +.B "*magnifierGeom" +Where to place the magnifier window. +.TP 22 +.B "*wcsboxGeom" +Where to place the coords box. +.TP 22 +.B "*maxContrast" +Maximum contrast value. + +.sp +.SH DESCRIPTION +.LP +As a display server, XImtool is started as a separate process from client +software such as IRAF. Once it is running it will accept client connections +simultaneously on fifo pipes, unix domain sockets, or inet sockets. A +display client like the IRAF \fIDISPLAY\fP task makes a connection and sends +the image across using an IIS protocol. Once the image is loaded in the +display buffer it may be enhanced, saved to a disk file in a number of +different formats, or printed as Encapsulated Postscript to a printer or +disk file. Up to four frame buffers are allowed, these may be displayed +simultaneously in a tiled mode, or blinked frame-to-frame. Each frame may +have its own colormap or brightness/contrast enhancement. Pan/Zoom and +cursor readout are permitted using \fImarkers\fP, on-line help is also +available. + +When run in standalone mode, images (currently IRAF OIF, GIF, Sun Rasterfiles +or simple FITS formats are permitted) may be loaded on the command line or by +using the Load Panel. This allows you to browse images and perform the same +manipulations as if they had been displayed by a client. + +.SS "MOUSE OPERATIONS" + +Clicking and dragging MB1 (mouse button 1) in the main image window creates +a rectangular region marker, used to select a region of the image. If you do +this accidentally and don't want the marker, put the pointer in the marker +and type DELETE or BACKSPACE to delete the marker. With the pointer in the +marker, MB3 will call up a marker menu listing some things you can do with +the marker, like zoom the outlined region. MB1 can be used to drag or resize +the marker. See below for more information on markers. + +Clicking on MB2 in the main image window pans (one click) or zooms (two +clicks) the image. Further clicks cycle through the builtin zoom factors. +Moving the pointer to a new location and clicking moves the feature under +the pointer to the center of the display window. Holding down the Shift +key while clicking MB2 will cause a full-screen crosshair cursor to appear +until the button is released, this can be useful for fine positioning of the +cursor. + +MB3 is used to adjust the contrast and brightness of the displayed image. +The position of the pointer within the display window determines the +contrast and brightness values. Click once to set the values corresponding +to the pointer location, or click and drag to continuously adjust the +display. + +.SS "KEYSTROKE ACCELERATORS" + +The following keystrokes are currently defined in the GUI: + +.TP 12 +.B "Ctrl-b" +Backward frame +.sp -0.5 +.TP 12 +.B "Ctrl-c" +Center frame +.sp -0.5 +.TP 12 +.B "Ctrl-f" +Forward frame +.sp -0.5 +.TP 12 +.B "Ctrl-i" +Invert +.sp -0.5 +.B "Ctrl-m" +Toggle magnifier +.sp -0.5 +.TP 12 +.TP 12 +.B "Ctrl-n" +Normalize +.sp -0.5 +.TP 12 +.B "Ctrl-p" +Toggle panner +.sp -0.5 +.TP 12 +.B "Ctrl-r" +Register +.sp -0.5 +.TP 12 +.B "Ctrl-s" +Match LUT scaling +.sp -0.5 +.TP 12 +.B "Ctrl-t" +Tile frames toggle +.sp -0.5 +.TP 12 +.B "Ctrl-u" +Unzoom (zoom=1) +.sp -0.5 +.TP 12 +.B "Ctrl-x" +Flip X +.sp -0.5 +.TP 12 +.B "Ctrl-y" +Flip Y + +.TP 12 +.B "Alt-b" +Blink frames (toggle) +.sp -0.5 +.TP 12 +.B "Alt-c" +Control panel (toggle) +.sp -0.5 +.TP 12 +.B "Alt-h" +Help popup (toggle) +.sp -0.5 +.TP 12 +.B "Alt-i" +Info box popup (toggle) +.sp -0.5 +.TP 12 +.B "Alt-l" +Load file popup (toggle) +.sp -0.5 +.TP 12 +.B "Alt-p" +Print popup (toggle) +.sp -0.5 +.TP 12 +.B "Alt-s" +Save popup (toggle) +.sp -0.5 +.TP 12 +.B "Alt-t" +TclShell popup (toggle) + +.TP 12 +.B "Ctrl-Alt-q" +Quit +.sp -0.5 +.TP 12 +.B "Ctrl-Alt-f" +Fitframe + +.TP 12 +.B "Ctrl-=" +Print using current setup +.sp -0.5 +.TP 12 +.B "Ctrl-<" +Decrease blink rate (blink faster) +.sp -0.5 +.TP 12 +.B "Ctrl->" +Increase blink rate (blink slower) +.sp -0.5 +.TP 12 +.B "Ctrl-+" +Zoom in +.sp -0.5 +.TP 12 +.B "Ctrl--" +Zoom out + +.TP 12 +.B "Ctrl-[hjkl] or <arrow_key>" +Move cursor one pixel in each direction +.sp -0.5 +.TP 12 +.B "Ctrl-Shift-[hjkl] or Shift-<arrow_key>" +Move cursor ten pixels in each direction +.sp -0.5 +.TP 12 +.B "Ctrl-<arrow_key>" +Move panner one full width in each direction +.sp -0.5 +.TP 12 +.B "Ctrl-Alt-<arrow_key>" +Move panner one half width in each direction +.sp -0.5 +.TP 12 +.B "Alt-1 thru Alt-4" +Set frame displayed +.sp -0.5 +.TP 12 +.B "Ctrl-1 thru Ctrl-9" +Set integer zoom factor + +.LP +\fBNOTE:\fP These keystrokes only work with the cursor in the main image window, +not on the subwindows or in markers since they are implemented as +\fIimagewin\fP translations. If a command does not work, check the cursor +location. + +.SH "CLIENT CONNECTIONS" +.LP +XImtool allows clients to connect in any of the following ways: +.TP 5 +.B "fifo pipes" +The traditional approach. The default global /dev/imt1[io] +pipes may be used, or a private set of fifos can be specified using the +\fI-fifo\fP command line argument or \fI*fifo\fP resource. Values should +be specified as the root pathname to a pair of fifo pipes whose last +character is 'i' or 'o', these characters will be added automatically when +opening the pipes. For example, to use the default pipes the path would +be specified as simply "/dev/imt1". A value of "none" disables this connection. +.TP 5 +.B "tcp/ip sockets" +Clients connect via a tcp/ip socket. The default port is \fI5137\fP, or a +custom port may be specified using the \fI-port\fP command line switch or +a \fI*port\fP resource. This permits connecting to the server +over a remote network connection anywhere on the Internet. +A port number of 0 (zero) disables this connection. +.TP 5 +.B "unix domain sockets" +Like a tcp/ip socket, but limited to a single host system. Usually faster +than a tcp/ip socket, and comparable to a fifo. By default each user gets +their own unix domain socket, so this option allows multiple users to run +ximtools on the same host without having to customize things. The default +value is "/tmp/.IMT%d", other sockets may be defined using the \fI-unix\fP +command line switch or the \fI*unixaddr\fR resource. Legal values +should be specified as a filename to be used for the socket, up to two "%d" +fields are allowed and will be replaced by the userid. An empty string value +disables this connection. +.LP +By default ximtool listens simultaneously for client connections on all three +types of ports. Clients may connect simultaneously by different +means allowing up to three different displays to be loading at the same +time into different frames. + +.SS "COMMUNICATIONS PROTOCOL" + +Clients communicate with XImtool using a protocol developed originally for +IIS (International Imaging Systems) Frame Buffer hardware, the so-called +"IIS protocol"; other more modern protocols will likely be supported in the +future. The IIS protocol is basically a command packet stream with a header +describing the operation to be performed (select frame, load display, read +cursor, etc), and an optional data packet containing e.g. pixels. It is beyond +the scope of this document to describe fully the details of the protocol; +interested users should contact \fIiraf@noao.edu\fP for further information. + +.SH "FRAME BUFFERS" + +XImtool starts up using default frame buffer size of 512x512 pixels, two +(of four possible) frames will be created. When loading +disk images (i.e. run in standalone mode) the frame buffer configuration file +will be searched for a defined frame buffer that is the same size or larger +than the current image, if no suitable buffer can be found a custom frame +buffer the same size as the image will be created in an unused portion of +the configuration table. When used as a display server the frame buffer +configuration number is passed in by the client and loaded explicitly even +if it means clipping the image. If a new frame buffer is +a different size than previously defined frames, all available frames +will be initialized and cleared prior to the display. The default frame buffer +configuration file is /usr/local/lib/imtoolrc, +this can be overridden by defining a IMTOOLRC environment variable naming +the file to be used, by creating a .imtoolrc file in your home directory, or +a new file may be specified using the \fI-imtoolrc\fR command line flag or +\fIimtoolrc\fR application resource. + +The format of the frame buffer configuration file is + + \fIconfigno nframes width height [extra fields]\fP + e.g. + 1 2 512 512 + 2 2 800 800 + 3 1 1024 1024 # comment + : : : : + +At most 128 frame buffer sizes may be defined, each configuration may define +up to 4 frames, configuration numbers need not be sequential. + +\fBNOTE:\fR When defining a new frame buffer for use with client software +such as IRAF the user must also remember to define those frame buffers in +the IRAF \fIdev$graphcap\fR file. + +.SH "MARKERS" + +Although ximtool doesn't do much with markers currently, they are a general +feature of the \fIGterm\fP widget and are used more extensively in other +programs (e.g. the prototype IRAF science GUI applications). XImtool uses +markers for the marker zoom feature discussed above, and also for the panner, +magnifier and the coordinates box. All markers share some of the same +characteristics, so it is worthwhile learning basic marker manipulation +keystrokes. +.TP 3 +\fBo\fP +MB1 anywhere inside a marker may be used to drag the marker. +.TP 3 +\fBo\fP +MB1 near a marker corner or edge, depending on the type of marker, +resizes the marker. +.TP 3 +\fBo\fP +Shift-MB1 on the corner of most markers will rotate the marker. +.TP 3 +\fBo\fP +Markers stack, if you have several markers and you put one on top of +the other. The active marker is highlighted to tell you which of the +stacked markers is active. If the markers overlap, this will be marker +"on top" in the stacking order. +.TP 3 +\fBo\fP +MB2 in the body of a marker "lowers" the marker, i.e. moves it to the +bottom of the stacking order. +.TP 3 +\fBo\fP +Delete or backspace in a marker deletes it. +.TP 3 +\fBo\fP +Markers have their own translation resources and so the default +keystroke commands will not be recognized when the cursor is in a marker. +.LP +For example, try placing the pointer anywhere in the coords box, then press +MB1 and hold it down, and drag the coords box marker somewhere else on the +screen. You can also resize the coords box by dragging a corner, or delete +it with the delete or backspace key. (The Initialize button will get the +original coords box back if you delete it, or you can reset the toggle in +the control panel). + +.SS "PANNER MARKER" + +The panner window always displays the full frame buffer. Try setting the +frame buffer configuration to a nonsquare frame buffer (e.g. imtcryo) and +then displaying a square image (e.g. dev$pix) and the panner will show you +exactly where the image has been loaded into the frame. + +The panner window uses two markers, one for the window border and one to +mark the displayed region of the frame. Most of the usual marker keystrokes +mentioned below apply to these markers as well, e.g. you can use MB1 to +reposition on the panner window within the main image display window, or to +drag the region marker within the panner (pan the image). Resizing the +region marker zooms the image; this is a non-aspect constrained zoom. The +panner window itself can be resized by dragging a corner with MB1. Typing +delete or backspace anywhere in the panner window deletes the panner. + +A special case is MB2. Hitting MB2 anywhere in the panner window pans the +image to that point. This is analogous to hitting MB2 in the main display +window to pan the image. + +The panner marker can be disabled by defining the \fIdisplayPanner\fP +GUI resource, its size and location can be controlled using the +\fIpannerArea\fP and \fIpannerGeom\fP GUI resources respectively. + +.SS "MAGNIFIER MARKER" + +The magnifier marker can be used to zoom in on a small area around the cursor. +It will be updated as the cursor moves but only for small motions (either +mouse movement or with the cursor movement keystrokes) to minimize the +impact on the system. The zoom factor is expressed as some fraction of the +size of the magnifier marker itself. The default zoom is 4, i.e. the area +in the marker represents and area in the image that's one-fourth the size +of the marker. Other zoom factors may be selected using the popup menu +created by hitting MB1 in the marker. + +By default the magnifier marker is not visible, to toggle it select the +\fIMagnifier\fR option from the \fIOptions\fR menubar button. Alternatively, +for just a quick look holding down the Shift and MB1 buttons will display +the marker until the button is released. + +The magnifier marker can be disabled by defining the \fIdisplayMagnifier\fP +GUI resource, its size and location can be controlled using the +\fImagnifierArea\fP and \fImagnifierGeom\fP GUI resources respectively. + +.SS "COORDS BOX MARKER" + +XImtool provides a limited notion of world coordinates, allowing frame +buffer pixel coordinates and pixel values to be converted to some arbitrary +linear client-defined coordinate system. The coords box feature is used to +display these world coordinates as the pointer is moved about in the image +window. + +The quantities displayed in the coords box are X, Y, and Z: the X,Y world +coordinates of the pointer, and Z, the world equivalent of the pixel value +under the pointer. All coordinate systems are linear. The precision of a +displayed quantity is limited by the range of values of the associated raw +frame buffer value. For example, if the display window is 512x512 only 512 +coordinate values are possible in either axis (the positional precision can +be increased however by zooming the image). More seriously, at most about +200 pixel values can be displayed since this is the limit on the range of +pixel values loaded into the frame buffer. If a display pixel is saturated a +"+" will be displayed after the intensity value. + +The coords box is a text marker, it can be moved and resized +with the pointer like any other marker. The coords box marker can be +disabled by defining the \fIdisplayCoords\fP GUI resource, its location +can be controlled by the \fIwcsboxGeom\fP GUI resource. + +.SS "MARKER MENU OPTIONS" + +Except for the panner and WCS markers, MB3 (mouse button 3) calls up the +marker menu providing a limited set of functions common to all markers: +.TP 3 +\fBo +Zoom\fP does an equal aspect zoom of the region outlined by the marker. In +this way you can mark a region of the image and zoom it up. +.TP 3 +\fBo +Fill\fP exactly zooms the area outlined by the marker, making it fill the +display window. Since the marker is not likely to be exactly square, +the aspect ratio of the resultant image will not be unitary. +.TP 3 +\fBo +Print\fP prints the region outlined by the marker to the printer or file +currently configured by the Print Panel. +.TP 3 +\fBo +Save\fP saves the region outlined by the marker to the file currently +configured by the Save Panel. +.TP 3 +\fBo +Info\fP prints a description of the marked region. The text is printed in +the Info Panel. +.TP 3 +\fBo +Unrotate\fP unrotates a rotated marker. +.TP 3 +\fBo +Color\fP is a menu of possible marker colors. +.TP 3 +\fBo +Type\fP is a menu of possible marker types. This is still a little buggy +and it isn't very useful, but you can use it to play with different +types of markers. +.TP 3 +\fBo +Destroy\fP destroys the marker. You can also hit the delete or backspace +key in a marker to destroy the marker. + +.SH "CONTROL PANEL" + +XImtool has a control panel which can be used to exercise most of the +capabilities the program has for image display. The control panel can be +accessed either via the \fBOptions\fP menu from the main window menubar, or by +pressing the leftmost button in the row of buttons at the upper right side +of the display. + +.SS "VIEW CONTROLS" + +The \fBFrame box\fP will list only the frame buffers you currently have +defined. Currently, the only way to destroy a frame buffer is to change the +frame buffer configuration, new frame buffers (up to 4) will be created +automatically if requested by the client. The number of frame buffers +created at startup can be controlled using the \fI-nframes\fP command-line +switch or the \fIdefNFrames\fP resource. + +The \fBtext display\fP window gives the field X,Y center, X,Y scale factors, +and the X,Y zoom factors. The scale factor and the zoom factor will be the same +unless \fIautoscale\fP is enabled. The scale is in units of display pixels per +frame buffer pixel, and is an absolute measure (it doesn't matter whether or +not autoscale is enabled). Zoom is relative to the autoscale factor, which +is 1.0 if autoscaling is disabled. This information is also presented in the +Info panel. + +The numbers in the \fBZoom box\fP are zoom factors. Blue numbers zoom, red +numbers dezoom. \fIZoom In\fP and \fIZoom Out\fP may be used to go to larger +or smaller zoom factors, e.g. "Ctrl-5" followed by "Zoom In" will get you to +zoom factor 10. Specific zoom factors may also be accessed directly as Control +keystrokes, e.g. Ctrl-5 will set zoom factor 5. \fICenter\fP centers the field. +\fIToggle Zoom\fP toggles between the current zoom/center values, and the +unzoomed image. + +\fIAspect\fP recomputes the view so that the aspect ratio is 1.0. Aspect also +integerizes the zoom factor (use the version in the View menu if you don't +want integerization). + +\fIFit Frame\fP makes the display window the same size as the frame buffer. Note +that autoscale has much the same effect, and allows you to resize the +display window to any size you want, or view images too large to fit on the +screen. + +.SS "ENHANCEMENT CONTROLS" + +At the top is a scrolled list of all the available colormaps. Click on the +one you want to load. You can add your own colormaps to this list by +defining the \fIcmap[12]\fP or \fIcmapDir[12]\fP command line flags or +application resources. + +The two sliders adjust the contrast (upper slider) and brightness (lower +slider) of the display. The \fIInvert\fP button inverts the colormap (multiples +the contrast by -1.0). Note that due to the use of the private colormap the +sliders are a bit sluggish when dragged to window the display. If this is +annoying, using MB3 in the display window is faster. + +The \fINormalize\fP button (on the bottom of the control panel) will normalize +the enhancement, i.e. set the contrast and brightness to the default one-to-one +values (1.0, 0.5). This is the preferred setting for many of the pseudocolor +colortables and for private colormaps loaded from disk images. The +\fIInitialize\fP button does a reset of the server. + +.SS "BLINK CONTROLS" + +\fIBlink frames\fP is the list of frames to be blinked. When blink mode is +in effect ximtool just cycles through these frames endlessly, pausing +"blink rate" seconds between each frame. The same frame can be entered +in the list more than once. To program an arbitrary list of blink +frames, hit the Reset button and click on each blink frame button until +it is set to the desired frame number. + +The \fIBlink Rate\fP can be adjusted as slow or as fast as you want using the +arrow buttons. If you set the blink rate small enough it will go to +zero, enabling single step mode (see below). + +The \fIRegister\fP button registers all the blink frames with the current +display frame. Frames not in the blink list are not affected. + +The \fIMatch LUTs\fP button sets the enhancement of all blink frames to the +same values as the display frame. Frames not in the blink list are not affected. + +The \fIBlink\fP button turns blink on and off. When the blink rate is set to +zero the Blink button will single step through the blink frames, one +frame per button press. + +\fBNOTE:\fP You can blink no matter what ximtool options are in effect, but +many of these will slow blink down. To get the fastest blink you may want to +turn off the panner and coords box, and match the LUTs of all the blink frames. +All the ximtool controls are fully active during blink mode, plus you can +load frames etc. + +.SS "OPTIONS:" +.TP 5 +.B "Panner" +Toggles whether to display the panner marker. +.TP 5 +.B "Coords Box" +Toggles whether to display the coordinate box marker. +.TP 5 +.B "Autoscale" +If autoscale is enabled then at zoom=1, the frame buffer will be +automatically scaled to fit within the display window. With autoscale +disabled (the default), the image scale is more predictable, but the +image may be clipped by the display window, or may not fill the display +window. +.TP 5 +.B "Antialiasing" +When dezooming an image, i.e., displaying a large image in a smaller +display window, antialiasing causes all the data to be used to compute +the displayed image. If antialiasing is disabled then image is +subsampled to compute the displayed image. Antialiasing can prevent +subsampling from omitting image features that don't fall in the sample +grid, but it is significantly slower than dezooming via subsampling. +The default is no antialising. +.TP 5 +.B "Tile Frames" +The default display mode is to view one frame at a time. In tile frames +mode, 2 or 4 frames may be viewed simultaneously in the display window. +All the usual operations (zoom and pan, colortable enhancement, cursor +readback, etc.) still work for each frame even when in tile frames mode. +.TP 5 +.B "Warnings" +The warnings options toggles whether you see warning dialog boxes in +situations like overwriting an existing file, clearing the frame +buffer, etc. + +.SH "COLORMAP SELECTION" + +By default XImtool will display images using either a grayscale colormap (e.g. +if loaded by a client), or a private colormap when loading an image from disk +that contains a colormap. Each frame defines its own colormap so you can +define different colormaps or enhancements for each frame, they will change +automatically as you cycle through the frames. + +.SS "BUILTIN COLORMAPS" + +Once loaded, the colormap may either be changed using the builtin colormap +menu under the View menu button on the main window, or from the Enhancement +box on the control panel. XImtool has about a dozen colormap options +builtin, other user-defined colormaps may optionally be loaded. It is not +presently possible to save colormaps for later use. + +.SS "USER-DEFINED COLORMAPS" + +The \fIcmap[12]\fP and \fIcmapDir[12]\fP resources (or command line arguments) +are used to tell which specific colormaps to make available or where to look +for colortables respectively. The colortables are loaded when ximtool starts +up, or when it is reinitialized (e.g. by pressing the Initialize button in +the control panel). XImtool will ignore any files in the colormap directory +which do not look like colortables. New colortables will also be added +automatically for each image loaded from disk. + +The format of a user lookup table is very simple: each row defines one +colortable entry, and consists of three columns defining the red, green, and +blue values scaled to the range 0.0 (off) to 1.0 (full intensity). + + R G B + R G B + (etc.) + +Blank and comment lines (lines beginning with a '#') are ignored. + +Usually 256 rows are provided, but the number may actually be anything in +the range 1 to 256. XImtool will interpolate the table as necessary to +compute the colortable values used in XImtool. XImtool uses at most 201 +colors to render pixel data, so it is usually necessary to interpolate the +table when it is loaded. + +The name of the colortable as it will appear in the XImtool control panel is +the root name of the file, e.g., if the file is "rainbow.lut" the colortable +name will be "rainbow". Lower case names are suggested to avoid name +collisions with the builtin colortables. Private colormaps for disk images +will be have the same name as the image loaded. If the same colortable file +appears in multiple user colortable directories, the first one found will be +used. + +.SS "MINIMIZING COLORMAP CONFLICTS" + +The Gterm widget used by XImtool (i.e. the main display window) uses a private +global colormap for display, this allows it to have greater control over color +cell allocation but can occasionally also cause "colormap flashing" as the +mouse is moved in and out of the application. The problem here is that +in a system with only an 8-bit colormap (256 colors) all applications must +compete for colors, programs such as XV or Netscape allocate colors from the +default colormap leaving only a few free cells for XImtool. Since XImtool +defines a private global colormap it is still able to allocate the needed +cells rather than failing, but it's allocating cells already used by other +applications. As the mouse moves out of the ximtool window those cells are +once again defined in terms of the default colormap, so the ximtool window +is then using a different colormap. It is this switching of the colormap +context that causes the flashing to occur, but there are a few things that +can be done to help minimize this. + +XImtool logically defines 200 colors which the client image display program +can use to render pixels. However, ximtool may or may not actually allocate +all of those colors. By default it currently allocates only about 192 +colors, to reserve 64 colors for the other windows on the screen. You don't +normally notice this as 1) usually the default screen colormap has enough +free cells to allow ximtool to match the colors, and 2) the extra unallocated +cells correspond to the brightest pixels in the rendered image, and these +colors may not be used or usually only correspond to a few small regions +near the saturated cores of bright objects. + +You can eliminate this problem by setting the \fIbasePixel\fP resource to e.g. +48 instead of 64, which will let the gterm widget allocate all 200 colors. +However, this isn't recommended for normal use as it will increase the +likelihood of colormap flashing. If you change \fIbasePixel\fP, either restart +the X server or set the resource \fIcmapInitialize\fP=\fITrue\fP to force the +gterm widget to update its global colormap resource in the X server. +The colormap resource may also be deleted by using the command + + \fIxprop -root -remove GT_image\fP + +These options may also be set on the command line when first starting up. + +In general one can set the Gterm widget resources \fIbasePixel\fP +and \fImaxColors\fP to specify the region of colormap space to be used for +image display. If you set \fImaxColors\fP to a small value, the 200 logical +colors defined by the widget will be mapped by the imtool color model into +whatever number of colors are actually available to the widget. For example, +in the default setup, 200 color values are really being mapped into 192 color +cells used for display, the remaining colors are used for buttons, menus etc +and are allocated from the default colormap by the X toolkit when the +application starts up. + +Even though the Gterm widget uses a private colormap, it is a private +\fIglobal\fP colormap meaning that all Gterm widgets share the same colormap. +An example of colormap sharing in ximtool is the main image window and the +colorbar window. These are two separate gterm widgets that share the same +colormap. They have to share the same colormap, as otherwise when you +windowed the main image window the colorbar window would not accurately +reflect the modified colormap. By default two separate ximtools would also +share the same colormap meaning contrast enhancements in one window would +affect the other. By resetting the \fIcmapName\fP command line option or +resource you can change the name of the private colormap used causing +separate ximtools to use different colormaps, but note this also creates +colormap flashing between the two windows that cannot easily be avoided. +By setting the \fIcmapName\fR to "default" the widget will allocate colors +from the default colormap, but this is of little use at the moment. + +There are a number of other resources that can be used to modify the behavior +of the Gterm widget color management scheme, but these are the most useful ones. +For question and further information feel free to contact \fIiraf@noao.edu\fP. + +.SH "LOAD PANEL" + +The Load Panel allows you load images from disk directly to the frame +buffer, this is analogous to loading an image on the command line except +that browsing is possible. At present recognized formats include IRAF OIF +format (i.e. \fI.imh\fP extension), simple FITS files, GIF, and Sun rasterfiles. +The task will automatically sense the format of the image and load it +appropriately. Images with private colormaps (such as GIF) will be loaded +using the private colormap (meaning that changing the brightness/contrast +enhancements will render a random-colored image), all others will be loaded +with a grayscale colormap. If the \fIGrayscale\fP button is enabled the image +colormap will be converted to grayscale and loaded as the standard grayscale +colormap. The Load panel will close automatically once the image has loaded +unless the \fIBrowse\fP button has been set. + +When loading new images the frame buffer configuration table will +be searched for a frame buffer that is the same size or larger than the new +image size, if no frame buffer can be found a custom buffer exactly the size +of the image will be created. This means that the image may not fill the +display window when loaded, or you may see a subsection of the image in the +main display window. Setting the \fIautoscale\fP option will scale the entire +image to fit the main display window, the full frame buffer will always be +visible in the Panner marker window. + +Images with more colors than can be displayed will automatically be +quantized to the number of available colors before display, 24-bit formats +are not currently supported (but may be in the future and will be similarly +quantized). + +Formats which permit larger than 8-bit pixels will be sampled on a grid +to determine an optimal range in the data to be used to compute a linear +transformation to the number of display colors. This is the same sampling +and transformation used by the IRAF \fIDISPLAY\fR task when computing the +\fIz1/z2\fP values and provides a much better initial display than simple +truncation to 8-bits. +.TP 5 +.B "Directory Browsing" +The load panel contains a list of files in the current directory that +may be selected for loading by selecting with left mouse button. If the +file is a directory the contents of the new directory will be loaded, +if it's a plain file an attempt will be made to load it as an image +otherwise an error popup will appear. Directories in the list are identified +with a trailing '/' character, you will always see any subdirectories +listed even if a filter is specified. + +The \fIRoot\fP button will reset the current directory to the system root +directory. The \fIHome\fP button will reset the current directory to the +user's login directory, the \fIUp\fP button moves up one directory level, and +\fIRescan\fP reloads the file list by rescanning the directory. The current +working directory is given below the file selection window. +.TP 5 +.B "File Patterns" +By default all files and directories will be listed. You may specify a +filter to e.g. select only those files with a given extension like +"*.fits" to list only files with a ".fits" extension. Directories will +always be seen in the list and are identified with a trailing '/' +character. Any valid unix pattern matching string will be recognized. +.TP 5 +.B "Direct File Load" +If you know exactly which file you wish to load, you may enter its +name in the \fILoad File\fP text box and either hit <cr> or the Load button +to load it. An absolute or relative path name may be given, if a simple +filename is specified it will be searched for in the current working directory. +.TP 5 +.B "Frame Selections" +By default images will be loaded into frame number 1, you may select a +different frame using the Frame menu button to cycle through the available +frames. + +.SH "SAVE PANEL" + +The Save Panel lets you save the current contents of the main display window +to a disk file (including the Panner/Coords markers, any general graphics +markers, or overlay graphics displayed by the client program). Presently, +only the contents of the main display window may be saved, there is no +facility for saving the undisplayed contents of the entire frame buffer +other than to enable the autoscale feature. A limited number of formats are +currently available, others will be added in future versions. +.TP 5 +.B "File Name" +The File Name text box allows you to enter the file name of the saved +file. A "%d" anywhere in the name will be replaced by a sequence number +allowing multiple frames to be saved with unique names. +.TP 5 +.B "Format" +The Format box allows you to choose the format of the image to be +created. Not all formats are currently implemented. +.TP 5 +.B "Color" +The Color box lets you choose the color type of the image to be +created. The options will change depending on the format, e.g. FITS +doesn't allow color so no color options will be allowed. Formats which +allow 24-bit images will be written using the current colormap after +converting to a 24-bit image, pseudocolor images will be written with +the current colormap. + +.SH "PRINT PANEL" + +The Print Panel allows you dump the contents of the main display window as +Encapsulated Postscript to either a named printer device or to a disk file. +The \fIPrint To\fP selects the type of output, the \fIPrint Command\fP box +will adjust accordingly, either as a Unix printer command or as a file name. +A "%d" anywhere in the name for disk output will be replaced by a sequence +number allowing multiple frames to be saved with unique names. Selecting +printers from the installed list will automatically change the command to be +used to generate the output. This command does not necessarily need to be a +printer command, the printer configuration file lets you define any command +string to process the image. + +.SS "COLOR OPTIONS" + +The Color box lets you choose the color type of the image to be created. +PseudoColor or 24-bit postscript will be created using the current colormap +and enhancements. + +.SS "POSTSCRIPT OPTIONS" + +.TP 5 +.B "Orientation" +Set the page orientation. +.TP 5 +.B "Paper Size" +Select the paper size to be used. +.TP 5 +.B "Image Scale" +Set the scale factor used to compute the final image size. No checking is +done to make sure the image will fit correctly on the page. + +.SS "PROCESSING OPTIONS" +.TP 5 +.B "Auto Scale" +Toggles whether or not the image is automatically scaled +to fit the page. If not enabled, the image scale will be used to +determine the output image size, otherwise the image will be scaled down +(if necessary) to fit on the page. +.TP 5 +.B "Auto Rotate" +Determines whether or not the image will be rotated to fit +on the page. When set, an image larger than the current orientation +will be rotated and possibly scaled to fit the page, otherwise the image +may be scaled so that it fits in the current orientation. +.TP 5 +.B "Max Aspect" +Automatically increases the scale so the image fills the page in the current +orientation. +.TP 5 +.B "Annotate" +The annotate option toggles whether or not the final file includes +annotation such as the image title, a colorbar, and axis labels. There is +currently no option for partial annotation. + +.SS "PRINTER SELECTION" + +The printer selection list lets choose the printer to be used. The printer +configuration file is /usr/local/lib/ximprint.cfg by default or may be reset +using the \fI-printConfig\fP command line switch or \fIprintConfig\fP +resource. The format of the file is simply + + \fIname\\tcommand\fP + +The \fIname\fP value is what appears in the selection list and may be more +than a single word, the \fIcommand\fP can be any command that accepts EPS +input from a pipe, the two fields must be separated by a tab character. +Normally the command +will be a simple \fIlpr -Pfoo\fP or some such, but can also include converters +or previewers. At most 128 printer commands may be used. + +.SS "ANNOTATION OPTIONS" + +.TP 5 +.B "Annotate" +Selects whether Postscript image is to be annotated. +.B "Title" +Annotate with a title on the top of the image. +.B "Borders" +Annotate with borders surrounding the image giving image coordinates. +.B "Colorbar" +Annotate with colorbar at the bottom of the image +.B "Title String" +Title string to use when \fItitle\fR is selected. The special value +\fIimtitle\fR will force the title to be the currently displayed image title, +otherwise it will be this user-selected field. + + +.SH "INFO PANEL" + +The information panel is underused at present but is meant to provide basic +information about the frame being displayed. It is updated to be current +while changing enhancements, pan/zoom regions, or frame selection. In cases +where the image title string is truncated in the main display window, the +user can always pop up the info window to see the full title. + +.SH "TCLSHELL" + +The \fITclShell\fP allows the user to type commands directly to the TCL +interpreter, letting you send messages to the object manager or execute +specific procedures in the TCL code that makes up the GUI. It is used as a +development or debugging tool for the GUI, but for an example of what it +does, bring it up and type a command such as + + \fIsend helpButton set background red\fP + + +.SH ENVIRONMENT +DISPLAY specifies which display terminal to use +.br +IMTOOLRC frame buffer configuration file +.br +imtoolrc frame buffer configuration file (alternative) + +.SH FILES +/usr/local/lib/imtoolrc default frame buffer configuration file +.br +/usr/local/lib/ximprint.cfg default printer configuration file +.br +/usr/local/lib/imtoolcmap default colormap directory +.br +/dev/imt1i default input fifo +.br +/dev/imt1o default output fifo +.br +/tmp/.IMT%d default unix socket + +.SH BUGS + +.SH SEE ALSO +xgterm(1), xtapemon(1) + +.SH COPYRIGHT +Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. diff --git a/vendor/x11iraf/ximtool/OLD/ximtool-mag.ps b/vendor/x11iraf/ximtool/OLD/ximtool-mag.ps new file mode 100644 index 00000000..aa974a41 --- /dev/null +++ b/vendor/x11iraf/ximtool/OLD/ximtool-mag.ps @@ -0,0 +1,10025 @@ +%!PS-Adobe-1.0 +%%Creator: devps (Pipeline Associates, Inc.) +%%CreationDate: Wed Sep 10 10:17:53 1997 +%%Pages: (atend) +%%DocumentFonts: (atend) + +/X{exch}def +/r{rmoveto}def +/m{moveto}def +/l{lineto}def +/rl{rlineto}def +/lc{yc X xc X l st}def +/mc{yc X xc X m}def +/el{gs /a X def a div 1 X scale cp np a xc 2 div 0 360 arc st gr}def +/ar{cp 7 2 roll np xc 5 1 roll atan 3 1 roll atan X arc st}def +/sp{yc X xc X 6 2 roll yc X xc X 6 2 roll yc X xc X 6 2 roll ct}def +/st{stroke}def +/gs{gsave}def +/gr{grestore}def +/cp{currentpoint}def +/np{newpath}def +/ct{curveto}def +/m0{0 0 moveto}def +/BP{/devps-save save def m0}def +/EP{ +clear devps-save restore +showpage}def +/res 10.000000 def +/V{res neg div 792 add +currentpoint pop X +m}def +/H{res div +currentpoint X pop +moveto}def +/h{res div 0 r}def +/v{res neg div 0 X r}def +/xc{res div}def +/yc{res neg div 792 add}def +/S{X H show}def +/psize 10 def +/height 1 def +/slant 0 def +/FF{findfont X dup 12 div setlinewidth /psize X def + [psize 0 psize height mul slant sin slant cos div mul psize height mul 0 0] + makefont setfont}def +/shade{gs + /dy X def + /dx X def + np m + setgray + 0 dy rl + dx 0 rl + 0 dy neg rl + dx neg 0 rl + closepath + fill +gr}def +1 setlinecap +/R{/Times-Roman FF}def +/B{/Times-Bold FF}def +/I{/Times-Italic FF}def +/Y{/Symbol FF}def +%%EndProlog +%%Page: 1 1 +BP +/slant 0 def +/height 1.000000 def +10 R +10 R +480 V +900(XIMTOOL)S +1376(\()S +1425(1)S +1491(\))S +2787(USER COMMANDS )S +4956(XIMTOOL)S +5432(\()S +5481(1)S +5547(\))S +960 V +9 B +900(NAME)S +1080 V +10 R +1260(ximtool-mag)S +1807(\261)S +1887(interactive)S +2338(image)S +2612(display)S +2931(program)S +3299(for)S +3445(the)S +3597(X)S +3699(Window)S +4073(System)S +4398(with)S +4606(experimental)S +5157(GUI)S +1248 V +9 B +900(SYNOPSIS)S +1368 V +10 B +1260(ximtool-mag)S +1828([\261)S +10 I +1911(toolkitoption)S +10 B +2453(...])S +2591([)S +10 I +2654(options)S +10 B +2979(...])S +1536 V +9 B +900(OPTIONS)S +1656 V +10 B +1260(-basePixel)S +10 I +1723(N)S +1776 V +10 R +1510(The)S +1709(base)S +1930(colormap)S +2351(cell)S +2539(used)S +2766(by)S +2910(the)S +3076(colormap.)S +3552(This)S +3774(essentially)S +4240(allows)S +4545(you)S +4739(to)S +4861(reserve)S +10 I +5192(basePixel)S +1896 V +10 R +1510(colors)S +1793(in)S +1910(the)S +2071(global)S +2360(colormap)S +2776(for)S +2931(other)S +3175(applications.)S +3752(The)S +3946(default)S +4262(is)S +4367(64,)S +4530(if)S +4629(changed)S +4999(you'll)S +5276(need)S +5502(to)S +2016 V +1510(also)S +1701(specify)S +2019(the)S +10 I +2171(-cmapInitialize)S +10 R +2806(option)S +3092(or)S +3205(resource.)S +2184 V +10 B +1260(-cmap1)S +10 I +1606(\256le)S +2304 V +10 R +1510(User)S +1728(colormap)S +2135(1.)S +2270(This)S +2478(\257ag)S +2658(allows)S +2949(you)S +3129(to)S +3237(specify)S +3555(a)S +3629(colormap)S +4036(to)S +4144(be)S +4268(made)S +4514(available)S +4904(at)S +5006(task)S +5197(startup.)S +2472 V +10 B +1260(-cmap2)S +10 I +1606(\256le)S +2592 V +10 R +1510(User)S +1734(colormap)S +2147(2.)S +2288(This)S +2502(\257ag)S +2688(allows)S +2985(you)S +3171(to)S +3285(specify)S +3609(a)S +3689(second)S +4002(colormap)S +4415(to)S +4529(be)S +4660(made)S +4913(available)S +5310(at)S +5419(task)S +2712 V +1510(startup.)S +2880 V +10 B +1260(-cmapDir1)S +10 I +1750(dir)S +3000 V +10 R +1510(User)S +1728(colormap)S +2135(directory)S +2525(1.)S +2660(Speci\256es)S +3051(a)S +3125(directory)S +3515(to)S +3623(be)S +3747(searched)S +4125(for)S +4271(colormaps.)S +3168 V +10 B +1260(-cmapDir2)S +10 I +1750(dir)S +3288 V +10 R +1510(User)S +1742(colormap)S +2164(directory)S +2569(2.)S +2719(Speci\256es)S +3125(a)S +3214(directory)S +3619(to)S +3742(be)S +3881(searched)S +4274(for)S +4435(colormaps.)S +4951(By)S +5113(default)S +5435(this)S +3408 V +1510(points)S +1790(to)S +1903(the)S +2060(system)S +2373(directory)S +2768(/usr/local/lib/imtoolcmap,)S +3840(allowing)S +4225(a)S +4304(set)S +4450(of)S +4568(site)S +4741(default)S +5052(colormaps)S +5502(to)S +3528 V +1510(be)S +1634(de\256ned)S +1958(here.)S +3696 V +10 B +1260(-cmapInitialize)S +10 I +1934(bool)S +3816 V +10 R +1510(Initialize)S +1908(the)S +2073(ximtool)S +2428(colormap)S +2848(at)S +2963(startup.)S +3333(When)S +3614(setting)S +3924(the)S +10 I +4089(basePixel)S +10 R +4520(option)S +4819(or)S +4945(resource)S +5325(this)S +5513(is)S +3936 V +1510(required)S +1876(in)S +1988(order)S +2232(to)S +2344(force)S +2582(the)S +2738(Gterm)S +3027(widget)S +3333(to)S +3445(update)S +3745(its)S +3874(global)S +4158(colormap)S +4569(resource)S +4940(in)S +5052(the)S +5207(X)S +5312(server.)S +4056 V +1510(The)S +1695(default)S +2002(is)S +10 I +2099(false)S +10 R +2288(.)S +4224 V +10 B +1260(-cmapName)S +10 I +1805(name)S +4344 V +10 R +1510(Name)S +1784(used)S +2003(for)S +2156(private)S +2470(colormap.)S +2939(The)S +3131(default)S +3445(for)S +3598(all)S +3735(IRAF)S +4000(imaging)S +4365(applications)S +4885(is)S +10 I +4989(image)S +10 R +5233(.)S +5325(Gterm)S +4464 V +1510(widget)S +1822(based)S +2089(imaging)S +2457(applications)S +2980(which)S +3264(have)S +3492(the)S +3654(same)S +3899(value)S +4155(of)S +4277(cmapName)S +4770(will)S +4965(share)S +5214(the)S +5375(same)S +4584 V +1510(colormap,)S +1950(minimizing)S +2450(colormap)S +2865(\257ashing)S +3220(and)S +3402(allowing)S +3790(multiple)S +4162(applications)S +4683(to)S +4799(be)S +4931(run)S +5103(at)S +5214(the)S +5375(same)S +4704 V +1510(time.)S +4872 V +10 B +1260(-con\256g)S +10 I +1579(N)S +4992 V +10 R +1510(Initial)S +1799(frame)S +2081(bu)S +2181 H + (f)show 10 -.5 mul h (f)show +10 R +2242(er)S +2369(con\256guration)S +2952(number.)S +3362(The)S +3567(default)S +3894(value)S +4160(is)S +4277(1,)S +4402(indicating)S +4852(a)S +4947(512x512)S +5348(frame)S +5112 V +1510(bu)S +1610 H + (f)show 10 -.5 mul h (f)show +10 R +1671(er)S +1778(with)S +1986(2)S +2066(frames.)S +2422(See)S +2596(below)S +2870(for)S +3016(information)S +3518(on)S +3648(the)S +3800(frame)S +4062(bu)S +4162 H + (f)show 10 -.5 mul h (f)show +10 R +4223(ers.)S +5280 V +10 B +1260(-defgui)S +5400 V +10 R +1510(Print)S +1737(the)S +1892(default)S +2202(GUI)S +2412(to)S +2523(the)S +2678(stdout.)S +3011(The)S +3199(GUI)S +3409(is)S +3509(a)S +3586(Tcl)S +3752(program)S +4123(that)S +4306(may)S +4511(be)S +4638(customized)S +5126(by)S +5259(the)S +5414(user)S +5520 V +1510(and)S +1684(reloaded)S +2057(using)S +2304(the)S +10 I +2456(-gui)S +10 R +2647(option)S +2933(or)S +3046(the)S +10 I +3198(gui)S +10 R +3356(resource)S +3723(parameter.)S +5688 V +10 B +1260(-displayPanner)S +10 I +1941(bool)S +5808 V +10 R +1510(Display)S +1859(panner)S +2168(marker)S +2488(window)S +2848(at)S +2958(startup.)S +3323(If)S +3427(set,)S +3601(a)S +3683(panner)S +3993(window)S +4354(showing)S +4732(the)S +4893(full)S +5071(frame)S +5342(bu)S +5442 H + (f)show 10 -.5 mul h (f)show +10 R +5503(er)S +5928 V +1510(will)S +1696(appear)S +1991(in)S +2099(the)S +2251(upper-right)S +2730(side)S +2921(of)S +3034(the)S +3186(main)S +3416(display)S +3735(window.)S +6096 V +10 B +1260(-displayMagni\256er)S +10 I +2052(bool)S +6216 V +10 R +1510(Display)S +1852(magni\256er)S +2266(marker)S +2579(window)S +2932(at)S +3035(startup.)S +3393(If)S +3490(set,)S +3657(a)S +3733(magni\256er)S +4148(window)S +4502(showing)S +4873(a)S +4949(zoomed)S +5297(section)S +6336 V +1510(around)S +1817(the)S +1969(cursor)S +2248(will)S +2434(appear)S +2729(in)S +2837(the)S +2989(upper-left)S +3412(side)S +3603(of)S +3716(the)S +3868(mail)S +4076(display)S +4395(window.)S +6504 V +10 B +1260(-displayCoords)S +10 I +1941(bool)S +6624 V +10 R +1510(Display)S +1855(WCS)S +2106(coordinate)S +2561(marker)S +2877(window)S +3233(at)S +3339(startup.)S +3700(If)S +3800(set,)S +3970(a)S +4048(coordinate)S +4503(readout)S +4836(text)S +5020(marker)S +5336(show-)S +6744 V +1510(ing)S +1668(will)S +1854(appear)S +2149(in)S +2257(the)S +2409(lower-right)S +2888(side)S +3079(of)S +3192(the)S +3344(main)S +3574(display)S +3893(window.)S +6912 V +10 B +1260(-\256fo)S +10 I +1462(pipe)S +7032 V +10 R +1510(Speci\256es)S +1901(the)S +2053(name)S +2299(of)S +2412(the)S +2564(\256fo)S +2733(pipe)S +2936(to)S +3045(be)S +3170(used,)S +3409(the)S +10 I +3562(i)S +10 R +3621(and)S +10 I +3796(o)S +10 R +3877(su)S +3966 H + (f)show 10 -.5 mul h (\256)show +10 R +4050(xes)S +4214(will)S +4401(be)S +4526(added)S +4795(automatically.)S +5425(The)S +7152 V +1510(default)S +1817(pipe)S +2019(names)S +2304(will)S +2490(be)S +2614(/dev/imt1i)S +3056(\(input)S +3325(pipe\))S +3560(and)S +3734(/dev/imt1o)S +4198(\(output)S +4517(pipe\).)S +7680 V +900(X11IRAF Project)S +2709(Last change: 10 Dec 1996)S +5530(1)S +7920 V +EP +%%Page: 2 2 +BP +/slant 0 def +/height 1.000000 def +10 R +10 R +480 V +900(XIMTOOL)S +1376(\()S +1425(1)S +1491(\))S +2787(USER COMMANDS )S +4956(XIMTOOL)S +5432(\()S +5481(1)S +5547(\))S +960 V +10 B +1260(-\256fo_only)S +1080 V +10 R +1510(If)S +1615(set,)S +1790(only)S +2007(\256fo)S +2185(pipes)S +2435(will)S +2630(be)S +2763(used)S +2985(for)S +3140(communication)S +3801(with)S +4018(a)S +4101(client)S +4363(program,)S +4766(sockets)S +5100(will)S +5296(be)S +5430(dis-)S +1200 V +1510(abled.)S +1368 V +10 B +1260(-gui)S +10 I +1457(\256le)S +1488 V +10 R +1510(Speci\256es)S +1901(the)S +2053(GUI)S +2260(\256le)S +2418(to)S +2526(be)S +2650(used.)S +1656 V +10 B +1260(-help)S +10 R +1510(Print)S +1735(a)S +1809(summary)S +2211(of)S +2324(command)S +2748(line)S +2928(options)S +3253(to)S +3361(the)S +3513(screen.)S +1824 V +10 B +1260(-imtoolrc)S +10 I +1683(\256le)S +1944 V +10 R +1510(Speci\256es)S +1923(the)S +2097(frame)S +2381(bu)S +2481 H + (f)show 10 -.5 mul h (f)show +10 R +2542(er)S +2671(con\256guration)S +3257(\256le)S +3438(to)S +3569(be)S +3716(used.)S +4007(See)S +4204(below)S +4501(for)S +4670(information)S +5195(on)S +5348(frame)S +2064 V +1510(bu)S +1610 H + (f)show 10 -.5 mul h (f)show +10 R +1671(ers.)S +2232 V +10 B +1260(-inet_only)S +2352 V +10 R +1510(If)S +1611(set,)S +1782(only)S +1995(inet)S +2180(sockets)S +2509(will)S +2700(be)S +2829(used)S +3047(for)S +3198(communication)S +3855(with)S +4068(a)S +4147(client)S +4404(program,)S +4802(\256fo)S +4976(pipes)S +5222(and)S +5402(unix)S +2472 V +1510(sockets)S +1834(will)S +2020(be)S +2144(disabled.)S +2640 V +10 B +1260(-invert)S +2760 V +10 R +1510(Start)S +1748(XImtool)S +2136(using)S +2402(inverted)S +2778(colormaps.)S +3298(When)S +3585(set,)S +3770(a)S +3863("normalized")S +4443(display)S +4781(will)S +4987(always)S +5314(be)S +5458(the)S +2880 V +1510(inverse)S +1828(of)S +1941(the)S +2093(selected)S +2444(colormap.)S +3048 V +10 B +1260(-maxColors)S +10 I +1789(N)S +3168 V +10 R +1510(Specify)S +1845(the)S +1997(max)S +2199(number)S +2534(of)S +2647(colors)S +2921(to)S +3029(be)S +3153(used)S +3366(for)S +3512(the)S +3664(display.)S +3336 V +10 B +1260(-memModel)S +10 I +1805(type)S +3456 V +10 R +1510(Determines)S +2003(how)S +2208(ximtool)S +2553(uses)S +2758(memory)S +3125(in)S +3237(the)S +3393(ximtool)S +3739(client)S +3995(and)S +4173(the)S +4329(X)S +4435(server.)S +4737(The)S +4926(options)S +5255(are)S +10 I +5410(fast)S +10 R +5555(,)S +3576 V +10 I +1510(beNiceToServer)S +10 R +2153(,)S +2220(and)S +10 I +2406(small)S +10 R +2623(.)S +2720(The)S +2917(default)S +3236(is)S +10 I +3345(fast)S +10 R +3490(,)S +3557(which)S +3843(uses)S +4057(server)S +4342(pixmaps)S +4723(to)S +4843(make)S +5101(frame)S +5374(blink)S +3696 V +1510(fast.)S +1742(This)S +1953(is)S +2053(recommended)S +2651(unless)S +2934(server)S +3210(memory)S +3576(is)S +3676(very)S +3886(limited.)S +4258(Note)S +4485(that)S +4668(even)S +4889(in)S +5000(fast)S +5177(mode,)S +5458(the)S +3816 V +1510(server)S +1792(pixmap)S +2131(is)S +2237(only)S +2454(the)S +2615(size)S +2808(of)S +2929(the)S +3089(display)S +3416(window,)S +3801(so)S +3928(memory)S +4299(usage)S +4564(is)S +4669(reasonable)S +5133(even)S +5359(if)S +5458(the)S +3936 V +1510(frame)S +1772(bu)S +1872 H + (f)show 10 -.5 mul h (f)show +10 R +1933(er)S +2040(is)S +2137(very)S +2344(large.)S +4104 V +10 B +1260(-nframes)S +10 I +1672(N)S +4224 V +10 R +1510(Speci\256es)S +1913(the)S +2077(number)S +2424(of)S +2549(frame)S +2823(bu)S +2923 H + (f)show 10 -.5 mul h (f)show +10 R +2984(ers)S +3142(to)S +3262(con\256gure)S +3681(at)S +3795(startup.)S +4164(By)S +4323(default)S +4642(there)S +4883(will)S +5081(be)S +5217(2)S +5309(frames)S +4344 V +1510(available,)S +1925(a)S +1999(maximum)S +2435(of)S +2548(4)S +2628(frames)S +2929(are)S +3080(allowed.)S +4512 V +10 B +1260(-port)S +10 I +1506(N)S +4632 V +10 R +1510(Speci\256es)S +1901(the)S +2053(port)S +2244(number)S +2579(to)S +2687(use)S +2850(when)S +3096(connecting)S +3564(through)S +3905(an)S +4029(inet)S +4209(socket.)S +4800 V +10 B +1260(-port_only)S +4920 V +10 R +1510(Same)S +1770(as)S +10 I +1891(-inet_only)S +10 R +2334(option.)S +2683(If)S +2787(set,)S +2961(only)S +3177(inet)S +3365(sockets)S +3697(will)S +3891(be)S +4023(used)S +4244(for)S +4398(communication)S +5058(with)S +5275(a)S +5358(client)S +5040 V +1510(program.)S +5208 V +10 B +1260(-printCon\256g)S +10 I +1824(name)S +5328 V +10 R +1510(Speci\256es)S +1916(the)S +2083(printer)S +2394(con\256guration)S +2973(\256le)S +3147(to)S +3271(use.)S +3505(By)S +3668(default)S +3991(this)S +4182(will)S +4384(be)S +4524(/usr/local/lib/ximprint.cfg.)S +5448 V +1510(See)S +1684(below)S +1958(for)S +2104(more)S +2339(information)S +2841(on)S +2971(con\256guring)S +3462(output)S +3748(devices.)S +5616 V +10 B +1260(-tile)S +10 R +1510(The)S +1695(default)S +2002(display)S +2321(mode)S +2573(is)S +2670(to)S +2778(view)S +3002(one)S +3177(frame)S +3440(at)S +3543(a)S +3618(time.)S +3852(In)S +3966(tile)S +4125(frames)S +4427(mode,)S +4705(2)S +4786(or)S +4900(4)S +4981(frames)S +5283(may)S +5486(be)S +5736 V +1510(viewed)S +1834(simultaneously)S +2476(in)S +2590(the)S +2748(display)S +3073(window.)S +3486(All)S +3650(the)S +3808(usual)S +4055(operations)S +4507(\(zoom)S +4798(and)S +4977(pan,)S +5181(colortable)S +5856 V +1510(enhancement,)S +2091(cursor)S +2370(readback,)S +2784(etc.\))S +3018(still)S +3199(work)S +3434(for)S +3580(each)S +3792(frame)S +4054(even)S +4272(when)S +4518(in)S +4626(tile)S +4784(frames)S +5085(mode.)S +6024 V +10 B +1260(-unix)S +10 I +1513(name)S +6144 V +10 R +1510(Speci\256es)S +1909(the)S +2069(unix)S +2285(domain)S +2623(socket)S +2916(name)S +3170(to)S +3286(use.)S +3512(A)S +3622("%d")S +3876(in)S +3993(the)S +4154(\256lename)S +4537(will)S +4732(be)S +4865(replaced)S +5241(with)S +5458(the)S +6264 V +1510(user)S +1706(id.)S +6432 V +10 B +1260(-unix_only)S +6552 V +10 R +1510(If)S +1607(set,)S +1774(only)S +1983(unix)S +2192(domain)S +2523(sockets)S +2848(will)S +3035(be)S +3160(used)S +3374(for)S +3521(communication)S +4174(with)S +4383(a)S +4458(client)S +4711(program,)S +5105(inet)S +5286(sockets)S +6672 V +1510(and)S +1684(\256fos)S +1892(will)S +2078(be)S +2202(disabled.)S +6960 V +9 B +900(RESOURCES)S +7080 V +10 R +1260(XImtool)S +1629(is)S +1726(implemented)S +2278(as)S +2391(a)S +2465(client)S +2717(program)S +3085(which)S +3359(is)S +3456(responsible)S +3941(for)S +4087(loading)S +4418(the)S +4571(frame)S +4834(bu)S +4934 H + (f)show 10 -.5 mul h (f)show +10 R +4995(ers/colormaps,)S +7200 V +1260(communicating)S +1917(with)S +2130(clients,)S +2451(etc,)S +2627(and)S +2806(a)S +2885(user-modi\256able)S +3547(GUI)S +3759(\256le)S +3922(written)S +4240(as)S +4358(a)S +4437(Tcl)S +4605(script)S +4862(which)S +5141(handles)S +5480(all)S +7680 V +900(X11IRAF Project)S +2709(Last change: 10 Dec 1996)S +5530(2)S +7920 V +EP +%%Page: 3 3 +BP +/slant 0 def +/height 1.000000 def +10 R +10 R +480 V +900(XIMTOOL)S +1376(\()S +1425(1)S +1491(\))S +2787(USER COMMANDS )S +4956(XIMTOOL)S +5432(\()S +5481(1)S +5547(\))S +960 V +1260(the)S +1412(user)S +1608(interface)S +1986(details.)S +2332(The)S +10 I +2517(client)S +2770(resources)S +10 R +3189(described)S +3602(below)S +3877(will)S +4064(be)S +4189(common)S +4570(to)S +4679(any)S +4854(user-de\256ned)S +5378(GUI,)S +1080 V +1260(the)S +10 I +1426(gui)S +1598(resources)S +10 R +2030(may)S +2246(change)S +2572(depending)S +3032(on)S +3176(how)S +3392(extensively)S +3890(the)S +4055(GUI)S +4275(has)S +4451(been)S +4682(modi\256ed)S +5081(by)S +5224(the)S +5389(user.)S +1200 V +1260(Each)S +1495(of)S +1615(these)S +1857(components)S +2377(has)S +2547(its)S +2679(own)S +2888(set)S +3036(of)S +3156(resources,)S +3594(but)S +3759(to)S +3874(the)S +4033(user)S +4236(setting)S +4540(them)S +4777(is)S +4881(the)S +5040(same)S +5282(as)S +5402(with)S +1320 V +1260(any)S +1434(other)S +1669(application.)S +1560 V +10 I +1260(Gterm)S +10 R +1548(widget)S +1853(resources)S +2262(\(i.e.)S +2450(those)S +2694(for)S +2844(the)S +3000(main)S +3234(image)S +3512(window)S +3868(or)S +3985(colorbar\))S +4384(may)S +4590(be)S +4718(set)S +4863(as)S +4980(either)S +5241(client)S +5497(or)S +1680 V +1260(GUI)S +1467(resources.)S +1928(See)S +2102(the)S +10 I +2254(xgterm\(1\))S +10 R +2677(man)S +2879(page)S +3097(for)S +3243(a)S +3317(complete)S +3713(description)S +4187(of)S +10 I +4300(Gterm)S +10 R +4585(widget)S +4887(resources.)S +1968 V +9 B +1080(CLIENT)S +1452(RESOURCES)S +2088 V +10 R +1260(The)S +1445(client)S +1697(resources)S +2103(generally)S +2504(de\256ne)S +2778(the)S +2930(initial)S +3194(state)S +3407(of)S +3520(the)S +3672(application)S +4146(or)S +4259(set)S +4400(con\256guration)S +4963(parameters.)S +2256 V +10 B +1620(Resource)S +2043(Name)S +2870(Default)S +3216(Value)S +2364 V +10 R +1620(defCon\256g)S +2870(1)S +2472 V +1620(defNFrames)S +2870(0)S +2580 V +1620(tileBorderWidth)S +2870(3)S +2688 V +1620(tileBorderColor)S +2870(9)S +2796 V +1620(autoscale)S +2870(false)S +2904 V +1620(antialias)S +2870(false)S +3012 V +1620(antialiasType)S +2870(boxcar)S +3120 V +1620(tileFrames)S +2870(false)S +3228 V +1620(highlightFrames)S +2870(true)S +3336 V +1620(gui)S +2870(default)S +3444 V +1620(imtoolrc)S +2870(/usr/local/lib/imtoolrc)S +3552 V +1620(invert)S +2870(false)S +3660 V +1620(memModel)S +2870(fast)S +3768 V +1620(basePixel:)S +2870(64)S +3876 V +1620(maxColors:)S +2870(216)S +3984 V +1620(cmapInitialize:)S +2870(false)S +4092 V +1620(cmap1)S +2870(none)S +4200 V +1620(cmap2)S +2870(none)S +4308 V +1620(cmapDir1)S +2870(none)S +4416 V +1620(cmapDir2)S +2870(/usr/local/lib/imtoolcmap)S +4524 V +1620(input_\256fo)S +2870(/dev/imt1i)S +4632 V +1620(output_\256fo)S +2870(/dev/imt1o)S +4740 V +1620(unixaddr)S +2870(/tmp/.IMT%d)S +4848 V +1620(port)S +2870(5137)S +5016 V +1260(Description)S +1756(of)S +1869(ximtool)S +2211(client)S +2463(resources:)S +5304 V +10 B +1260(defCon\256g)S +10 R +2160(Default)S +2499(frame)S +2772(bu)S +2872 H + (f)show 10 -.5 mul h (f)show +10 R +2933(er)S +3051(con\256guration)S +3625(number)S +3971(on)S +4112(startup.)S +4480(See)S +4665(below)S +4950(for)S +5107(more)S +5353(infor-)S +5424 V +2160(mation)S +2468(on)S +2598(frame)S +2860(bu)S +2960 H + (f)show 10 -.5 mul h (f)show +10 R +3021(ers.)S +5592 V +10 B +1260(defNFrames)S +10 R +2160(Default)S +2496(number)S +2838(of)S +2958(frames)S +3266(on)S +3403(startup.)S +3767(Set)S +3932(to)S +4047(zero)S +4255(to)S +4371(use)S +4542(the)S +4702(value)S +4956(from)S +5188(the)S +5348(frame)S +5712 V +2160(bu)S +2260 H + (f)show 10 -.5 mul h (f)show +10 R +2321(er)S +2428(con\256guration)S +2991(\()S +10 I +3024(imtoolrc)S +10 R +3363(\))S +3426(\256le.)S +5880 V +10 B +1260(tileBorderWidth)S +5988 V +1260(tileBorderColor)S +10 R +2160(Used)S +2401(by)S +2537(the)S +2695(tile)S +2859(frames)S +3166(option.)S +3513(Speci\256es)S +3910(how)S +4118(far)S +4264(apart)S +4499(to)S +4613(space)S +4870(the)S +5029(frames)S +5337(in)S +5452(tile)S +6108 V +2160(frames)S +2484(mode.)S +2814(Color)S +3095("9")S +3280(refers)S +3559(to)S +3690(the)S +3865(Gterm)S +4172(widget)S +4496(resource)S +4885(color9,)S +5217(which)S +5513(is)S +6228 V +2160(assigned)S +2534(a)S +2608(color)S +2843(with)S +3051(its)S +3176(own)S +3378(resource.)S +6396 V +10 B +1260(autoscale)S +10 R +2160(Enable/disable)S +2778(the)S +2930(autoscale)S +3331(option.)S +6564 V +10 B +1260(antialias)S +10 R +2160(Enable/disable)S +2778(the)S +2930(antialias)S +3293(option.)S +6732 V +10 B +1260(antialiasType)S +10 R +2160(Type)S +2395(of)S +2508(antialiasing.)S +6900 V +10 B +1260(tileFrames)S +10 R +2160(Enable/disable)S +2778(the)S +2930(tile)S +3088(frames)S +3389(option.)S +7068 V +10 B +1260(highlightFrames)S +10 R +2160(Determines)S +2650(whether)S +3001(the)S +3153(current)S +3465(frame)S +3727(is)S +3824(highlighted)S +4310(when)S +4556(in)S +4664(tile)S +4822(frames)S +5123(mode.)S +7236 V +10 B +1260(gui)S +10 R +2160(The)S +2349(GUI)S +2560(to)S +2672(be)S +2800(executed.)S +3243("default")S +3636(refers)S +3896(to)S +4008(the)S +4164(default,)S +4500(builtin)S +4796(ximtool)S +5142(GUI.)S +5408(You)S +7716 V +900(X11IRAF Project)S +2709(Last change: 10 Dec 1996)S +5530(3)S +7920 V +EP +%%Page: 4 4 +BP +/slant 0 def +/height 1.000000 def +10 R +10 R +480 V +900(XIMTOOL)S +1376(\()S +1425(1)S +1491(\))S +2787(USER COMMANDS )S +4956(XIMTOOL)S +5432(\()S +5481(1)S +5547(\))S +960 V +2160(can)S +2341(replace)S +2671(this)S +2859(with)S +3080(your)S +3306(own)S +3521(GUI)S +3741(\256le)S +3911(if)S +4014(you)S +4206(are)S +4369(bold)S +4589(enough,)S +4950(and)S +5136(completely)S +1080 V +2160(change)S +2472(the)S +2624(look)S +2832(and)S +3006(functionality)S +3547(of)S +3660(the)S +3812(GUI)S +4019(if)S +4110(desired.)S +1248 V +10 B +1260(imtoolrc)S +10 R +2160(Where)S +2496(to)S +2645(\256nd)S +2872(the)S +3065(imtoolrc)S +3475(\256le.)S +3730(This)S +3980(de\256nes)S +4335(the)S +4529(recognized)S +5038(frame)S +5342(bu)S +5442 H + (f)show 10 -.5 mul h (f)show +10 R +5503(er)S +1368 V +2160(con\256gurations.)S +1536 V +10 B +1260(invert)S +10 R +2160(Start)S +2388(Ximtool)S +2761(using)S +3017(an)S +3150(inverted)S +3516(colormap.)S +3987(When)S +4264(set,)S +4440(a)S +4524("normalized")S +5095(display)S +5424(will)S +1656 V +2160(always)S +2467(be)S +2591(the)S +2743(inverse)S +3061(of)S +3174(the)S +3326(selected)S +3677(colormap.)S +1824 V +10 B +1260(memModel)S +10 R +2160(Determines)S +2656(how)S +2864(ximtool)S +3212(uses)S +3420(memory)S +3789(in)S +3904(the)S +4063(ximtool)S +4412(client)S +4671(and)S +4852(the)S +5011(X)S +5120(server.)S +5425(The)S +1944 V +2160(options)S +2493(are)S +2652("fast",)S +2941("beNiceToServer",)S +3739(and)S +3920("small".)S +4311(The)S +4503(default)S +4817(is)S +4921(fast,)S +5127(which)S +5408(uses)S +2064 V +2160(server)S +2457(pixmaps)S +2851(to)S +2984(make)S +3255(frame)S +3542(blink)S +3803(fast.)S +4057(This)S +4290(is)S +4412(recommended)S +5032(unless)S +5337(server)S +2184 V +2160(memory)S +2525(is)S +2624(very)S +2833(limited.)S +3204(Note)S +3430(that)S +3612(even)S +3831(in)S +3940(fast)S +4115(mode,)S +4393(the)S +4546(server)S +4820(pixmap)S +5151(is)S +5249(only)S +5458(the)S +2304 V +2160(size)S +2346(of)S +2460(the)S +2613(display)S +2933(window,)S +3311(so)S +3431(memory)S +3795(usage)S +4054(is)S +4153(reasonable)S +4611(even)S +4831(if)S +4924(the)S +5078(frame)S +5342(bu)S +5442 H + (f)show 10 -.5 mul h (f)show +10 R +5503(er)S +2424 V +2160(is)S +2257(very)S +2464(large.)S +2532 V +10 Y +1260(*)S +10 B +1310(basePixel)S +2640 V +10 Y +1260(*)S +10 B +1310(maxColors)S +10 R +2160(These)S +2434(two)S +2620(resources)S +3032(determine)S +3467(the)S +3626(region)S +3918(of)S +4038(colormap)S +4452(space)S +4710(used)S +4930(to)S +5045(render)S +5336(image)S +2760 V +2160(pixels.)S +2928 V +10 Y +1260(*)S +10 B +1310(cmapInitialize)S +10 R +2160(Initialize)S +2555(the)S +2717(ximtool)S +3069(colormap)S +3486(at)S +3598(startup.)S +3965(This)S +4183(is)S +4290(sometimes)S +4758(necessary)S +5185(to)S +5303(clear)S +5536(a)S +3048 V +2160(previous)S +2534(ximtool)S +2876(colormap)S +3283(allowing)S +3663(a)S +3737(new)S +3933(basePixel)S +4346(and)S +4520(maxColors)S +4989(to)S +5097(take)S +5293(e)S +5337 H + (f)show 10 -.5 mul h (f)show +10 R +5398(ect.)S +3216 V +10 B +1260(cmap1)S +3324 V +1260(cmap2)S +10 R +2160(User)S +2389(colormap)S +2807(\256les.)S +3070(The)S +3266(intent)S +3535(here)S +3748(is)S +3857(to)S +3977(allow)S +4241(individual)S +4689(colormaps)S +5147(to)S +5267(be)S +5403(con-)S +3444 V +2160(veniently)S +2562(speci\256ed)S +2947(as)S +3060(a)S +3134(resource.)S +3612 V +10 B +1260(cmapDir1)S +3720 V +1260(cmapDir2)S +10 R +2160(User)S +2393(or)S +2521(system)S +2844(colormap)S +3266(directories.)S +3788(By)S +3951(default)S +4274(cmapDir2)S +4719(points)S +5010(to)S +5134(the)S +5302(system)S +3840 V +2160(directory)S +2564(/usr/local/lib/imtoolcmap,)S +3644(allowing)S +4037(a)S +4124(set)S +4278(of)S +4404(site)S +4586(default)S +4906(colormaps)S +5365(to)S +5486(be)S +3960 V +2160(de\256ned)S +2484(here.)S +2740(This)S +2948(leaves)S +3227(cmapDir1)S +3656(available)S +4046(to)S +4154(a)S +4228(user)S +4424(colormap)S +4831(directory.)S +4128 V +10 B +1260(input_\256fo)S +4236 V +1260(output_\256fo)S +10 R +2160(The)S +2354(input)S +2600(and)S +2784(output)S +3080(\256fos)S +3298(for)S +3454(\256fo)S +3633(i/o.)S +3834("Input")S +4167(and)S +4351("output")S +4729(are)S +4890(from)S +5124(the)S +5286(client's)S +4356 V +2160(point)S +2396(of)S +2509(view.)S +2788(Note)S +3012(that)S +3192(only)S +3400(one)S +3574(display)S +3893(server)S +4166(can)S +4334(use)S +4497(a)S +4571(\256fo-pair)S +4928(at)S +5030(one)S +5204(time.)S +4524 V +10 B +1260(unixaddr)S +10 R +2160(Template)S +2569(address)S +2900(for)S +3048(unix)S +3258(domain)S +3591(socket.)S +3934(The)S +4122(user)S +4321(must)S +4549(have)S +4770(write)S +5008(permission)S +5480(on)S +4644 V +2160(this)S +2338(directory,)S +2756(or)S +2872(the)S +3027(\256le)S +3188(must)S +3416(already)S +3742(exist.)S +4019(%d,)S +4210(if)S +4304(given,)S +4584(is)S +4684(replaced)S +5054(by)S +5187(the)S +5342(user's)S +4764 V +2160(UID.)S +4932 V +10 B +1260(port)S +10 R +2160(TCP/IP)S +2500(port)S +2700(for)S +2855(the)S +3017(server.)S +3355(Note)S +3589(that)S +3779(only)S +3997(one)S +4181(server)S +4464(can)S +4642(listen)S +4899(on)S +5039(a)S +5123(port)S +5324(at)S +5436(one)S +5052 V +2160(time,)S +2402(so)S +2530(if)S +2630(multiple)S +3003(ximtool)S +3354(servers)S +3675(are)S +3835(desired)S +4161(on)S +4299(the)S +4459(same)S +4702(machine,)S +5103(they)S +5313(should)S +5172 V +2160(be)S +2284(given)S +2536(di)S +2614 H + (f)show 10 -.5 mul h (f)show +10 R +2675(erent)S +2904(ports.)S +5460 V +9 B +1080(GUI)S +1277(RESOURCES)S +5580 V +10 R +1260(In)S +1394(principle)S +1800(ximtool)S +2163(can)S +2352(have)S +2592(any)S +2788(number)S +3145(of)S +3280(di)S +3358 H + (f)show 10 -.5 mul h (f)show +10 R +3419(erent)S +3670(GUIs,)S +3963(each)S +4197(of)S +4332(which)S +4628(de\256nes)S +4963(its)S +5110(own)S +5334(set)S +5497(of)S +5700 V +1260(resources.)S +1733(GUIs)S +1991(typically)S +2383(de\256ne)S +2669(a)S +2755(great)S +2996(many)S +3260(resources,)S +3703(but)S +3873(most)S +4110(of)S +4234(these)S +4480(are)S +4642(not)S +4811(really)S +5079(intended)S +5464(for)S +5820 V +1260(modi\256cation)S +1796(by)S +1926(the)S +2078(user)S +2274(\(although)S +2687(one)S +2861(can)S +3029(modify)S +3348(them)S +3578(if)S +3669(desired\).)S +6060 V +1260(The)S +1455(following)S +1884(are)S +2045(some)S +2296(of)S +2419(the)S +2581(more)S +2826(useful)S +3110(resources)S +3526(used)S +3749(by)S +3889(the)S +4051(default)S +4369(ximtool)S +4722(GUI.)S +4995(The)S +10 I +5191(imagewin)S +6180 V +10 R +1260(resources)S +1666(are)S +1817(Gterm)S +2102(widget)S +2404(resources.)S +6348 V +10 B +1650(Resource)S +2073(Name)S +3370(Default)S +3716(Value)S +6456 V +10 R +1650(.geometry:)S +6564 V +10 Y +1650(*)S +10 R +1700(controlShell.geometry:)S +6672 V +10 Y +1650(*)S +10 R +1700(info.geometry:)S +3370(420x240)S +6780 V +10 Y +1650(*)S +10 R +1700(load_panel.geometry:)S +6888 V +10 Y +1650(*)S +10 R +1700(save_panel.geometry:)S +6996 V +10 Y +1650(*)S +10 R +1700(print_panel.geometry:)S +7104 V +10 Y +1650(*)S +10 R +1700(help_panel.geometry:)S +7212 V +10 Y +1650(*)S +10 R +1700(cmapName:)S +3370(image)S +7692 V +900(X11IRAF Project)S +2709(Last change: 10 Dec 1996)S +5530(4)S +7920 V +EP +%%Page: 5 5 +BP +/slant 0 def +/height 1.000000 def +10 R +10 R +480 V +900(XIMTOOL)S +1376(\()S +1425(1)S +1491(\))S +2787(USER COMMANDS )S +4956(XIMTOOL)S +5432(\()S +5481(1)S +5547(\))S +960 V +10 Y +1650(*)S +10 R +1700(basePixel:)S +3370(64)S +1068 V +10 Y +1650(*)S +10 R +1700(imagewin.warpCursor:)S +3370(true)S +1176 V +10 Y +1650(*)S +10 R +1700(imagewin.raiseWindow:)S +3370(true)S +1284 V +10 Y +1650(*)S +10 R +1700(imagewin.deiconifyWindow:)S +3370(true)S +1392 V +10 Y +1650(*)S +10 R +1700(imagewin.ginmodeCursor:)S +3370(circle)S +1500 V +10 Y +1650(*)S +10 R +1700(imagewin.ginmodeBlinkInterval:)S +3370(500)S +1608 V +10 Y +1650(*)S +10 R +1700(imagewin.color0:)S +3370(black)S +1716 V +10 Y +1650(*)S +10 R +1700(imagewin.color1:)S +3370(white)S +1824 V +10 Y +1650(*)S +10 R +1700(imagewin.color8:)S +3370(#7c8498)S +1932 V +10 Y +1650(*)S +10 R +1700(imagewin.color9:)S +3370(steelblue)S +2040 V +10 Y +1650(*)S +10 R +1700(imagewin.width:)S +3370(512)S +2148 V +10 Y +1650(*)S +10 R +1700(imagewin.height:)S +3370(512)S +2256 V +10 Y +1650(*)S +10 R +1700(autoscale:)S +3370(True)S +2364 V +10 Y +1650(*)S +10 R +1700(zoomfactors:)S +3370(1)S +3450(2)S +3530(4)S +3610(8)S +2472 V +10 Y +1650(*)S +10 R +1700(displayCoords:)S +3370(True)S +2580 V +10 Y +1650(*)S +10 R +1700(displayPanner:)S +3370(True)S +2688 V +10 Y +1650(*)S +10 R +1700(displayMagni\256er:)S +3370(False)S +2796 V +10 Y +1650(*)S +10 R +1700(blinkRate:)S +3370(1.0)S +2904 V +10 Y +1650(*)S +10 R +1700(pannerArea:)S +3370(150)S +10 Y +3520(*)S +10 R +3570(150)S +3012 V +10 Y +1650(*)S +10 R +1700(pannerGeom:)S +3370(-5+5)S +3120 V +10 Y +1650(*)S +10 R +1700(magni\256erArea:)S +3370(100)S +10 Y +3520(*)S +10 R +3570(100)S +3228 V +10 Y +1650(*)S +10 R +1700(magni\256erGeom:)S +3370(+5+5)S +3336 V +10 Y +1650(*)S +10 R +1700(wcsboxGeom:)S +3370(-5-5)S +3444 V +10 Y +1650(*)S +10 R +1700(maxContrast:)S +3370(5.0)S +3552 V +10 Y +1650(*)S +10 R +1700(warnings:)S +3370(True)S +3720 V +1260(Description)S +1756(of)S +1869(selected)S +2220(resources:)S +4008 V +10 B +1260(.geometry)S +10 R +2360(Geometry)S +2789(of)S +2902(main)S +3132(image)S +3406(window.)S +4176 V +10 Y +1260(*)S +10 B +1310(controlShell.geometry)S +10 R +2360(Geometry)S +2789(of)S +2902(control)S +3215(panel)S +3461(shell.)S +4344 V +10 Y +1260(*)S +10 B +1310(info.geometry)S +10 R +2360(Geometry)S +2789(of)S +2902(info)S +3093(box.)S +4512 V +10 Y +1260(*)S +10 B +1310(load_panel.geometry)S +10 R +2360(Geometry)S +2789(of)S +2902(\256le)S +3060(load)S +3262(panel.)S +4680 V +10 Y +1260(*)S +10 B +1310(save_panel.geometry)S +10 R +2360(Geometry)S +2789(of)S +2902(save)S +3109(control)S +3422(panel.)S +4848 V +10 Y +1260(*)S +10 B +1310(print_panel.geometry)S +10 R +2360(Geometry)S +2789(of)S +2902(print)S +3121(control)S +3434(panel.)S +5016 V +10 Y +1260(*)S +10 B +1310(help_panel.geometry)S +10 R +2360(Geometry)S +2789(of)S +2902(help)S +3104(box.)S +5184 V +10 Y +1260(*)S +10 B +1310(cmapName)S +10 R +2360(Name)S +2638(used)S +2861(for)S +3018(private)S +3336(colormap.)S +3809(The)S +4005(default)S +4323(for)S +4480(all)S +4621(IRAF)S +4890(imaging)S +5259(applica-)S +5304 V +2360(tions)S +2601(is)S +2714("image".)S +3141(Gterm)S +3442(widget)S +3760(based)S +4033(imaging)S +4407(applications)S +4936(which)S +5225(have)S +5458(the)S +5424 V +2360(same)S +2597(value)S +2845(of)S +2961(cmapName)S +3448(will)S +3637(share)S +3880(the)S +4035(same)S +4273(colormap,)S +4708(minimizing)S +5203(colormap)S +5544 V +2360(\257ashing)S +2707(and)S +2881(allowing)S +3261(multiple)S +3625(applications)S +4138(to)S +4246(be)S +4370(run)S +4533(at)S +4635(the)S +4787(same)S +5022(time.)S +5712 V +10 Y +1260(*)S +10 B +1310(basePixel)S +10 R +2360(The)S +2545(base)S +2752(colormap)S +3159(cell)S +3333(used)S +3546(by)S +3676(the)S +3828(display)S +4147(colormap.)S +5880 V +10 Y +1260(*)S +10 B +1310(imagewin.warpCursor)S +10 R +2360(Warp)S +2611(pointer)S +2924(into)S +3110(image)S +3384(window)S +3736(when)S +3982(initiating)S +4374(a)S +4448(cursor)S +4727(read.)S +6048 V +10 Y +1260(*)S +10 B +1310(imagewin.raiseWindow)S +10 R +2360(Raise)S +2612(image)S +2886(window)S +3238(when)S +3484(initiating)S +3876(a)S +3950(cursor)S +4229(read.)S +6216 V +10 Y +1260(*)S +10 B +1310(imagewin.deiconifyWindow)S +6336 V +10 R +2360(Deiconify)S +2789(image)S +3063(window)S +3415(if)S +3506(necessary)S +3923(when)S +4169(initiating)S +4561(a)S +4635(cursor)S +4914(read.)S +6504 V +10 Y +1260(*)S +10 B +1310(imagewin.ginmodeCursor)S +6624 V +10 R +2360(Type)S +2596(of)S +2710(cursor)S +2990(when)S +3237(a)S +3312(cursor)S +3592(read)S +3795(is)S +3894(in)S +4004(progress.)S +4429(The)S +4616(default)S +4925(is)S +5024(a)S +5100(circle.)S +5408(Any)S +6744 V +2360(selection)S +2800(from)S +3079(the)S +3285(X)S +3441(cursor)S +3774(font)S +4019(can)S +4241(be)S +4419(used.)S +4741(A)S +4897(special)S +5258(case)S +5513(is)S +6864 V +2360("full_crosshair")S +3021(which)S +3295(is)S +3392(the)S +3544(full)S +3713(crosshair)S +4103(cursor)S +4382(of)S +4495(the)S +4647(Gterm)S +4932(widget.)S +7032 V +10 Y +1260(*)S +10 B +1310(imagewin.ginmodeBlinkInterval)S +7152 V +10 R +2360(Determines)S +2857(whether)S +3215(the)S +3374(cursor)S +3660(blinks)S +3942(when)S +4195(a)S +4277(cursor)S +4564(read)S +4773(is)S +4878(in)S +4994(progress.)S +5425(The)S +7272 V +2360(value)S +2606(is)S +2703(given)S +2955(in)S +3063(milliseconds.)S +7752 V +900(X11IRAF Project)S +2709(Last change: 10 Dec 1996)S +5530(5)S +7920 V +EP +%%Page: 6 6 +BP +/slant 0 def +/height 1.000000 def +10 R +10 R +480 V +900(XIMTOOL)S +1376(\()S +1425(1)S +1491(\))S +2787(USER COMMANDS )S +4956(XIMTOOL)S +5432(\()S +5481(1)S +5547(\))S +960 V +10 Y +1260(*)S +10 B +1310(imagewin.color0)S +10 R +2360(Background)S +2878(color.)S +1128 V +10 Y +1260(*)S +10 B +1310(imagewin.color1)S +10 R +2360(Foreground)S +2856(color.)S +1296 V +10 Y +1260(*)S +10 B +1310(imagewin.color8)S +10 R +2360(Color)S +2618(assigned)S +2992(the)S +3144(panner)S +3445(window.)S +1464 V +10 Y +1260(*)S +10 B +1310(imagewin.color9)S +10 R +2360(Color)S +2618(used)S +2831(for)S +2977(the)S +3129(tileFrames)S +3581(highlight.)S +1632 V +10 Y +1260(*)S +10 B +1310(imagewin.width)S +10 R +2360(Width)S +2640(of)S +2753(the)S +2905(main)S +3135(image)S +3409(window.)S +1800 V +10 Y +1260(*)S +10 B +1310(imagewin.height)S +10 R +2360(Height)S +2662(of)S +2775(the)S +2927(main)S +3157(image)S +3431(window.)S +1968 V +10 Y +1260(*)S +10 B +1310(pannerArea)S +10 R +2360(Area)S +2583(in)S +2691(pixels)S +2960(of)S +3073(the)S +3225(panner)S +3526(window.)S +2136 V +10 Y +1260(*)S +10 B +1310(pannerGeom)S +10 R +2360(Where)S +2655(to)S +2763(place)S +3003(the)S +3155(panner)S +3456(window.)S +2304 V +10 Y +1260(*)S +10 B +1310(magni\256erArea)S +10 R +2360(Area)S +2583(in)S +2691(pixels)S +2960(of)S +3073(the)S +3225(magni\256er)S +3638(window.)S +2472 V +10 Y +1260(*)S +10 B +1310(magni\256erGeom)S +10 R +2360(Where)S +2655(to)S +2763(place)S +3003(the)S +3155(magni\256er)S +3568(window.)S +2640 V +10 Y +1260(*)S +10 B +1310(wcsboxGeom)S +10 R +2360(Where)S +2655(to)S +2763(place)S +3003(the)S +3155(coords)S +3451(box.)S +2808 V +10 Y +1260(*)S +10 B +1310(maxContrast)S +10 R +2360(Maximum)S +2807(contrast)S +3153(value.)S +3216 V +9 B +900(DESCRIPTION)S +3336 V +10 R +1260(As)S +1401(a)S +1475(display)S +1794(server,)S +2092(XImtool)S +2461(is)S +2558(started)S +2854(as)S +2967(a)S +3041(separate)S +3397(process)S +3726(from)S +3950(client)S +4202(software)S +4575(such)S +4788(as)S +4901(IRAF.)S +5185(Once)S +5426(it)S +5513(is)S +3456 V +1260(running)S +1606(it)S +1697(will)S +1888(accept)S +2177(client)S +2434(connections)S +2946(simultaneously)S +3587(on)S +3721(\256fo)S +3894(pipes,)S +4164(unix)S +4376(domain)S +4710(sockets,)S +5063(or)S +5180(inet)S +5364(sock-)S +3576 V +1260(ets.)S +1432(A)S +1540(display)S +1865(client)S +2123(like)S +2309(the)S +2467(IRAF)S +10 I +2731(DISPLAY)S +10 R +3156(task)S +3353(makes)S +3644(a)S +3724(connection)S +4198(and)S +4378(sends)S +4637(the)S +4796(image)S +5077(across)S +5363(using)S +3696 V +1260(an)S +1385(IIS)S +1538(protocol.)S +1957(Once)S +2198(the)S +2351(image)S +2625(is)S +2722(loaded)S +3018(in)S +3126(the)S +3278(display)S +3597(bu)S +3697 H + (f)show 10 -.5 mul h (f)show +10 R +3758(er)S +3865(it)S +3951(may)S +4153(be)S +4277(enhanced,)S +4708(saved)S +4965(to)S +5073(a)S +5147(disk)S +5344(\256le)S +5502(in)S +3816 V +1260(a)S +1340(number)S +1681(of)S +1800(di)S +1878 H + (f)show 10 -.5 mul h (f)show +10 R +1939(erent)S +2174(formats,)S +2540(or)S +2659(printed)S +2978(as)S +3097(Encapsulated)S +3665(Postscript)S +4097(to)S +4212(a)S +4293(printer)S +4596(or)S +4716(disk)S +4920(\256le.)S +5140(Up)S +5299(to)S +5414(four)S +3936 V +1260(frame)S +1531(bu)S +1631 H + (f)show 10 -.5 mul h (f)show +10 R +1692(ers)S +1847(are)S +2007(allowed,)S +2387(these)S +2631(may)S +2842(be)S +2975(displayed)S +3397(simultaneously)S +4042(in)S +4159(a)S +4242(tiled)S +4459(mode,)S +4745(or)S +4866(blinked)S +5204(frame-to-)S +4056 V +1260(frame.)S +1582(Each)S +1816(frame)S +2083(may)S +2290(have)S +2513(its)S +2643(own)S +2850(colormap)S +3262(or)S +3380(brightness/contrast)S +4170(enhancement.)S +4787(Pan/Zoom)S +5240(and)S +5420(cur-)S +4176 V +1260(sor)S +1412(readout)S +1741(are)S +1892(permitted)S +2305(using)S +10 I +2552(markers)S +10 R +2879(,)S +2934(on-line)S +3247(help)S +3449(is)S +3546(also)S +3737(available.)S +4416 V +1260(When)S +1530(run)S +1695(in)S +1805(standalone)S +2264(mode,)S +2543(images)S +2858(\(currently)S +3283(IRAF)S +3543(OIF,)S +3761(GIF,)S +3979(Sun)S +4167(Raster\256les)S +4621(or)S +4736(simple)S +5036(FITS)S +5275(formats)S +4536 V +1260(are)S +1428(permitted\))S +1891(may)S +2110(be)S +2251(loaded)S +2564(on)S +2711(the)S +2880(command)S +3321(line)S +3518(or)S +3648(by)S +3795(using)S +4059(the)S +4228(Load)S +4480(Panel.)S +4774(This)S +4999(allows)S +5306(you)S +5502(to)S +4656 V +1260(browse)S +1578(images)S +1891(and)S +2065(perform)S +2416(the)S +2568(same)S +2803(manipulations)S +3400(as)S +3513(if)S +3604(they)S +3806(had)S +3980(been)S +4198(displayed)S +4611(by)S +4741(a)S +4815(client.)S +4944 V +9 B +1080(MOUSE)S +1437(OPERATIONS)S +5064 V +10 R +1260(Clicking)S +1648(and)S +1835(dragging)S +2233(MB1)S +2482(\(mouse)S +2819(button)S +3118(1\))S +3244(in)S +3365(the)S +3530(main)S +3773(image)S +4060(window)S +4425(creates)S +4745(a)S +4833(rectangular)S +5325(region)S +5184 V +1260(marker,)S +1604(used)S +1824(to)S +1939(select)S +2203(a)S +2284(region)S +2576(of)S +2696(the)S +2855(image.)S +3161(If)S +3264(you)S +3451(do)S +3588(this)S +3770(accidentally)S +4289(and)S +4470(don't)S +4718(want)S +4949(the)S +5108(marker,)S +5452(put)S +5304 V +1260(the)S +1419(pointer)S +1739(in)S +1854(the)S +2013(marker)S +2332(and)S +2513(type)S +2722(DELETE)S +3137(or)S +3258(BACKSPACE)S +3886(to)S +4002(delete)S +4278(the)S +4438(marker.)S +4783(With)S +5021(the)S +5181(pointer)S +5502(in)S +5424 V +1260(the)S +1417(marker,)S +1759(MB3)S +2000(will)S +2191(call)S +2370(up)S +2505(a)S +2584(marker)S +2901(menu)S +3158(listing)S +3444(some)S +3690(things)S +3970(you)S +4155(can)S +4328(do)S +4463(with)S +4676(the)S +4833(marker,)S +5174(like)S +5358(zoom)S +5544 V +1260(the)S +1420(outlined)S +1786(region.)S +2104(MB1)S +2348(can)S +2524(be)S +2656(used)S +2877(to)S +2993(drag)S +3208(or)S +3329(resize)S +3599(the)S +3759(marker.)S +4104(See)S +4287(below)S +4570(for)S +4725(more)S +4969(information)S +5480(on)S +5664 V +1260(markers.)S +5904 V +1260(Clicking)S +1642(on)S +1779(MB2)S +2022(in)S +2137(the)S +2296(main)S +2533(image)S +2814(window)S +3173(pans)S +3394(\(one)S +3609(click\))S +3874(or)S +3995(zooms)S +4294(\(two)S +4515(clicks\))S +4819(the)S +4979(image.)S +5286(Further)S +6024 V +1260(clicks)S +1529(cycle)S +1775(through)S +2122(the)S +2280(builtin)S +2578(zoom)S +2836(factors.)S +3198(Moving)S +3551(the)S +3709(pointer)S +4028(to)S +4142(a)S +4222(new)S +4424(location)S +4782(and)S +4962(clicking)S +5319(moves)S +6144 V +1260(the)S +1425(feature)S +1744(under)S +2014(the)S +2179(pointer)S +2505(to)S +2627(the)S +2793(center)S +3080(of)S +3207(the)S +3373(display)S +3706(window.)S +4127(Holding)S +4499(down)S +4765(the)S +4931(Shift)S +5170(key)S +5358(while)S +6264 V +1260(clicking)S +1620(MB2)S +1864(will)S +2058(cause)S +2317(a)S +2399(full-screen)S +2863(crosshair)S +3261(cursor)S +3547(to)S +3662(appear)S +3964(until)S +4185(the)S +4344(button)S +4637(is)S +4741(released,)S +5129(this)S +5311(can)S +5486(be)S +6384 V +1260(useful)S +1534(for)S +1680(\256ne)S +1860(positioning)S +2341(of)S +2454(the)S +2606(cursor.)S +6624 V +1260(MB3)S +1507(is)S +1615(used)S +1839(to)S +1958(adjust)S +2238(the)S +2401(contrast)S +2758(and)S +2943(brightness)S +3395(of)S +3519(the)S +3682(displayed)S +4106(image.)S +4446(The)S +4643(position)S +5008(of)S +5133(the)S +5297(pointer)S +6744 V +1260(within)S +1560(the)S +1726(display)S +2059(window)S +2425(determines)S +2906(the)S +3071(contrast)S +3430(and)S +3617(brightness)S +4071(values.)S +4394(Click)S +4654(once)S +4885(to)S +5006(set)S +5160(the)S +5325(values)S +6864 V +1260(corresponding)S +1861(to)S +1969(the)S +2121(pointer)S +2434(location,)S +2811(or)S +2924(click)S +3148(and)S +3322(drag)S +3529(to)S +3637(continuously)S +4184(adjust)S +4453(the)S +4605(display.)S +7680 V +900(X11IRAF Project)S +2709(Last change: 10 Dec 1996)S +5530(6)S +7920 V +EP +%%Page: 7 7 +BP +/slant 0 def +/height 1.000000 def +10 R +10 R +480 V +900(XIMTOOL)S +1376(\()S +1425(1)S +1491(\))S +2787(USER COMMANDS )S +4956(XIMTOOL)S +5432(\()S +5481(1)S +5547(\))S +960 V +9 B +1080(KEYSTROKE)S +1677(ACCELERATORS)S +1080 V +10 R +1260(The)S +1445(following)S +1864(keystrokes)S +2321(are)S +2472(currently)S +2862(de\256ned)S +3186(in)S +3294(the)S +3446(GUI:)S +1368 V +10 B +1260(Ctrl-b)S +10 R +1860(Backward)S +2294(frame)S +1476 V +10 B +1260(Ctrl-c)S +10 R +1860(Center)S +2156(frame?)S +1584 V +10 B +1260(Ctrl-f)S +10 R +1860(Forward)S +2228(frame)S +1692 V +10 B +1260(Ctrl-i)S +10 R +1860(Invert?)S +1800 V +10 B +1260(Ctrl-m)S +10 R +1860(Match)S +2145(LUTs)S +1908 V +10 B +1260(Ctrl-n)S +10 R +1860(Normalize)S +2016 V +10 B +1260(Ctrl-r)S +10 R +1860(Register)S +2124 V +10 B +1260(Ctrl-t)S +10 R +1860(Tile)S +2051(frames)S +2352(toggle)S +2232 V +10 B +1260(Ctrl-u)S +10 R +1860(Unzoom)S +2234(\(zoom=1\))S +2340 V +10 B +1260(Ctrl-x)S +10 R +1860(Flip)S +2052(X)S +2448 V +10 B +1260(Ctrl-y)S +10 R +1860(Flip)S +2052(Y)S +2736 V +10 B +1260(Alt-b)S +10 R +1860(Blink)S +2113(frames)S +2414(\(toggle\))S +2844 V +10 B +1260(Alt-c)S +10 R +1860(Control)S +2196(panel)S +2442(\(toggle\))S +2952 V +10 B +1260(Alt-h)S +10 R +1860(Help)S +2084(popup)S +2364(\(toggle\))S +3060 V +10 B +1260(Alt-i)S +10 R +1860(Info)S +2056(box)S +2236(popup)S +2516(\(toggle\))S +3168 V +10 B +1260(Alt-l)S +10 R +1860(Load)S +2095(\256le)S +2253(popup)S +2533(\(toggle\))S +3276 V +10 B +1260(Alt-p)S +10 R +1860(Print)S +2085(popup)S +2365(\(toggle\))S +3384 V +10 B +1260(Alt-s)S +10 R +1860(Save)S +2084(popup)S +2364(\(toggle\))S +3492 V +10 B +1260(Alt-t)S +10 R +1860(TclShell)S +2229(popup)S +2509(\(toggle\))S +3780 V +10 B +1260(Ctrl-Alt-q)S +10 R +1860(Quit)S +3888 V +10 B +1260(Ctrl-Alt-f)S +10 R +1860(Fitframe)S +4176 V +10 B +1260(Ctrl-=)S +10 R +1860(Print)S +2085(using)S +2332(current)S +2644(setup)S +4284 V +10 B +1260(Ctrl-<)S +10 R +1860(Decrease)S +2254(blink)S +2490(rate)S +2669(\(blink)S +2938(faster\))S +4392 V +10 B +1260(Ctrl->)S +10 R +1860(Increase)S +2221(blink)S +2457(rate)S +2636(\(blink)S +2905(slower\))S +4500 V +10 B +1260(Ctrl-+)S +10 R +1860(Zoom)S +2129(in)S +4608 V +10 B +1260(Ctrl--)S +10 R +1860(Zoom)S +2129(out)S +4896 V +10 B +1260(Ctrl-[hjkl])S +1769(or)S +1923(Ctrl-[arrow_key])S +5016 V +10 R +1860(Move)S +2123(cursor)S +2402(one)S +2576(pixel)S +2806(in)S +2914(each)S +3126(direction)S +5124 V +10 B +1260(Ctrl-Shift-[hjkl])S +2008(or)S +2162(Ctrl-Shift-[arrow_key])S +5244 V +10 R +1860(Move)S +2123(cursor)S +2402(ten)S +2554(pixels)S +2823(in)S +2931(each)S +3143(direction)S +5352 V +10 B +1260(Alt-1)S +1506(thru)S +1725(Alt-4)S +5472 V +10 R +1860(Set)S +2018(frame)S +2280(displayed)S +5580 V +10 B +1260(Ctrl-1)S +1550(thru)S +1769(Ctrl-9)S +5700 V +10 R +1860(Set)S +2018(integer)S +2325(zoom)S +2577(factor)S +5988 V +10 B +1260(NOTE:)S +10 R +1612(These)S +1885(keystrokes)S +2347(only)S +2560(work)S +2800(with)S +3013(the)S +3170(cursor)S +3454(in)S +3567(the)S +3724(main)S +3959(image)S +4239(window,)S +4622(not)S +4786(on)S +4922(the)S +5080(subwindows)S +6108 V +1260(or)S +1378(in)S +1491(markers)S +1847(since)S +2087(they)S +2294(are)S +2450(implemented)S +3007(as)S +10 I +3125(imagewin)S +10 R +3549(translations.)S +4099(If)S +4199(a)S +4277(command)S +4705(does)S +4922(not)S +5084(work,)S +5348(check)S +6228 V +1260(the)S +1412(cursor)S +1691(location.)S +6516 V +9 B +900(CLIENT)S +1272(CONNECTIONS)S +6636 V +10 R +1260(XImtool)S +1629(allows)S +1920(clients)S +2211(to)S +2319(connect)S +2659(in)S +2767(any)S +2941(of)S +3054(the)S +3206(following)S +3625(ways:)S +6804 V +10 B +1260(\256fo)S +1429(pipes)S +6924 V +10 R +1510(The)S +1706(traditional)S +2158(approach.)S +2589(The)S +2785(default)S +3103(global)S +3394(/dev/imt1[io])S +3963(pipes)S +4215(may)S +4428(be)S +4564(used,)S +4814(or)S +4939(a)S +5025(private)S +5344(set)S +5497(of)S +7044 V +1510(\256fos)S +1728(can)S +1906(be)S +2040(speci\256ed)S +2435(using)S +2692(the)S +10 I +2854(-\256fo)S +10 R +3055(command)S +3489(line)S +3678(argument)S +4094(or)S +10 Y +4216(*)S +10 I +4266(\256fo)S +10 R +4433(resource.)S +4864(Values)S +5180(should)S +5486(be)S +7164 V +1510(speci\256ed)S +1895(as)S +2008(the)S +2160(root)S +2351(pathname)S +2769(to)S +2877(a)S +2951(pair)S +3136(of)S +3250(\256fo)S +3420(pipes)S +3662(whose)S +3948(last)S +4118(character)S +4513(is)S +4611('i')S +4736(or)S +4850('o',)S +5052(these)S +5288(charac-)S +7284 V +1510(ters)S +1687(will)S +1876(be)S +2003(added)S +2274(automatically)S +2851(when)S +3100(opening)S +3455(the)S +3610(pipes.)S +3909(For)S +4081(example,)S +4477(to)S +4587(use)S +4752(the)S +4906(default)S +5215(pipes)S +5458(the)S +7764 V +900(X11IRAF Project)S +2709(Last change: 10 Dec 1996)S +5530(7)S +7920 V +EP +%%Page: 8 8 +BP +/slant 0 def +/height 1.000000 def +10 R +10 R +480 V +900(XIMTOOL)S +1376(\()S +1425(1)S +1491(\))S +2787(USER COMMANDS )S +4956(XIMTOOL)S +5432(\()S +5481(1)S +5547(\))S +960 V +1510(path)S +1712(would)S +1992(be)S +2116(speci\256ed)S +2501(as)S +2614(simply)S +2917("/dev/imt1".)S +3438(A)S +3540(value)S +3786(of)S +3899("none")S +4205(disables)S +4557(this)S +4732(connection.)S +1128 V +10 B +1260(tcp/ip)S +1535(sockets)S +1248 V +10 R +1510(Clients)S +1836(connect)S +2188(via)S +2352(a)S +2438(tcp/ip)S +2708(socket.)S +3030(The)S +3227(default)S +3546(port)S +3749(is)S +10 I +3858(5137)S +10 R +4058(,)S +4125(or)S +4250(a)S +4337(custom)S +4669(port)S +4873(may)S +5088(be)S +5225(speci\256ed)S +1368 V +1510(using)S +1758(the)S +10 I +1911(-port)S +10 R +2142(command)S +2567(line)S +2747(switch)S +3038(or)S +3151(a)S +10 Y +3225(*)S +10 I +3275(port)S +10 R +3472(resource.)S +3864(This)S +4072(permits)S +4402(connecting)S +4870(to)S +4978(the)S +5130(server)S +5403(over)S +1488 V +1510(a)S +1584(remote)S +1891(network)S +2248(connection)S +2716(anywhere)S +3133(on)S +3263(the)S +3415(Internet.)S +3780(A)S +3883(port)S +4075(number)S +4411(of)S +4525(0)S +4606(\(zero\))S +4874(disables)S +5227(this)S +5403(con-)S +1608 V +1510(nection.)S +1776 V +10 B +1260(unix)S +1480(domain)S +1833(sockets)S +1896 V +10 R +1510(Like)S +1733(a)S +1817(tcp/ip)S +2085(socket,)S +2405(but)S +2573(limited)S +2898(to)S +3017(a)S +3102(single)S +3382(host)S +3590(system.)S +3934(Usually)S +4286(faster)S +4548(than)S +4761(a)S +4846(tcp/ip)S +5115(socket,)S +5436(and)S +2016 V +1510(comparable)S +2008(to)S +2119(a)S +2196(\256fo.)S +2393(By)S +2543(default)S +2853(each)S +3068(user)S +3267(gets)S +3460(their)S +3675(own)S +3879(unix)S +4089(domain)S +4421(socket,)S +4733(so)S +4854(this)S +5031(option)S +5319(allows)S +2136 V +1510(multiple)S +1882(users)S +2125(to)S +2241(run)S +2413(ximtools)S +2803(on)S +2942(the)S +3103(same)S +3347(host)S +3553(without)S +3898(having)S +4209(to)S +4326(customize)S +4770(things.)S +5109(The)S +5303(default)S +2256 V +1510(value)S +1761(is)S +1863("/tmp/.IMT%d",)S +2558(other)S +2798(sockets)S +3126(may)S +3332(be)S +3460(de\256ned)S +3788(using)S +4039(the)S +10 I +4195(-unix)S +10 R +4434(command)S +4862(line)S +5046(switch)S +5341(or)S +5458(the)S +2376 V +10 Y +1510(*)S +10 I +1560(unixaddr)S +10 R +1953(resource.)S +2377(Legal)S +2636(values)S +2923(should)S +3222(be)S +3348(speci\256ed)S +3735(as)S +3850(a)S +3926(\256lename)S +4302(to)S +4412(be)S +4538(used)S +4753(for)S +4901(the)S +5056(socket,)S +5369(up)S +5502(to)S +2496 V +1510(two)S +1693("%d")S +1941(\256elds)S +2190(are)S +2343(allowed)S +2691(and)S +2867(will)S +3055(be)S +3181(replaced)S +3550(by)S +3682(the)S +3836(userid.)S +4137(An)S +4291(empty)S +4573(string)S +4833(value)S +5081(disables)S +5435(this)S +2616 V +1510(connection.)S +2784 V +1260(By)S +1410(default)S +1720(ximtool)S +2065(listens)S +2354(simultaneously)S +2993(for)S +3142(client)S +3397(connections)S +3908(on)S +4042(all)S +4176(three)S +4409(types)S +4654(of)S +4771(ports.)S +5090(Clients)S +5408(may)S +2904 V +1260(connect)S +1614(simultaneously)S +2264(by)S +2408(di)S +2486 H + (f)show 10 -.5 mul h (f)show +10 R +2547(erent)S +2790(means)S +3089(allowing)S +3483(up)S +3627(to)S +3748(three)S +3990(di)S +4068 H + (f)show 10 -.5 mul h (f)show +10 R +4129(erent)S +4371(displays)S +4742(to)S +4863(be)S +5000(loading)S +5343(at)S +5458(the)S +3024 V +1260(same)S +1495(time)S +1703(into)S +1889(di)S +1967 H + (f)show 10 -.5 mul h (f)show +10 R +2028(erent)S +2257(frames.)S +3312 V +9 B +1080(COMMUNICATIONS)S +1987(PROTOCOL)S +3432 V +10 R +1260(Clients)S +1583(communicate)S +2160(with)S +2377(XImtool)S +2755(using)S +3011(a)S +3094(protocol)S +3467(developed)S +3917(originally)S +4346(for)S +4502(IIS)S +4664(\(International)S +5247(Imaging)S +3552 V +1260(Systems\))S +1659(Frame)S +1946(Bu)S +2063 H + (f)show 10 -.5 mul h (f)show +10 R +2124(er)S +2232(hardware,)S +2658(the)S +2811(so-called)S +3202("IIS)S +3396(protocol";)S +3829(other)S +4065(more)S +4301(modern)S +4637(protocols)S +5040(will)S +5227(likely)S +5486(be)S +3672 V +1260(supported)S +1687(in)S +1798(the)S +1953(future.)S +2279(The)S +2467(IIS)S +2622(protocol)S +2988(is)S +3088(basically)S +3476(a)S +3553(command)S +3981(packet)S +4275(stream)S +4575(with)S +4787(a)S +4865(header)S +5164(describing)S +3792 V +1260(the)S +1421(operation)S +1837(to)S +1954(be)S +2087(performed)S +2541(\(select)S +2840(frame,)S +3136(load)S +3347(display,)S +3700(read)S +3910(cursor,)S +4223(etc\),)S +4436(and)S +4618(an)S +4750(optional)S +5116(data)S +5320(packet)S +3912 V +1260(containing)S +1712(e.g.)S +1886(pixels.)S +2180(It)S +2271(is)S +2368(beyond)S +2692(the)S +2844(scope)S +3101(of)S +3214(this)S +3390(document)S +3815(to)S +3924(describe)S +4287(fully)S +4507(the)S +4660(details)S +4952(of)S +5066(the)S +5219(protocol;)S +4032 V +1260(interested)S +1678(users)S +1913(should)S +2210(contact)S +10 I +2528(iraf@noao.edu)S +10 R +3164(for)S +3310(further)S +3611(information.)S +4320 V +9 B +900(FRAME)S +1257(BUFFERS)S +4440 V +10 R +1260(XImtool)S +1630(starts)S +1872(up)S +2003(using)S +2251(default)S +2560(frame)S +2824(bu)S +2924 H + (f)show 10 -.5 mul h (f)show +10 R +2985(er)S +3094(size)S +3281(of)S +3396(512x512)S +3778(pixels,)S +4074(two)S +4256(\(of)S +4404(four)S +4602(possible\))S +4995(frames)S +5298(will)S +5486(be)S +4560 V +1260(created.)S +1610(When)S +1886(loading)S +2224(disk)S +2429(images)S +2750(\(i.e.)S +2943(run)S +3114(in)S +3230(standalone)S +3694(mode\))S +3986(the)S +4145(frame)S +4414(bu)S +4514 H + (f)show 10 -.5 mul h (f)show +10 R +4575(er)S +4689(con\256guration)S +5259(\256le)S +5424(will)S +4680 V +1260(be)S +1385(searched)S +1764(for)S +1911(a)S +1986(de\256ned)S +2311(frame)S +2574(bu)S +2674 H + (f)show 10 -.5 mul h (f)show +10 R +2735(er)S +2843(that)S +3024(is)S +3122(the)S +3275(same)S +3511(size)S +3697(or)S +3811(larger)S +4074(than)S +4277(the)S +4430(current)S +4743(image,)S +5044(if)S +5137(no)S +5269(suitable)S +4800 V +1260(bu)S +1360 H + (f)show 10 -.5 mul h (f)show +10 R +1421(er)S +1529(can)S +1698(be)S +1822(found)S +2085(a)S +2159(custom)S +2478(frame)S +2740(bu)S +2840 H + (f)show 10 -.5 mul h (f)show +10 R +2901(er)S +3008(the)S +3160(same)S +3395(size)S +3580(as)S +3693(the)S +3845(image)S +4119(will)S +4305(be)S +4429(created)S +4746(in)S +4854(an)S +4978(unused)S +5291(portion)S +4920 V +1260(of)S +1373(the)S +1525(con\256guration)S +2088(table.)S +2367(When)S +2635(used)S +2848(as)S +2962(a)S +3037(display)S +3357(server)S +3631(the)S +3784(frame)S +4047(bu)S +4147 H + (f)show 10 -.5 mul h (f)show +10 R +4208(er)S +4316(con\256guration)S +4880(number)S +5216(is)S +5314(passed)S +5040 V +1260(in)S +1381(by)S +1524(the)S +1689(client)S +1954(and)S +2140(loaded)S +2448(explicitly)S +2868(even)S +3098(if)S +3201(it)S +3299(means)S +3596(clipping)S +3966(the)S +4130(image.)S +4471(If)S +4579(a)S +4665(new)S +4873(frame)S +5147(bu)S +5247 H + (f)show 10 -.5 mul h (f)show +10 R +5308(er)S +5427(is)S +5536(a)S +5160 V +1260(di)S +1338 H + (f)show 10 -.5 mul h (f)show +10 R +1399(erent)S +1635(size)S +1827(than)S +2036(previously)S +2495(de\256ned)S +2826(frames,)S +3159(all)S +3296(available)S +3693(frames)S +4001(will)S +4194(be)S +4325(initialized)S +4763(and)S +4945(cleared)S +5270(prior)S +5502(to)S +5280 V +1260(the)S +1422(display.)S +1806(The)S +2001(default)S +2318(frame)S +2590(bu)S +2690 H + (f)show 10 -.5 mul h (f)show +10 R +2751(er)S +2868(con\256guration)S +3441(\256le)S +3609(is)S +3716(/usr/local/lib/imtoolrc,)S +4654(this)S +4838(can)S +5015(be)S +5148(overridden)S +5400 V +1260(by)S +1391(de\256ning)S +1750(a)S +1825(IMTOOLRC)S +2378(environment)S +2914(variable)S +3266(naming)S +3597(the)S +3750(\256le)S +3909(to)S +4019(be)S +4145(used,)S +4385(by)S +4517(creating)S +4870(a)S +4946(.imtoolrc)S +5342(\256le)S +5502(in)S +5520 V +1260(your)S +1482(home)S +1743(directory,)S +2167(or)S +2289(a)S +2372(new)S +2577(\256le)S +2744(may)S +2955(be)S +3088(speci\256ed)S +3482(using)S +3738(the)S +10 I +3899(-imtoolrc)S +10 R +4310(command)S +4743(line)S +4932(\257ag)S +5120(or)S +10 I +5241(imtoolrc)S +5640 V +10 R +1260(application)S +1734(resource.)S +5880 V +1260(The)S +1445(format)S +1741(of)S +1854(the)S +2006(frame)S +2268(bu)S +2368 H + (f)show 10 -.5 mul h (f)show +10 R +2429(er)S +2536(con\256guration)S +3099(\256le)S +3257(is)S +6120 V +10 I +1410(con\256gno)S +1784(nframes)S +2136(width)S +2389(height)S +2669([extra)S +2943(\256elds])S +6240 V +10 R +1290(e.g.)S +6360 V +1560(1)S +1670(2)S +1780(512)S +1990(512)S +6480 V +1560(2)S +1670(2)S +1780(800)S +1990(800)S +6600 V +1560(3)S +1670(1)S +1750(1024)S +1980(1024)S +2480(#)S +2560(comment)S +6720 V +1560(:)S +1648(:)S +1766(:)S +1914(:)S +6960 V +1260(At)S +1420(most)S +1675(128)S +1885(frame)S +2177(bu)S +2277 H + (f)show 10 -.5 mul h (f)show +10 R +2338(er)S +2475(sizes)S +2730(may)S +2963(be)S +3118(de\256ned,)S +3498(each)S +3741(con\256guration)S +4335(may)S +4568(de\256ne)S +4873(up)S +5034(to)S +5173(4)S +5284(frames,)S +7080 V +1260(con\256guration)S +1823(numbers)S +2197(need)S +2415(not)S +2573(be)S +2697(sequential.)S +7680 V +900(X11IRAF Project)S +2709(Last change: 10 Dec 1996)S +5530(8)S +7920 V +EP +%%Page: 9 9 +BP +/slant 0 def +/height 1.000000 def +10 R +10 R +480 V +900(XIMTOOL)S +1376(\()S +1425(1)S +1491(\))S +2787(USER COMMANDS )S +4956(XIMTOOL)S +5432(\()S +5481(1)S +5547(\))S +960 V +10 B +1260(NOTE:)S +10 R +1640(When)S +1911(de\256ning)S +2272(a)S +2349(new)S +2548(frame)S +2813(bu)S +2913 H + (f)show 10 -.5 mul h (f)show +10 R +2974(er)S +3084(for)S +3233(use)S +3399(with)S +3610(client)S +3865(software)S +4241(such)S +4457(as)S +4573(IRAF)S +4834(the)S +4990(user)S +5190(must)S +5419(also)S +1080 V +1260(remember)S +1694(to)S +1802(de\256ne)S +2076(those)S +2317(frame)S +2579(bu)S +2679 H + (f)show 10 -.5 mul h (f)show +10 R +2740(ers)S +2886(in)S +2994(the)S +3146(IRAF)S +10 I +3404(dev$graphcap)S +10 R +4005(\256le.)S +1368 V +9 B +900(MARKERS)S +1488 V +10 R +1260(Although)S +1668(ximtool)S +2010(doesn't)S +2334(do)S +2464(much)S +2717(with)S +2926(markers)S +3278(currently,)S +3694(they)S +3897(are)S +4049(a)S +4124(general)S +4448(feature)S +4755(of)S +4869(the)S +10 I +5022(Gterm)S +10 R +5308(widget)S +1608 V +1260(and)S +1450(are)S +1616(used)S +1844(more)S +2094(extensively)S +2594(in)S +2717(other)S +2967(programs)S +3389(\(e.g.)S +3611(the)S +3778(prototype)S +4206(IRAF)S +4479(science)S +4817(GUI)S +5039(applications\).)S +1728 V +1260(XImtool)S +1639(uses)S +1851(markers)S +2212(for)S +2368(the)S +2530(marker)S +2852(zoom)S +3114(feature)S +3430(discussed)S +3853(above,)S +4156(and)S +4340(also)S +4541(for)S +4697(the)S +4860(panner,)S +5197(magni\256er)S +1848 V +1260(and)S +1439(the)S +1596(coordinates)S +2091(box.)S +2301(All)S +2464(markers)S +2820(share)S +3064(some)S +3309(of)S +3426(the)S +3582(same)S +3821(characteristics,)S +4450(so)S +4573(it)S +4663(is)S +4764(worthwhile)S +5253(learning)S +1968 V +1260(basic)S +1495(marker)S +1807(manipulation)S +2365(keystrokes.)S +2136 V +10 B +1260(o)S +10 R +1410(MB1)S +1646(anywhere)S +2063(inside)S +2332(a)S +2406(marker)S +2718(may)S +2920(be)S +3044(used)S +3257(to)S +3365(drag)S +3572(the)S +3724(marker.)S +2304 V +10 B +1260(o)S +10 R +1410(MB1)S +1646(near)S +1847(a)S +1921(marker)S +2233(corner)S +2517(or)S +2630(edge,)S +2873(depending)S +3319(on)S +3449(the)S +3601(type)S +3803(of)S +3916(marker,)S +4253(resizes)S +4554(the)S +4706(marker.)S +2472 V +10 B +1260(o)S +10 R +1410(Shift-MB1)S +1874(on)S +2004(the)S +2156(corner)S +2440(of)S +2553(most)S +2778(markers)S +3129(will)S +3315(rotate)S +3572(the)S +3724(marker.)S +2640 V +10 B +1260(o)S +10 R +1410(Markers)S +1775(stack,)S +2038(if)S +2132(you)S +2315(have)S +2536(several)S +2851(markers)S +3205(and)S +3382(you)S +3565(put)S +3726(one)S +3903(on)S +4037(top)S +4199(of)S +4316(the)S +4472(other.)S +4736(The)S +4925(active)S +5197(marker)S +5513(is)S +2760 V +1410(highlighted)S +1909(to)S +2030(tell)S +2201(you)S +2394(which)S +2681(of)S +2807(the)S +2972(stacked)S +3314(markers)S +3678(is)S +3788(active.)S +4094(If)S +4203(the)S +4368(markers)S +4732(overlap,)S +5099(this)S +5287(will)S +5486(be)S +2880 V +1410(marker)S +1722("on)S +1893(top")S +2092(in)S +2200(the)S +2352(stacking)S +2715(order.)S +3048 V +10 B +1260(o)S +10 R +1410(MB2)S +1646(in)S +1754(the)S +1906(body)S +2136(of)S +2249(a)S +2323(marker)S +2635("lowers")S +3013(the)S +3165(marker,)S +3502(i.e.)S +3654(moves)S +3945(it)S +4031(to)S +4139(the)S +4291(bottom)S +4605(of)S +4718(the)S +4870(stacking)S +5233(order.)S +3216 V +10 B +1260(o)S +10 R +1410(Delete)S +1700(or)S +1813(backspace)S +2252(in)S +2360(a)S +2434(marker)S +2746(deletes)S +3053(it.)S +3384 V +10 B +1260(o)S +10 R +1410(Markers)S +1789(have)S +2024(their)S +2254(own)S +2473(translation)S +2942(resources)S +3365(and)S +3557(so)S +3694(the)S +3864(default)S +4189(keystroke)S +4625(commands)S +5106(will)S +5310(not)S +5486(be)S +3504 V +1410(recognized)S +1877(when)S +2123(the)S +2275(cursor)S +2554(is)S +2651(in)S +2759(a)S +2833(marker.)S +3672 V +1260(For)S +1433(example,)S +1830(try)S +1976(placing)S +2305(the)S +2462(pointer)S +2780(anywhere)S +3202(in)S +3315(the)S +3472(coords)S +3773(box,)S +3983(then)S +4190(press)S +4430(MB1)S +4671(and)S +4850(hold)S +5063(it)S +5154(down,)S +5436(and)S +3792 V +1260(drag)S +1474(the)S +1633(coords)S +1936(box)S +2123(marker)S +2442(somewhere)S +2933(else)S +3125(on)S +3262(the)S +3421(screen.)S +3737(You)S +3946(can)S +4121(also)S +4319(resize)S +4588(the)S +4746(coords)S +5048(box)S +5234(by)S +5370(drag-)S +3912 V +1260(ging)S +1478(a)S +1562(corner,)S +1881(or)S +2004(delete)S +2282(it)S +2379(with)S +2598(the)S +2761(delete)S +3040(or)S +3164(backspace)S +3614(key.)S +3824(\(The)S +4053(Initialize)S +4449(button)S +4746(will)S +4943(get)S +5106(the)S +5269(original)S +4032 V +1260(coords)S +1556(box)S +1736(back)S +1954(if)S +2045(you)S +2225(delete)S +2493(it,)S +2604(or)S +2717(you)S +2897(can)S +3065(reset)S +3283(the)S +3435(toggle)S +3715(in)S +3823(the)S +3975(control)S +4288(panel\).)S +4320 V +9 B +1080(PANNER)S +1482(MARKER)S +4440 V +10 R +1260(The)S +1449(panner)S +1754(window)S +2110(always)S +2421(displays)S +2783(the)S +2939(full)S +3112(frame)S +3379(bu)S +3479 H + (f)show 10 -.5 mul h (f)show +10 R +3540(er.)S +3677(Try)S +3856(setting)S +4158(the)S +4315(frame)S +4582(bu)S +4682 H + (f)show 10 -.5 mul h (f)show +10 R +4743(er)S +4855(con\256guration)S +5423(to)S +5536(a)S +4560 V +1260(nonsquare)S +1708(frame)S +1978(bu)S +2078 H + (f)show 10 -.5 mul h (f)show +10 R +2139(er)S +2254(\(e.g.)S +2469(imtcryo\))S +2851(and)S +3033(then)S +3243(displaying)S +3698(a)S +3780(square)S +4078(image)S +4360(\(e.g.)S +4575(dev$pix\))S +4968(and)S +5150(the)S +5309(panner)S +4680 V +1260(will)S +1446(show)S +1687(you)S +1867(exactly)S +2185(where)S +2458(the)S +2610(image)S +2884(has)S +3047(been)S +3265(loaded)S +3561(into)S +3747(the)S +3899(frame.)S +4920 V +1260(The)S +1450(panner)S +1756(window)S +2113(uses)S +2321(two)S +2507(markers,)S +2889(one)S +3069(for)S +3221(the)S +3379(window)S +3737(border)S +4033(and)S +4213(one)S +4393(to)S +4507(mark)S +4748(the)S +4906(displayed)S +5325(region)S +5040 V +1260(of)S +1379(the)S +1537(frame.)S +1830(Most)S +2072(of)S +2191(the)S +2349(usual)S +2596(marker)S +2914(keystrokes)S +3377(mentioned)S +3835(below)S +4115(apply)S +4373(to)S +4487(these)S +4728(markers)S +5085(as)S +5204(well,)S +5436(e.g.)S +5160 V +1260(you)S +1443(can)S +1614(use)S +1780(MB1)S +2019(to)S +2130(reposition)S +2563(on)S +2696(the)S +2851(panner)S +3156(window)S +3512(within)S +3802(the)S +3958(main)S +4192(image)S +4470(display)S +4793(window,)S +5174(or)S +5291(to)S +5403(drag)S +5280 V +1260(the)S +1414(region)S +1701(marker)S +2015(within)S +2303(the)S +2457(panner)S +2760(\(pan)S +2969(the)S +3123(image\).)S +3456(Resizing)S +3837(the)S +3990(region)S +4276(marker)S +4589(zooms)S +4881(the)S +5034(image;)S +5337(this)S +5513(is)S +5400 V +1260(a)S +1336(non-aspect)S +1800(constrained)S +2292(zoom.)S +2571(The)S +2758(panner)S +3061(window)S +3415(itself)S +3647(can)S +3817(be)S +3943(resized)S +4257(by)S +4389(dragging)S +4776(a)S +4852(corner)S +5138(with)S +5349(MB1.)S +5520 V +1260(Typing)S +1579(delete)S +1847(or)S +1960(backspace)S +2399(anywhere)S +2816(in)S +2924(the)S +3076(panner)S +3377(window)S +3729(deletes)S +4036(the)S +4188(panner.)S +5760 V +1260(A)S +1362(special)S +1669(case)S +1870(is)S +1967(MB2.)S +2228(Hitting)S +2542(MB2)S +2778(anywhere)S +3195(in)S +3303(the)S +3455(panner)S +3757(window)S +4110(pans)S +4324(the)S +4477(image)S +4752(to)S +4861(that)S +5042(point.)S +5304(This)S +5513(is)S +5880 V +1260(analogous)S +1695(to)S +1803(hitting)S +2095(MB2)S +2331(in)S +2439(the)S +2591(main)S +2821(display)S +3140(window)S +3492(to)S +3600(pan)S +3774(the)S +3926(image.)S +6120 V +1260(The)S +1447(panner)S +1750(marker)S +2064(can)S +2234(be)S +2360(disabled)S +2725(by)S +2857(de\256ning)S +3218(the)S +10 I +3373(displayPanner)S +10 R +3989(GUI)S +4199(resource,)S +4594(its)S +4722(size)S +4910(and)S +5087(location)S +5442(can)S +6240 V +1260(be)S +1384(controlled)S +1819(using)S +2066(the)S +10 I +2218(pannerArea)S +10 R +2725(and)S +10 I +2899(pannerGeom)S +10 R +3450(GUI)S +3657(resources)S +4063(respectively.)S +6528 V +9 B +1080(MAGNIFIER)S +1642(MARKER)S +6648 V +10 R +1260(The)S +1445(magni\256er)S +1858(marker)S +2170(can)S +2338(be)S +2462(used)S +2676(to)S +2785(zoom)S +3038(in)S +3147(on)S +3278(a)S +3353(small)S +3601(area)S +3797(around)S +4105(the)S +4258(cursor.)S +4593(It)S +4685(will)S +4872(be)S +4997(updated)S +5344(as)S +5458(the)S +6768 V +1260(cursor)S +1552(moves)S +1856(but)S +2027(only)S +2248(for)S +2407(small)S +2666(motions)S +3031(\(either)S +3333(mouse)S +3636(movement)S +4100(or)S +4225(with)S +4445(the)S +4609(cursor)S +4900(movement)S +5364(keys-)S +6888 V +1260(trokes\))S +1570(to)S +1681(minimize)S +2092(the)S +2247(impact)S +2552(on)S +2685(the)S +2840(system.)S +3207(The)S +3396(zoom)S +3652(factor)S +3918(is)S +4019(expressed)S +4446(as)S +4563(some)S +4808(fraction)S +5152(of)S +5269(the)S +5425(size)S +7008 V +1260(of)S +1381(the)S +1541(magni\256er)S +1962(marker)S +2282(itself.)S +2575(The)S +2768(default)S +3083(zoom)S +3343(is)S +3448(4,)S +3561(i.e.)S +3721(the)S +3881(area)S +4084(in)S +4200(the)S +4359(marker)S +4678(represents)S +5119(and)S +5300(area)S +5502(in)S +7128 V +1260(the)S +1417(image)S +1696(that's)S +1953(one-fourth)S +2409(the)S +2566(size)S +2756(of)S +2874(the)S +3031(marker.)S +3403(Other)S +3665(zoom)S +3922(factors)S +4228(may)S +4435(be)S +4564(selected)S +4920(using)S +5172(the)S +5330(popup)S +7248 V +1260(menu)S +1512(created)S +1829(by)S +1959(hitting)S +2251(MB1)S +2487(in)S +2595(the)S +2747(marker.)S +7728 V +900(X11IRAF Project)S +2709(Last change: 10 Dec 1996)S +5530(9)S +7920 V +EP +%%Page: 10 10 +BP +/slant 0 def +/height 1.000000 def +10 R +10 R +480 V +900(XIMTOOL)S +1376(\()S +1425(1)S +1491(\))S +2787(USER COMMANDS )S +4956(XIMTOOL)S +5432(\()S +5481(1)S +5547(\))S +960 V +1260(By)S +1414(default)S +1728(the)S +1887(magni\256er)S +2307(marker)S +2626(is)S +2730(not)S +2895(visible,)S +3224(to)S +3339(toggle)S +3626(it)S +3720(select)S +3985(the)S +10 I +4145(Magni\256er)S +10 R +4577(option)S +4871(from)S +5103(the)S +10 I +5263(Options)S +1080 V +10 R +1260(menubar)S +1660(button.)S +2022(Alternatively,)S +2625(for)S +2792(just)S +2988(a)S +3083(quick)S +3356(look)S +3584(holding)S +3940(down)S +4212(the)S +4384(Shift)S +4629(and)S +4823(MB1)S +5079(buttons)S +5424(will)S +1200 V +1260(display)S +1579(the)S +1731(marker)S +2043(until)S +2257(the)S +2409(button)S +2695(is)S +2792(released.)S +1440 V +1260(The)S +1453(magni\256er)S +1874(marker)S +2194(can)S +2370(be)S +2502(disabled)S +2873(by)S +3011(de\256ning)S +3377(the)S +10 I +3537(displayMagni\256er)S +10 R +4258(GUI)S +4473(resource,)S +4873(its)S +5006(size)S +5199(and)S +5381(loca-)S +1560 V +1260(tion)S +1446(can)S +1614(be)S +1738(controlled)S +2173(using)S +2420(the)S +10 I +2572(magni\256erArea)S +10 R +3179(and)S +10 I +3353(magni\256erGeom)S +10 R +4004(GUI)S +4211(resources)S +4617(respectively.)S +1848 V +9 B +1080(COORDS)S +1492(BOX)S +1714(MARKER)S +1968 V +10 R +1260(XImtool)S +1629(provides)S +2003(a)S +2077(limited)S +2391(notion)S +2677(of)S +2790(world)S +3054(coordinates,)S +3570(allowing)S +3951(frame)S +4214(bu)S +4314 H + (f)show 10 -.5 mul h (f)show +10 R +4375(er)S +4483(pixel)S +4714(coordinates)S +5205(and)S +5380(pixel)S +2088 V +1260(values)S +1546(to)S +1655(be)S +1780(converted)S +2204(to)S +2312(some)S +2553(arbitrary)S +2926(linear)S +3183(client-de\256ned)S +3762(coordinate)S +4213(system.)S +4546(The)S +4731(coords)S +5027(box)S +5207(feature)S +5513(is)S +2208 V +1260(used)S +1473(to)S +1581(display)S +1900(these)S +2135(world)S +2398(coordinates)S +2888(as)S +3001(the)S +3153(pointer)S +3466(is)S +3563(moved)S +3865(about)S +4117(in)S +4225(the)S +4377(image)S +4651(window.)S +2448 V +1260(The)S +1445(quantities)S +1865(displayed)S +2279(in)S +2388(the)S +2541(coords)S +2838(box)S +3019(are)S +3171(X,)S +3299(Y,)S +3427(and)S +3602(Z:)S +3722(the)S +3875(X,Y)S +4075(world)S +4339(coordinates)S +4830(of)S +4944(the)S +5097(pointer,)S +5436(and)S +2568 V +1260(Z,)S +1379(the)S +1534(world)S +1800(equivalent)S +2249(of)S +2365(the)S +2520(pixel)S +2753(value)S +3002(under)S +3262(the)S +3417(pointer.)S +3758(All)S +3919(coordinate)S +4373(systems)S +4723(are)S +4877(linear.)S +5161(The)S +5348(preci-)S +2688 V +1260(sion)S +1466(of)S +1588(a)S +1671(displayed)S +2093(quantity)S +2460(is)S +2566(limited)S +2889(by)S +3028(the)S +3189(range)S +3449(of)S +3571(values)S +3865(of)S +3988(the)S +4150(associated)S +4600(raw)S +4789(frame)S +5061(bu)S +5161 H + (f)show 10 -.5 mul h (f)show +10 R +5222(er)S +5339(value.)S +2808 V +1260(For)S +1431(example,)S +1826(if)S +1919(the)S +2073(display)S +2394(window)S +2748(is)S +2846(512x512)S +3227(only)S +3436(512)S +3617(coordinate)S +4069(values)S +4355(are)S +4507(possible)S +4866(in)S +4975(either)S +5233(axis)S +5425(\(the)S +2928 V +1260(positional)S +1687(precision)S +2085(can)S +2256(be)S +2383(increased)S +2792(however)S +3168(by)S +3301(zooming)S +3684(the)S +3839(image\).)S +4174(More)S +4423(seriously,)S +4842(at)S +4947(most)S +5175(about)S +5430(200)S +3048 V +1260(pixel)S +1501(values)S +1797(can)S +1976(be)S +2111(displayed)S +2534(since)S +2779(this)S +2964(is)S +3071(the)S +3233(limit)S +3463(on)S +3603(the)S +3765(range)S +4026(of)S +4149(pixel)S +4389(values)S +4684(loaded)S +4990(into)S +5186(the)S +5348(frame)S +3168 V +1260(bu)S +1360 H + (f)show 10 -.5 mul h (f)show +10 R +1421(er.)S +1553(If)S +1649(a)S +1723(display)S +2042(pixel)S +2272(is)S +2369(saturated)S +2759(a)S +2833("+")S +3001(will)S +3187(be)S +3311(displayed)S +3724(after)S +3936(the)S +4088(intensity)S +4463(value.)S +3408 V +1260(The)S +1446(coords)S +1743(box)S +1924(is)S +2022(a)S +2097(text)S +2278(marker,)S +2616(it)S +2703(can)S +2872(be)S +2997(moved)S +3300(and)S +3475(resized)S +3788(with)S +3997(the)S +4150(pointer)S +4464(like)S +4645(any)S +4820(other)S +5056(marker.)S +5425(The)S +3528 V +1260(coords)S +1561(box)S +1746(marker)S +2063(can)S +2236(be)S +2365(disabled)S +2733(by)S +2868(de\256ning)S +3231(the)S +10 I +3388(displayCoords)S +10 R +4007(GUI)S +4219(resource,)S +4616(its)S +4746(location)S +5103(can)S +5275(be)S +5403(con-)S +3648 V +1260(trolled)S +1551(by)S +1681(the)S +10 I +1833(wcsboxGeom)S +10 R +2395(GUI)S +2602(resource.)S +3936 V +9 B +1080(MARKER)S +1517(MENU)S +1819(OPTIONS)S +4056 V +10 R +1260(Except)S +1575(for)S +1729(the)S +1889(panner)S +2198(and)S +2380(WCS)S +2635(markers,)S +3019(MB3)S +3263(\(mouse)S +3595(button)S +3889(3\))S +4010(calls)S +4231(up)S +4369(the)S +4529(marker)S +4849(menu)S +5109(providing)S +5536(a)S +4176 V +1260(limited)S +1574(set)S +1715(of)S +1828(functions)S +2230(common)S +2610(to)S +2718(all)S +2848(markers:)S +4344 V +10 B +1260(o)S +10 R +1410(Zoom)S +1686(does)S +1906(an)S +2037(equal)S +2291(aspect)S +2578(zoom)S +2838(of)S +2959(the)S +3119(region)S +3412(outlined)S +3778(by)S +3916(the)S +4076(marker.)S +4421(In)S +4542(this)S +4725(way)S +4929(you)S +5117(can)S +5293(mark)S +5536(a)S +4464 V +1410(region)S +1695(of)S +1808(the)S +1960(image)S +2234(and)S +2408(zoom)S +2660(it)S +2746(up.)S +4632 V +10 B +1260(o)S +10 R +1410(Fill)S +1597(exactly)S +1933(zooms)S +2242(the)S +2412(area)S +2625(outlined)S +3001(by)S +3149(the)S +3319(marker,)S +3674(making)S +4022(it)S +4126(\256ll)S +4286(the)S +4456(display)S +4793(window.)S +5188(Since)S +5458(the)S +4752 V +1410(marker)S +1722(is)S +1819(not)S +1977(likely)S +2235(to)S +2343(be)S +2467(exactly)S +2785(square,)S +3100(the)S +3252(aspect)S +3531(ratio)S +3744(of)S +3857(the)S +4009(resultant)S +4383(image)S +4657(will)S +4843(not)S +5001(be)S +5125(unitary.)S +4920 V +10 B +1260(o)S +10 R +1410(Print)S +1643(prints)S +1909(the)S +2069(region)S +2362(outlined)S +2728(by)S +2866(the)S +3027(marker)S +3348(to)S +3465(the)S +3626(printer)S +3931(or)S +4053(\256le)S +4220(currently)S +4619(con\256gured)S +5085(by)S +5224(the)S +5385(Print)S +5040 V +1410(Panel.)S +5208 V +10 B +1260(o)S +10 R +1410(Save)S +1634(saves)S +1880(the)S +2032(region)S +2317(outlined)S +2675(by)S +2805(the)S +2957(marker)S +3269(to)S +3377(the)S +3529(\256le)S +3687(currently)S +4077(con\256gured)S +4534(by)S +4664(the)S +4816(Save)S +5040(Panel.)S +5376 V +10 B +1260(o)S +10 R +1410(Info)S +1606(prints)S +1864(a)S +1938(description)S +2412(of)S +2525(the)S +2677(marked)S +3006(region.)S +3316(The)S +3501(text)S +3681(is)S +3778(printed)S +4091(in)S +4199(the)S +4351(Info)S +4547(Panel.)S +5544 V +10 B +1260(o)S +10 R +1410(Unrotate)S +1789(unrotates)S +2185(a)S +2259(rotated)S +2566(marker.)S +5712 V +10 B +1260(o)S +10 R +1410(Color)S +1668(is)S +1765(a)S +1839(menu)S +2091(of)S +2204(possible)S +2562(marker)S +2874(colors.)S +5880 V +10 B +1260(o)S +10 R +1410(Type)S +1651(is)S +1754(a)S +1834(menu)S +2092(of)S +2211(possible)S +2575(marker)S +2893(types.)S +3165(This)S +3379(is)S +3482(still)S +3669(a)S +3749(little)S +3969(buggy)S +4256(and)S +4437(it)S +4530(isn't)S +4745(very)S +4959(useful,)S +5265(but)S +5430(you)S +6000 V +1410(can)S +1578(use)S +1741(it)S +1827(to)S +1935(play)S +2137(with)S +2345(di)S +2423 H + (f)show 10 -.5 mul h (f)show +10 R +2484(erent)S +2713(types)S +2954(of)S +3067(markers.)S +6168 V +10 B +1260(o)S +10 R +1410(Destroy)S +1760(destroys)S +2127(the)S +2283(marker.)S +2624(You)S +2830(can)S +3002(also)S +3197(hit)S +3337(the)S +3493(delete)S +3766(or)S +3884(backspace)S +4328(key)S +4507(in)S +4620(a)S +4699(marker)S +5016(to)S +5129(destroy)S +5458(the)S +6288 V +1410(marker.)S +6576 V +9 B +900(CONTROL)S +1382(PANEL)S +6696 V +10 R +1260(XImtool)S +1636(has)S +1806(a)S +1887(control)S +2207(panel)S +2460(which)S +2741(can)S +2917(be)S +3049(used)S +3270(to)S +3386(exercise)S +3750(most)S +3983(of)S +4104(the)S +4264(capabilities)S +4757(the)S +4917(program)S +5293(has)S +5464(for)S +6816 V +1260(image)S +1544(display.)S +1928(The)S +2123(control)S +2445(panel)S +2700(can)S +2877(be)S +3010(accessed)S +3397(either)S +3663(via)S +3824(the)S +10 B +3985(Options)S +10 R +4364(menu)S +4625(from)S +4858(the)S +5019(main)S +5258(window)S +6936 V +1260(menubar,)S +1664(or)S +1777(by)S +1907(pressing)S +2270(the)S +2422(leftmost)S +2780(button)S +3066(in)S +3174(the)S +3326(row)S +3511(of)S +3624(buttons)S +3949(at)S +4051(the)S +4203(upper)S +4460(right)S +4679(side)S +4870(of)S +4983(the)S +5135(display.)S +7680 V +900(X11IRAF Project)S +2709(Last change: 10 Dec 1996)S +5480(10)S +7920 V +EP +%%Page: 11 11 +BP +/slant 0 def +/height 1.000000 def +10 R +10 R +480 V +900(XIMTOOL)S +1376(\()S +1425(1)S +1491(\))S +2787(USER COMMANDS )S +4956(XIMTOOL)S +5432(\()S +5481(1)S +5547(\))S +960 V +9 B +1080(VIEW)S +1357(CONTROLS)S +1080 V +10 R +1260(The)S +10 B +1452(Frame)S +1771(box)S +10 R +1964(will)S +2157(list)S +2317(only)S +2532(the)S +2692(frame)S +2962(bu)S +3062 H + (f)show 10 -.5 mul h (f)show +10 R +3123(ers)S +3277(you)S +3465(currently)S +3863(have)S +4089(de\256ned.)S +4476(Currently,)S +4922(the)S +5082(only)S +5298(way)S +5502(to)S +1200 V +1260(destroy)S +1594(a)S +1678(frame)S +1950(bu)S +2050 H + (f)show 10 -.5 mul h (f)show +10 R +2111(er)S +2228(is)S +2335(to)S +2453(change)S +2775(the)S +2937(frame)S +3209(bu)S +3309 H + (f)show 10 -.5 mul h (f)show +10 R +3370(er)S +3487(con\256guration,)S +4085(new)S +4291(frame)S +4563(bu)S +4663 H + (f)show 10 -.5 mul h (f)show +10 R +4724(ers)S +4880(\(up)S +5052(to)S +5169(4\))S +5291(will)S +5486(be)S +1320 V +1260(created)S +1586(automatically)S +2169(if)S +2269(requested)S +2690(by)S +2829(the)S +2990(client.)S +3306(The)S +3500(number)S +3845(of)S +3968(frame)S +4240(bu)S +4340 H + (f)show 10 -.5 mul h (f)show +10 R +4401(ers)S +4557(created)S +4884(at)S +4996(startup)S +5308(can)S +5486(be)S +1440 V +1260(controlled)S +1695(using)S +1942(the)S +10 I +2094(-nframes)S +10 R +2479(command-line)S +3086(switch)S +3377(or)S +3490(the)S +10 I +3642(defNFrames)S +10 R +4166(resource.)S +1680 V +1260(The)S +10 B +1453(text)S +1651(display)S +10 R +1996(window)S +2356(gives)S +2605(the)S +2765(\256eld)S +2981(X,Y)S +3189(center,)S +3496(X,Y)S +3704(scale)S +3942(factors,)S +4277(and)S +4460(the)S +4621(X,Y)S +4829(zoom)S +5090(factors.)S +5425(The)S +1800 V +1260(scale)S +1501(factor)S +1774(and)S +1959(the)S +2122(zoom)S +2385(factor)S +2658(will)S +2855(be)S +2990(the)S +3153(same)S +3399(unless)S +10 I +3690(autoscale)S +10 R +4114(is)S +4222(enabled.)S +4598(The)S +4794(scale)S +5034(is)S +5142(in)S +5261(units)S +5497(of)S +1920 V +1260(display)S +1583(pixels)S +1856(per)S +2017(frame)S +2283(bu)S +2383 H + (f)show 10 -.5 mul h (f)show +10 R +2444(er)S +2555(pixel,)S +2814(and)S +2992(is)S +3093(an)S +3221(absolute)S +3589(measure)S +3956(\(it)S +4080(doesn't)S +4409(matter)S +4699(whether)S +5055(or)S +5173(not)S +5336(autos-)S +2040 V +1260(cale)S +1464(is)S +1575(enabled\).)S +1987(Zoom)S +2270(is)S +2381(relative)S +2724(to)S +2845(the)S +3010(autoscale)S +3424(factor,)S +3724(which)S +4011(is)S +4121(1.0)S +4289(if)S +4393(autoscaling)S +4891(is)S +5001(disabled.)S +5402(This)S +2160 V +1260(information)S +1762(is)S +1859(also)S +2050(presented)S +2462(in)S +2570(the)S +2722(Info)S +2918(panel.)S +2400 V +1260(The)S +1446(numbers)S +1821(in)S +1930(the)S +10 B +2083(Zoom)S +2364(box)S +10 R +2551(are)S +2703(zoom)S +2956(factors.)S +3283(Blue)S +3503(numbers)S +3878(zoom,)S +4156(red)S +4314(numbers)S +4689(dezoom.)S +10 I +5061(Zoom)S +5321(In)S +10 R +5436(and)S +2520 V +10 I +1260(Zoom)S +1522(Out)S +10 R +1706(may)S +1912(be)S +2039(used)S +2255(to)S +2366(go)S +2499(to)S +2610(larger)S +2875(or)S +2991(smaller)S +3318(zoom)S +3573(factors,)S +3902(e.g.)S +4079("Ctrl-5")S +4433(followed)S +4821(by)S +4954("Zoom)S +5267(In")S +5424(will)S +2640 V +1260(get)S +1421(you)S +1610(to)S +1727(zoom)S +1988(factor)S +2259(10.)S +2453(Speci\256c)S +2814(zoom)S +3075(factors)S +3385(may)S +3596(also)S +3796(be)S +3929(accessed)S +4316(directly)S +4660(as)S +4782(Control)S +5128(keystrokes,)S +2760 V +1260(e.g.)S +1448(Ctrl-5)S +1731(will)S +1931(set)S +2086(zoom)S +2352(factor)S +2628(5.)S +10 I +2747(Center)S +10 R +3063(centers)S +3389(the)S +3555(\256eld.)S +10 I +3832(Toggle)S +4154(Zoom)S +10 R +4426(toggles)S +4758(between)S +5133(the)S +5298(current)S +2880 V +1260(zoom/center)S +1783(values,)S +2093(and)S +2267(the)S +2419(unzoomed)S +2865(image.)S +3120 V +10 I +1260(Aspect)S +10 R +1564(recomputes)S +2062(the)S +2222(view)S +2454(so)S +2581(that)S +2769(the)S +2929(aspect)S +3217(ratio)S +3439(is)S +3545(1.0.)S +3734(Aspect)S +4050(also)S +4250(integerizes)S +4721(the)S +4882(zoom)S +5143(factor)S +5414(\(use)S +3240 V +1260(the)S +1412(version)S +1736(in)S +1844(the)S +1996(View)S +2242(menu)S +2494(if)S +2585(you)S +2765(don't)S +3006(want)S +3230(integerization\).)S +3480 V +10 I +1260(Fit)S +1408(Frame)S +10 R +1706(makes)S +1993(the)S +2147(display)S +2468(window)S +2822(the)S +2976(same)S +3213(size)S +3400(as)S +3515(the)S +3669(frame)S +3933(bu)S +4033 H + (f)show 10 -.5 mul h (f)show +10 R +4094(er.)S +4228(Note)S +4454(that)S +4636(autoscale)S +5039(has)S +5204(much)S +5458(the)S +3600 V +1260(same)S +1499(e)S +1543 H + (f)show 10 -.5 mul h (f)show +10 R +1604(ect,)S +1779(and)S +1957(allows)S +2252(you)S +2436(to)S +2548(resize)S +2814(the)S +2970(display)S +3293(window)S +3649(to)S +3761(any)S +3938(size)S +4126(you)S +4309(want,)S +4561(or)S +4677(view)S +4904(images)S +5220(too)S +5381(large)S +3720 V +1260(to)S +1368(\256t)S +1482(on)S +1612(the)S +1764(screen.)S +4008 V +9 B +1080(ENHANCEMENT)S +1827(CONTROLS)S +4128 V +10 R +1260(At)S +1398(the)S +1558(top)S +1724(is)S +1829(a)S +1911(scrolled)S +2265(list)S +2426(of)S +2547(all)S +2685(the)S +2845(available)S +3243(colormaps.)S +3722(Click)S +3977(on)S +4115(the)S +4275(one)S +4457(you)S +4645(want)S +4878(to)S +4995(load.)S +5231(You)S +5442(can)S +4248 V +1260(add)S +1447(your)S +1673(own)S +1888(colormaps)S +2347(to)S +2468(this)S +2656(list)S +2822(by)S +2965(de\256ning)S +3336(the)S +10 I +3501(cmap[12])S +10 R +3938(or)S +10 I +4063(cmapDir[12])S +10 R +4638(command)S +5074(line)S +5266(\257ags)S +5497(or)S +4368 V +1260(application)S +1734(resources.)S +4608 V +1260(The)S +1451(two)S +1637(sliders)S +1934(adjust)S +2209(the)S +2367(contrast)S +2719(\(upper)S +3015(slider\))S +3306(and)S +3486(brightness)S +3933(\(lower)S +4229(slider\))S +4520(of)S +4640(the)S +4799(display.)S +5150(The)S +10 I +5342(Invert)S +4728 V +10 R +1260(button)S +1549(inverts)S +1854(the)S +2009(colormap)S +2419(\(multiples)S +2858(the)S +3013(contrast)S +3362(by)S +3495(-1.0\).)S +3744(Note)S +3971(that)S +4154(due)S +4331(to)S +4442(the)S +4597(use)S +4763(of)S +4879(the)S +5033(private)S +5342(color-)S +4848 V +1260(map)S +1464(the)S +1618(sliders)S +1911(are)S +2064(a)S +2140(bit)S +2278(sluggish)S +2644(when)S +2892(dragged)S +3245(to)S +3355(window)S +3709(the)S +3863(display.)S +4209(If)S +4307(this)S +4484(is)S +4583(annoying,)S +5013(using)S +5263(MB3)S +5502(in)S +4968 V +1260(the)S +1412(display)S +1731(window)S +2083(is)S +2180(faster.)S +5208 V +1260(The)S +10 I +1454(Normalize)S +10 R +1910(button)S +2205(\(on)S +2377(the)S +2538(bottom)S +2861(of)S +2983(the)S +3145(control)S +3468(panel\))S +3757(will)S +3953(normalize)S +4392(the)S +4554(enhancement,)S +5145(i.e.)S +5307(set)S +5458(the)S +5328 V +1260(contrast)S +1613(and)S +1794(brightness)S +2242(to)S +2357(the)S +2516(default)S +2830(one-to-one)S +3299(values)S +3590(\(1.0,)S +3809(0.5\).)S +4028(This)S +4242(is)S +4345(the)S +4503(preferred)S +4903(setting)S +5206(for)S +5358(many)S +5448 V +1260(of)S +1381(the)S +1541(pseudocolor)S +2067(colortables)S +2543(and)S +2725(for)S +2879(private)S +3194(colormaps)S +3648(loaded)S +3952(from)S +4184(disk)S +4389(images.)S +4735(The)S +10 I +4929(Initialize)S +10 R +5324(button)S +5568 V +1260(does)S +1473(a)S +1547(reset)S +1765(of)S +1878(the)S +2030(server.)S +5856 V +9 B +1080(BLINK)S +1397(CONTROLS)S +5976 V +10 I +1260(Blink)S +1503(frames)S +10 R +1807(is)S +1907(the)S +2062(list)S +2218(of)S +2334(frames)S +2638(to)S +2749(be)S +2876(blinked.)S +3234(When)S +3505(blink)S +3744(mode)S +3999(is)S +4099(in)S +4210(e)S +4254 H + (f)show 10 -.5 mul h (f)show +10 R +4315(ect)S +4464(ximtool)S +4809(just)S +4987(cycles)S +5269(through)S +6096 V +1260(these)S +1498(frames)S +1802(endlessly,)S +2232(pausing)S +2576("blink)S +2856(rate")S +3079(seconds)S +3428(between)S +3793(each)S +4008(frame.)S +4298(The)S +4486(same)S +4724(frame)S +4989(can)S +5160(be)S +5287(entered)S +6216 V +1260(in)S +1371(the)S +1526(list)S +1682(more)S +1920(than)S +2125(once.)S +2371(To)S +2515(program)S +2886(an)S +3013(arbitrary)S +3389(list)S +3545(of)S +3662(blink)S +3902(frames,)S +4232(hit)S +4372(the)S +4528(Reset)S +4784(button)S +5074(and)S +5252(click)S +5480(on)S +6336 V +1260(each)S +1472(blink)S +1708(frame)S +1970(button)S +2256(until)S +2470(it)S +2556(is)S +2653(set)S +2794(to)S +2902(the)S +3054(desired)S +3372(frame)S +3634(number.)S +6576 V +1260(The)S +10 I +1455(Blink)S +1706(Rate)S +10 R +1929(can)S +2107(be)S +2242(adjusted)S +2616(as)S +2740(slow)S +2970(or)S +3094(as)S +3218(fast)S +3403(as)S +3527(you)S +3718(want)S +3953(using)S +4211(the)S +4374(arrow)S +4647(buttons.)S +5008(If)S +5115(you)S +5306(set)S +5458(the)S +6696 V +1260(blink)S +1496(rate)S +1675(small)S +1922(enough)S +2246(it)S +2332(will)S +2518(go)S +2648(to)S +2756(zero,)S +2982(enabling)S +3356(single)S +3625(step)S +3816(mode)S +4068(\(see)S +4258(below\).)S +6936 V +1260(The)S +10 I +1449(Register)S +10 R +1816(button)S +2106(registers)S +2478(all)S +2612(the)S +2768(blink)S +3008(frames)S +3313(with)S +3525(the)S +3681(current)S +3997(display)S +4320(frame.)S +4612(Frames)S +4941(not)S +5104(in)S +5217(the)S +5374(blink)S +7056 V +1260(list)S +1413(are)S +1564(not)S +1722(a)S +1766 H + (f)show 10 -.5 mul h (f)show +10 R +1827(ected.)S +7296 V +1260(The)S +10 I +1446(Match)S +1732(LUTs)S +10 R +1986(button)S +2273(sets)S +2454(the)S +2607(enhancement)S +3164(of)S +3278(all)S +3409(blink)S +3646(frames)S +3948(to)S +4057(the)S +4210(same)S +4446(values)S +4733(as)S +4848(the)S +5002(display)S +5323(frame.)S +7776 V +900(X11IRAF Project)S +2709(Last change: 10 Dec 1996)S +5480(11)S +7920 V +EP +%%Page: 12 12 +BP +/slant 0 def +/height 1.000000 def +10 R +10 R +480 V +900(XIMTOOL)S +1376(\()S +1425(1)S +1491(\))S +2787(USER COMMANDS )S +4956(XIMTOOL)S +5432(\()S +5481(1)S +5547(\))S +960 V +1260(Frames)S +1584(not)S +1742(in)S +1850(the)S +2002(blink)S +2238(list)S +2391(are)S +2542(not)S +2700(a)S +2744 H + (f)show 10 -.5 mul h (f)show +10 R +2805(ected.)S +1200 V +1260(The)S +10 I +1453(Blink)S +10 R +1702(button)S +1996(turns)S +2234(blink)S +2478(on)S +2616(and)S +2799(o)S +2849 H + (f)show 10 -.5 mul h (f)show +10 R +2910(.)S +2974(When)S +3251(the)S +3412(blink)S +3657(rate)S +3845(is)S +3951(set)S +4101(to)S +4218(zero)S +4428(the)S +4589(Blink)S +4851(button)S +5146(will)S +5341(single)S +1320 V +1260(step)S +1451(through)S +1792(the)S +1944(blink)S +2180(frames,)S +2506(one)S +2680(frame)S +2942(per)S +3099(button)S +3385(press.)S +1560 V +10 B +1260(NOTE:)S +10 R +1615(You)S +1825(can)S +2001(blink)S +2245(no)S +2383(matter)S +2677(what)S +2910(ximtool)S +3261(options)S +3595(are)S +3755(in)S +3872(e)S +3916 H + (f)show 10 -.5 mul h (f)show +10 R +3977(ect,)S +4157(but)S +4324(many)S +4585(of)S +4707(these)S +4951(will)S +5146(slow)S +5374(blink)S +1680 V +1260(down.)S +1541(To)S +1686(get)S +1842(the)S +1998(fastest)S +2287(blink)S +2527(you)S +2711(may)S +2917(want)S +3145(to)S +3257(turn)S +3451(o)S +3501 H + (f)show 10 -.5 mul h (f)show +10 R +3595(the)S +3750(panner)S +4054(and)S +4231(coords)S +4530(box,)S +4738(and)S +4915(match)S +5192(the)S +5347(LUTs)S +1800 V +1260(of)S +1382(all)S +1521(the)S +1682(blink)S +1927(frames.)S +2292(All)S +2459(the)S +2620(ximtool)S +2971(controls)S +3332(are)S +3492(fully)S +3721(active)S +3999(during)S +4300(blink)S +4546(mode,)S +4833(plus)S +5040(you)S +5230(can)S +5408(load)S +1920 V +1260(frames)S +1561(etc.)S +2208 V +9 B +1080(OPTIONS:)S +2328 V +10 B +1260(Panner)S +2448 V +10 R +1510(Toggles)S +1862(whether)S +2213(to)S +2321(display)S +2640(the)S +2792(panner)S +3093(marker.)S +2616 V +10 B +1260(Coords)S +1601(Box)S +2736 V +10 R +1510(Toggles)S +1862(whether)S +2213(to)S +2321(display)S +2640(the)S +2792(coordinate)S +3243(box)S +3423(marker.)S +2904 V +10 B +1260(Autoscale)S +3024 V +10 R +1510(If)S +1613(autoscale)S +2021(is)S +2126(enabled)S +2474(then)S +2684(at)S +2794(zoom=1,)S +3185(the)S +3345(frame)S +3615(bu)S +3715 H + (f)show 10 -.5 mul h (f)show +10 R +3776(er)S +3891(will)S +4085(be)S +4217(automatically)S +4799(scaled)S +5086(to)S +5202(\256t)S +5324(within)S +3144 V +1510(the)S +1667(display)S +1991(window.)S +2373(With)S +2608(autoscale)S +3014(disabled)S +3382(\(the)S +3572(default\),)S +3942(the)S +4099(image)S +4377(scale)S +4610(is)S +4711(more)S +4950(predictable,)S +5452(but)S +3264 V +1510(the)S +1662(image)S +1936(may)S +2138(be)S +2262(clipped)S +2586(by)S +2716(the)S +2868(display)S +3187(window,)S +3564(or)S +3677(may)S +3879(not)S +4037(\256ll)S +4179(the)S +4331(display)S +4650(window.)S +3432 V +10 B +1260(Antialiasing)S +3552 V +10 R +1510(When)S +1780(dezooming)S +2257(an)S +2384(image,)S +2686(i.e.,)S +2866(displaying)S +3316(a)S +3393(large)S +3625(image)S +3902(in)S +4013(a)S +4090(smaller)S +4417(display)S +4739(window,)S +5119(antialiasing)S +3672 V +1510(causes)S +1802(all)S +1933(the)S +2086(data)S +2283(to)S +2392(be)S +2517(used)S +2731(to)S +2840(compute)S +3215(the)S +3368(displayed)S +3782(image.)S +4082(If)S +4179(antialiasing)S +4671(is)S +4769(disabled)S +5133(then)S +5336(image)S +3792 V +1510(is)S +1607(subsampled)S +2109(to)S +2217(compute)S +2592(the)S +2745(displayed)S +3159(image.)S +3459(Antialiasing)S +3979(can)S +4148(prevent)S +4478(subsampling)S +5015(from)S +5240(omitting)S +3912 V +1510(image)S +1792(features)S +2145(that)S +2333(don't)S +2582(fall)S +2753(in)S +2869(the)S +3028(sample)S +3348(grid,)S +3571(but)S +3736(it)S +3829(is)S +3933(signi\256cantly)S +4465(slower)S +4768(than)S +4977(dezooming)S +5458(via)S +4032 V +1510(subsampling.)S +2101(The)S +2286(default)S +2593(is)S +2690(no)S +2820(antialising.)S +4200 V +10 B +1260(Tile)S +1457(Frames)S +4320 V +10 R +1510(The)S +1695(default)S +2002(display)S +2321(mode)S +2573(is)S +2670(to)S +2778(view)S +3002(one)S +3177(frame)S +3440(at)S +3543(a)S +3618(time.)S +3852(In)S +3966(tile)S +4125(frames)S +4427(mode,)S +4705(2)S +4786(or)S +4900(4)S +4981(frames)S +5283(may)S +5486(be)S +4440 V +1510(viewed)S +1834(simultaneously)S +2476(in)S +2590(the)S +2748(display)S +3073(window.)S +3486(All)S +3650(the)S +3808(usual)S +4055(operations)S +4507(\(zoom)S +4798(and)S +4977(pan,)S +5181(colortable)S +4560 V +1510(enhancement,)S +2091(cursor)S +2370(readback,)S +2784(etc.\))S +2988(still)S +3169(work)S +3404(for)S +3550(each)S +3762(frame)S +4024(even)S +4242(when)S +4488(in)S +4596(tile)S +4754(frames)S +5055(mode.)S +4728 V +10 B +1260(Warnings)S +4848 V +10 R +1510(The)S +1701(warnings)S +2103(options)S +2435(toggles)S +2761(whether)S +3119(you)S +3306(see)S +3470(warning)S +3834(dialog)S +4121(boxes)S +4391(in)S +4506(situations)S +4927(like)S +5114(overwriting)S +4968 V +1510(an)S +1634(existing)S +1981(\256le,)S +2164(clearing)S +2515(the)S +2667(frame)S +2929(bu)S +3029 H + (f)show 10 -.5 mul h (f)show +10 R +3090(er,)S +3222(etc.)S +5256 V +9 B +900(COLORMAP)S +1462(SELECTION)S +5376 V +10 R +1260(By)S +1410(default)S +1721(XImtool)S +2094(will)S +2284(display)S +2607(images)S +2924(using)S +3175(either)S +3436(a)S +3514(grayscale)S +3924(colormap)S +4335(\(e.g.)S +4576(if)S +4671(loaded)S +4971(by)S +5105(a)S +5183(client\),)S +5497(or)S +5496 V +1260(a)S +1346(private)S +1665(colormap)S +2084(when)S +2342(loading)S +2684(an)S +2820(image)S +3106(from)S +3342(disk)S +3551(that)S +3743(contains)S +4118(a)S +4204(colormap.)S +4648(Each)S +4888(frame)S +5161(de\256nes)S +5485(its)S +5616 V +1260(own)S +1470(colormap)S +1885(so)S +2013(you)S +2202(can)S +2379(de\256ne)S +2662(di)S +2740 H + (f)show 10 -.5 mul h (f)show +10 R +2801(erent)S +3039(colormaps)S +3494(or)S +3616(enhancements)S +4220(for)S +4375(each)S +4596(frame,)S +4892(they)S +5103(will)S +5298(change)S +5736 V +1260(automatically)S +1834(as)S +1947(you)S +2127(cycle)S +2367(through)S +2708(the)S +2860(frames.)S +6024 V +9 B +1080(BUILTIN)S +1487(COLORMAPS)S +6144 V +10 R +1260(Once)S +1501(loaded,)S +1823(the)S +1976(colormap)S +2384(may)S +2588(either)S +2847(be)S +2973(changed)S +3337(using)S +3586(the)S +3740(builtin)S +4034(colormap)S +4443(menu)S +4697(under)S +4956(the)S +5110(View)S +5358(menu)S +6264 V +1260(button)S +1559(on)S +1702(the)S +1867(main)S +2110(window,)S +2500(or)S +2625(from)S +2861(the)S +3025(Enhancement)S +3610(box)S +3802(on)S +3944(the)S +4108(control)S +4433(panel.)S +4716(XImtool)S +5097(has)S +5272(about)S +5536(a)S +6384 V +1260(dozen)S +1556(colormap)S +1991(options)S +2344(builtin,)S +2689(other)S +2952(user-de\256ned)S +3503(colormaps)S +3977(may)S +4208(optionally)S +4673(be)S +4826(loaded.)S +5206(It)S +5326(is)S +5452(not)S +6504 V +1260(presently)S +1656(possible)S +2014(to)S +2122(save)S +2329(colormaps)S +2775(for)S +2921(later)S +3128(use.)S +6792 V +9 B +1080(USER-DEFINED)S +1782(COLORMAPS)S +6912 V +10 R +1260(The)S +10 I +1454(cmap[12])S +10 R +1887(and)S +10 I +2070(cmapDir[12])S +10 R +2642(resources)S +3057(\(or)S +3212(command)S +3645(line)S +3834(arguments\))S +4322(are)S +4482(used)S +4705(to)S +4823(tell)S +4991(which)S +5275(speci\256c)S +7032 V +1260(colormaps)S +1719(to)S +1840(make)S +2099(available)S +2502(or)S +2628(where)S +2914(to)S +3035(look)S +3256(for)S +3415(colortables)S +3895(respectively.)S +4474(The)S +4671(colortables)S +5151(are)S +5314(loaded)S +7152 V +1260(when)S +1519(ximtool)S +1874(starts)S +2128(up,)S +2296(or)S +2422(when)S +2681(it)S +2780(is)S +2890(reinitialized)S +3410(\(e.g.)S +3630(by)S +3773(pressing)S +4149(the)S +4314(Initialize)S +4712(button)S +5011(in)S +5132(the)S +5297(control)S +7272 V +1260(panel\).)S +1598(XImtool)S +1971(will)S +2161(ignore)S +2450(any)S +2628(\256les)S +2829(in)S +2941(the)S +3097(colormap)S +3508(directory)S +3901(which)S +4178(do)S +4311(not)S +4472(look)S +4683(like)S +4866(colortables.)S +5392(New)S +7752 V +900(X11IRAF Project)S +2709(Last change: 10 Dec 1996)S +5480(12)S +7920 V +EP +%%Page: 13 13 +BP +/slant 0 def +/height 1.000000 def +10 R +10 R +480 V +900(XIMTOOL)S +1376(\()S +1425(1)S +1491(\))S +2787(USER COMMANDS )S +4956(XIMTOOL)S +5432(\()S +5481(1)S +5547(\))S +960 V +1260(colortables)S +1728(will)S +1914(also)S +2105(be)S +2229(added)S +2497(automatically)S +3071(for)S +3217(each)S +3429(image)S +3703(loaded)S +3999(from)S +4223(disk.)S +1200 V +1260(The)S +1451(format)S +1753(of)S +1872(a)S +1952(user)S +2154(lookup)S +2468(table)S +2698(is)S +2801(very)S +3015(simple:)S +3347(each)S +3566(row)S +3758(de\256nes)S +4078(one)S +4259(colortable)S +4695(entry,)S +4962(and)S +5143(consists)S +5497(of)S +1320 V +1260(three)S +1489(columns)S +1858(de\256ning)S +2216(the)S +2368(red,)S +2550(green,)S +2826(and)S +3000(blue)S +3202(values)S +3487(scaled)S +3766(to)S +3874(the)S +4026(range)S +4277(0.0)S +4432(\(o)S +4515 H + (f)show 10 -.5 mul h (f)show +10 R +4576(\))S +4639(to)S +4747(1.0)S +4902(\(full)S +5104(intensity\).)S +1560 V +1500(R)S +1597(G)S +1699(B)S +1680 V +1500(R)S +1597(G)S +1699(B)S +1800 V +1500(\(etc.\))S +2040 V +1260(Blank)S +1529(and)S +1703(comment)S +2105(lines)S +2324(\(lines)S +2576(beginning)S +3006(with)S +3214(a)S +3288('#'\))S +3467(are)S +3618(ignored.)S +2280 V +1260(Usually)S +1605(256)S +1789(rows)S +2017(are)S +2172(provided,)S +2586(but)S +2748(the)S +2904(number)S +3243(may)S +3449(actually)S +3799(be)S +3927(anything)S +4311(in)S +4423(the)S +4579(range)S +4834(1)S +4918(to)S +5031(256.)S +5241(XImtool)S +2400 V +1260(will)S +1451(interpolate)S +1912(the)S +2068(table)S +2296(as)S +2413(necessary)S +2834(to)S +2946(compute)S +3324(the)S +3480(colortable)S +3913(values)S +4202(used)S +4419(in)S +4531(XImtool.)S +4929(XImtool)S +5302(uses)S +5508(at)S +2520 V +1260(most)S +1485(201)S +1665(colors)S +1939(to)S +2047(render)S +2331(pixel)S +2561(data,)S +2782(so)S +2901(it)S +2987(is)S +3084(usually)S +3403(necessary)S +3820(to)S +3928(interpolate)S +4385(the)S +4537(table)S +4761(when)S +5007(it)S +5093(is)S +5190(loaded.)S +2760 V +1260(The)S +1446(name)S +1693(of)S +1807(the)S +1960(colortable)S +2390(as)S +2504(it)S +2591(will)S +2778(appear)S +3074(in)S +3183(the)S +3336(XImtool)S +3706(control)S +4020(panel)S +4267(is)S +4365(the)S +4518(root)S +4710(name)S +4957(of)S +5072(the)S +5226(\256le,)S +5411(e.g.,)S +2880 V +1260(if)S +1365(the)S +1531(\256le)S +1703(is)S +1814("rainbow.lut")S +2398(the)S +2564(colortable)S +3007(name)S +3267(will)S +3467(be)S +3605("rainbow".)S +4083(Lower)S +4387(case)S +4602(names)S +4901(are)S +5065(suggested)S +5502(to)S +3000 V +1260(avoid)S +1525(name)S +1784(collisions)S +2211(with)S +2432(the)S +2597(builtin)S +2902(colortables.)S +3408(Private)S +3734(colormaps)S +4193(for)S +4352(disk)S +4562(images)S +4888(will)S +5088(be)S +5226(have)S +5458(the)S +3120 V +1260(same)S +1497(name)S +1745(as)S +1860(the)S +2014(image)S +2290(loaded.)S +2613(If)S +2711(the)S +2865(same)S +3102(colortable)S +3533(\256le)S +3693(appears)S +4029(in)S +4139(multiple)S +4505(user)S +4703(colortable)S +5134(directories,)S +3240 V +1260(the)S +1412(\256rst)S +1598(one)S +1772(found)S +2035(will)S +2221(be)S +2345(used.)S +3528 V +9 B +1080(MINIMIZING)S +1677(COLORMAP)S +2239(CONFLICTS)S +3648 V +10 R +1260(The)S +1456(Gterm)S +1752(widget)S +2065(used)S +2289(by)S +2430(XImtool)S +2810(\(i.e.)S +3006(the)S +3169(main)S +3410(display)S +3740(window\))S +4136(uses)S +4349(a)S +4434(private)S +4753(global)S +5045(colormap)S +5464(for)S +3768 V +1260(display,)S +1615(this)S +1801(allows)S +2103(it)S +2200(to)S +2319(have)S +2548(greater)S +2865(control)S +3189(over)S +3407(color)S +3653(cell)S +3838(allocation)S +4273(but)S +4441(can)S +4619(occasionally)S +5158(also)S +5359(cause)S +3888 V +1260("colormap)S +1712(\257ashing")S +2104(as)S +2221(the)S +2377(mouse)S +2672(is)S +2773(moved)S +3079(in)S +3191(and)S +3370(out)S +3533(of)S +3651(the)S +3808(application.)S +4372(The)S +4562(problem)S +4930(here)S +5136(is)S +5238(that)S +5423(in)S +5536(a)S +4008 V +1260(system)S +1572(with)S +1784(only)S +1996(an)S +2124(8-bit)S +2347(colormap)S +2758(\(256)S +2975(colors\))S +3286(all)S +3420(applications)S +3937(must)S +4165(compete)S +4536(for)S +4685(colors,)S +4987(programs)S +5397(such)S +4128 V +1260(as)S +1380(XV)S +1561(or)S +1681(Netscape)S +2083(allocate)S +2430(colors)S +2711(from)S +2942(the)S +3102(default)S +3417(colormap)S +3832(leaving)S +4164(only)S +4380(a)S +4462(few)S +4649(free)S +4841(cells)S +5062(for)S +5216(XImtool.)S +4248 V +1260(Since)S +1513(XImtool)S +1883(de\256nes)S +2197(a)S +2271(private)S +2578(global)S +2858(colormap)S +3265(it)S +3351(is)S +3448(still)S +3629(able)S +3825(to)S +3933(allocate)S +4273(the)S +4425(needed)S +4737(cells)S +4950(rather)S +5212(than)S +5414(fail-)S +4368 V +1260(ing,)S +1449(but)S +1613(it's)S +1777(allocating)S +2207(cells)S +2426(already)S +2755(used)S +2974(by)S +3110(other)S +3351(applications.)S +3925(As)S +4072(the)S +4230(mouse)S +4527(moves)S +4824(out)S +4989(of)S +5109(the)S +5268(ximtool)S +4488 V +1260(window)S +1623(those)S +1875(cells)S +2099(are)S +2261(once)S +2490(again)S +2747(de\256ned)S +3082(in)S +3201(terms)S +3464(of)S +3587(the)S +3749(default)S +4066(colormap,)S +4508(so)S +4637(the)S +4799(ximtool)S +5151(window)S +5513(is)S +4608 V +1260(then)S +1470(using)S +1725(a)S +1807(di)S +1885 H + (f)show 10 -.5 mul h (f)show +10 R +1946(erent)S +2183(colormap.)S +2653(It)S +2752(is)S +2857(this)S +3040(switching)S +3467(of)S +3588(the)S +3748(colormap)S +4164(context)S +4497(that)S +4686(causes)S +4985(the)S +5146(\257ashing)S +5502(to)S +4728 V +1260(occur,)S +1536(but)S +1694(there)S +1923(are)S +2074(a)S +2148(few)S +2327(things)S +2602(that)S +2782(can)S +2950(be)S +3074(done)S +3298(to)S +3406(help)S +3608(minimize)S +4016(this.)S +4968 V +1260(XImtool)S +1640(logically)S +2031(de\256nes)S +2356(200)S +2548(colors)S +2834(which)S +3120(the)S +3284(client)S +3548(image)S +3834(display)S +4165(program)S +4545(can)S +4725(use)S +4900(to)S +5020(render)S +5316(pixels.)S +5088 V +1260(However,)S +1687(ximtool)S +2036(may)S +2245(or)S +2365(may)S +2574(not)S +2739(actually)S +3092(allocate)S +3439(all)S +3576(of)S +3695(those)S +3942(colors.)S +4277(By)S +4430(default)S +4743(it)S +4835(currently)S +5231(allocates)S +5208 V +1260(only)S +1479(about)S +1743(192)S +1935(colors,)S +2246(to)S +2366(reserve)S +2695(64)S +2837(colors)S +3123(for)S +3281(the)S +3445(other)S +3692(windows)S +4095(on)S +4237(the)S +4401(screen.)S +4752(You)S +4966(don't)S +5219(normally)S +5328 V +1260(notice)S +1539(this)S +1719(as)S +1837(1\))S +1955(usually)S +2279(the)S +2436(default)S +2748(screen)S +3037(colormap)S +3449(has)S +3617(enough)S +3946(free)S +4135(cells)S +4353(to)S +4466(allow)S +4722(ximtool)S +5068(to)S +5180(match)S +5458(the)S +5448 V +1260(colors,)S +1570(and)S +1755(2\))S +1879(the)S +2042(extra)S +2282(unallocated)S +2784(cells)S +3009(correspond)S +3494(to)S +3614(the)S +3778(brightest)S +4170(pixels)S +4451(in)S +4571(the)S +4735(rendered)S +5125(image,)S +5436(and)S +5568 V +1260(these)S +1496(colors)S +1771(may)S +1974(not)S +2132(be)S +2256(used)S +2469(or)S +2582(usually)S +2901(only)S +3109(correspond)S +3582(to)S +3690(a)S +3764(few)S +3943(small)S +4190(regions)S +4514(near)S +4715(the)S +4867(saturated)S +5257(cores)S +5497(of)S +5688 V +1260(bright)S +1529(objects.)S +5928 V +1260(You)S +1465(can)S +1636(eliminate)S +2041(this)S +2219(problem)S +2585(by)S +2718(setting)S +3018(the)S +10 I +3173(basePixel)S +10 R +3594(resource)S +3965(to)S +4077(e.g.)S +4285(48)S +4419(instead)S +4736(of)S +4853(64,)S +5012(which)S +5290(will)S +5480(let)S +6048 V +1260(the)S +1428(gterm)S +1707(widget)S +2025(allocate)S +2381(all)S +2527(200)S +2723(colors.)S +3068(However,)S +3504(this)S +3695(isn't)S +3918(recommended)S +4528(for)S +4689(normal)S +5017(use)S +5195(as)S +5323(it)S +5424(will)S +6168 V +1260(increase)S +1624(the)S +1784(likelihood)S +2228(of)S +2349(colormap)S +2764(\257ashing.)S +3174(If)S +3278(you)S +3466(change)S +10 I +3787(basePixel)S +10 R +4175(,)S +4239(either)S +4505(restart)S +4793(the)S +4954(X)S +5065(server)S +5347(or)S +5469(set)S +6288 V +1260(the)S +1418(resource)S +10 I +1791(cmapInitialize)S +10 R +2363(=)S +10 I +2419(True)S +10 R +2644(to)S +2758(force)S +2998(the)S +3156(gterm)S +3425(widget)S +3732(to)S +3845(update)S +4146(its)S +4276(global)S +4561(colormap)S +4973(resource)S +5345(in)S +5458(the)S +6408 V +1260(X)S +1362(server.)S +1660(The)S +1845(colormap)S +2252(resource)S +2619(may)S +2821(also)S +3012(be)S +3136(deleted)S +3454(by)S +3584(using)S +3831(the)S +3983(command)S +6648 V +10 I +1980(xprop)S +2243(-root)S +2473(-remove)S +2829(GT_image)S +6888 V +10 R +1260(These)S +1528(options)S +1853(may)S +2055(also)S +2246(be)S +2370(set)S +2511(on)S +2641(the)S +2793(command)S +3217(line)S +3397(when)S +3643(\256rst)S +3829(starting)S +4159(up.)S +7128 V +1260(In)S +1388(general)S +1726(one)S +1915(can)S +2098(set)S +2254(the)S +2421(Gterm)S +2721(widget)S +3039(resources)S +10 I +3461(basePixel)S +10 R +3895(and)S +10 I +4085(maxColors)S +10 R +4570(to)S +4694(specify)S +5028(the)S +5196(region)S +5497(of)S +7248 V +1260(colormap)S +1680(space)S +1944(to)S +2065(be)S +2202(used)S +2428(for)S +2587(image)S +2874(display.)S +3261(If)S +3370(you)S +3563(set)S +10 I +3717(maxColors)S +10 R +4199(to)S +4320(a)S +4407(small)S +4667(value,)S +4951(the)S +5116(200)S +5308(logical)S +7728 V +900(X11IRAF Project)S +2709(Last change: 10 Dec 1996)S +5480(13)S +7920 V +EP +%%Page: 14 14 +BP +/slant 0 def +/height 1.000000 def +10 R +10 R +480 V +900(XIMTOOL)S +1376(\()S +1425(1)S +1491(\))S +2787(USER COMMANDS )S +4956(XIMTOOL)S +5432(\()S +5481(1)S +5547(\))S +960 V +1260(colors)S +1541(de\256ned)S +1872(by)S +2009(the)S +2168(widget)S +2477(will)S +2670(be)S +2801(mapped)S +3154(by)S +3291(the)S +3450(imtool)S +3749(color)S +3991(model)S +4278(into)S +4471(whatever)S +4873(number)S +5215(of)S +5336(colors)S +1080 V +1260(are)S +1417(actually)S +1769(available)S +2165(to)S +2279(the)S +2437(widget.)S +2800(For)S +2974(example,)S +3372(in)S +3485(the)S +3642(default)S +3954(setup,)S +4225(200)S +4410(color)S +4650(values)S +4940(are)S +5096(really)S +5358(being)S +1200 V +1260(mapped)S +1606(into)S +1792(192)S +1972(color)S +2207(cells)S +2420(used)S +2633(for)S +2779(display,)S +3123(the)S +3275(remaining)S +3710(colors)S +3984(are)S +4135(used)S +4348(for)S +4494(buttons,)S +4845(menus)S +5137(etc)S +5284(and)S +5459(are)S +1320 V +1260(allocated)S +1650(from)S +1874(the)S +2026(default)S +2333(colormap)S +2740(by)S +2870(the)S +3022(X)S +3124(toolkit)S +3416(when)S +3662(the)S +3814(application)S +4288(starts)S +4529(up.)S +1560 V +1260(Even)S +1501(though)S +1815(the)S +1973(Gterm)S +2264(widget)S +2572(uses)S +2780(a)S +2860(private)S +3174(colormap,)S +3613(it)S +3706(is)S +3810(a)S +3891(private)S +10 I +4205(global)S +10 R +4498(colormap)S +4912(meaning)S +5293(that)S +5480(all)S +1680 V +1260(Gterm)S +1550(widgets)S +1896(share)S +2141(the)S +2298(same)S +2537(colormap.)S +3003(An)S +3159(example)S +3531(of)S +3648(colormap)S +4059(sharing)S +4387(in)S +4499(ximtool)S +4845(is)S +4946(the)S +5102(main)S +5336(image)S +1800 V +1260(window)S +1619(and)S +1800(the)S +1959(colorbar)S +2328(window.)S +2742(These)S +3017(are)S +3175(two)S +3362(separate)S +3725(gterm)S +3995(widgets)S +4343(that)S +4530(share)S +4777(the)S +4936(same)S +5178(colormap.)S +1920 V +1260(They)S +1506(have)S +1735(to)S +1854(share)S +2105(the)S +2268(same)S +2514(colormap,)S +2957(as)S +3080(otherwise)S +3508(when)S +3764(you)S +3954(windowed)S +4410(the)S +4572(main)S +4812(image)S +5096(window)S +5458(the)S +2040 V +1260(colorbar)S +1630(window)S +1990(would)S +2278(not)S +2444(accurately)S +2891(re\257ect)S +3178(the)S +3338(modi\256ed)S +3732(colormap.)S +4203(By)S +4359(default)S +4675(two)S +4864(separate)S +5229(ximtools)S +2160 V +1260(would)S +1556(also)S +1763(share)S +2019(the)S +2186(same)S +2436(colormap)S +2858(meaning)S +3247(contrast)S +3608(enhancements)S +4218(in)S +4341(one)S +4530(window)S +4897(would)S +5192(a)S +5236 H + (f)show 10 -.5 mul h (f)show +10 R +5297(ect)S +5458(the)S +2280 V +1260(other.)S +1563(By)S +1723(resetting)S +2110(the)S +10 I +2275(cmapName)S +10 R +2767(command)S +3204(line)S +3397(option)S +3696(or)S +3822(resource)S +4203(you)S +4397(can)S +4579(change)S +4905(the)S +5071(name)S +5331(of)S +5458(the)S +2400 V +1260(private)S +1582(colormap)S +2004(used)S +2232(causing)S +2582(separate)S +2953(ximtools)S +3349(to)S +3472(use)S +3650(di)S +3728 H + (f)show 10 -.5 mul h (f)show +10 R +3789(erent)S +4033(colormaps,)S +4519(but)S +4692(note)S +4909(this)S +5099(also)S +5304(creates)S +2520 V +1260(colormap)S +1671(\257ashing)S +2022(between)S +2388(the)S +2544(two)S +2728(windows)S +3123(that)S +3307(cannot)S +3607(easily)S +3874(be)S +4002(avoided.)S +4407(By)S +4559(setting)S +4861(the)S +10 I +5018(cmapName)S +10 R +5502(to)S +2640 V +1260("default")S +1649(the)S +1801(widget)S +2103(will)S +2289(allocate)S +2629(colors)S +2903(from)S +3127(the)S +3279(default)S +3586(colormap,)S +4018(but)S +4176(this)S +4351(is)S +4448(of)S +4561(little)S +4775(use)S +4938(at)S +5040(the)S +5192(moment.)S +2880 V +1260(There)S +1524(are)S +1677(a)S +1753(number)S +2090(of)S +2205(other)S +2442(resources)S +2850(that)S +3032(can)S +3202(be)S +3328(used)S +3543(to)S +3653(modify)S +3974(the)S +4129(behavior)S +4511(of)S +4627(the)S +4782(Gterm)S +5070(widget)S +5375(color)S +3000 V +1260(management)S +1801(scheme,)S +2156(but)S +2315(these)S +2551(are)S +2703(the)S +2856(most)S +3082(useful)S +3356(ones.)S +3624(For)S +3793(question)S +4162(and)S +4336(further)S +4637(information)S +5139(feel)S +5318(free)S +5502(to)S +3120 V +1260(contact)S +10 I +1578(iraf@noao.edu)S +10 R +2184(.)S +3408 V +9 B +900(LOAD)S +1187(PANEL)S +3528 V +10 R +1260(The)S +1448(Load)S +1687(Panel)S +1943(allows)S +2238(you)S +2422(load)S +2628(images)S +2945(from)S +3173(disk)S +3374(directly)S +3713(to)S +3825(the)S +3981(frame)S +4247(bu)S +4347 H + (f)show 10 -.5 mul h (f)show +10 R +4408(er,)S +4544(this)S +4723(is)S +4824(analogous)S +5263(to)S +5375(load-)S +3648 V +1260(ing)S +1439(an)S +1584(image)S +1879(on)S +2030(the)S +2203(command)S +2648(line)S +2848(except)S +3158(that)S +3358(browsing)S +3780(is)S +3897(possible.)S +4300(At)S +4450(present)S +4788(recognized)S +5275(formats)S +3768 V +1260(include)S +1587(IRAF)S +1848(OIF)S +2042(format)S +2341(\(i.e.)S +10 I +2529(.imh)S +10 R +2737(extension\),)S +3211(simple)S +3511(FITS)S +3750(\256les,)S +3975(GIF,)S +4195(and)S +4373(Sun)S +4563(raster\256les.)S +5040(The)S +5229(task)S +5424(will)S +3888 V +1260(automatically)S +1850(sense)S +2112(the)S +2280(format)S +2592(of)S +2721(the)S +2888(image)S +3177(and)S +3366(load)S +3583(it)S +3684(appropriately.)S +4286(Images)S +4619(with)S +4842(private)S +5164(colormaps)S +4008 V +1260(\(such)S +1515(as)S +1637(GIF\))S +1870(will)S +2065(be)S +2198(loaded)S +2503(using)S +2759(the)S +2920(private)S +3236(colormap)S +3652(\(meaning)S +4068(that)S +4257(changing)S +4663(the)S +4825(brightness/contrast)S +4128 V +1260(enhancements)S +1861(will)S +2053(render)S +2343(a)S +2423(random-colored)S +3096(image\),)S +3434(all)S +3570(others)S +3850(will)S +4042(be)S +4172(loaded)S +4474(with)S +4688(a)S +4767(grayscale)S +5178(colormap.)S +4248 V +1260(If)S +1363(the)S +10 I +1522(Grayscale)S +10 R +1969(button)S +2262(is)S +2366(enabled)S +2713(the)S +2872(image)S +3153(colormap)S +3567(will)S +3760(be)S +3891(converted)S +4321(to)S +4437(grayscale)S +4851(and)S +5033(loaded)S +5337(as)S +5458(the)S +4368 V +1260(standard)S +1633(grayscale)S +2044(colormap.)S +2511(The)S +2701(Load)S +2941(panel)S +3192(will)S +3383(close)S +3623(automatically)S +4202(once)S +4425(the)S +4582(image)S +4861(has)S +5029(loaded)S +5330(unless)S +4488 V +1260(the)S +10 I +1412(Browse)S +10 R +1742(button)S +2028(has)S +2191(been)S +2409(set.)S +4728 V +1260(When)S +1531(loading)S +1864(new)S +2063(images)S +2379(the)S +2534(frame)S +2799(bu)S +2899 H + (f)show 10 -.5 mul h (f)show +10 R +2960(er)S +3070(con\256guration)S +3636(table)S +3863(will)S +4053(be)S +4181(searched)S +4563(for)S +4713(a)S +4791(frame)S +5057(bu)S +5157 H + (f)show 10 -.5 mul h (f)show +10 R +5218(er)S +5329(that)S +5513(is)S +4848 V +1260(the)S +1417(same)S +1657(size)S +1847(or)S +1965(larger)S +2231(than)S +2437(the)S +2593(new)S +2793(image)S +3071(size,)S +3285(if)S +3380(no)S +3514(frame)S +3780(bu)S +3880 H + (f)show 10 -.5 mul h (f)show +10 R +3941(er)S +4052(can)S +4224(be)S +4352(found)S +4619(a)S +4697(custom)S +5020(bu)S +5120 H + (f)show 10 -.5 mul h (f)show +10 R +5181(er)S +5292(exactly)S +4968 V +1260(the)S +1420(size)S +1613(of)S +1734(the)S +1894(image)S +2176(will)S +2370(be)S +2502(created.)S +2852(This)S +3068(means)S +3361(that)S +3549(the)S +3709(image)S +3991(may)S +4201(not)S +4367(\256ll)S +4517(the)S +4677(display)S +5004(window)S +5364(when)S +5088 V +1260(loaded,)S +1596(or)S +1724(you)S +1919(may)S +2136(see)S +2308(a)S +2397(subsection)S +2864(of)S +2992(the)S +3159(image)S +3447(in)S +3569(the)S +3735(main)S +3979(display)S +4312(window.)S +4703(Setting)S +5031(the)S +10 I +5197(autoscale)S +5208 V +10 R +1260(option)S +1557(will)S +1754(scale)S +1994(the)S +2157(entire)S +2425(image)S +2710(to)S +2829(\256t)S +2954(the)S +3117(main)S +3358(display)S +3688(window,)S +4076(the)S +4239(full)S +4419(frame)S +4692(bu)S +4792 H + (f)show 10 -.5 mul h (f)show +10 R +4853(er)S +4971(will)S +5168(always)S +5486(be)S +5328 V +1260(visible)S +1557(in)S +1665(the)S +1817(Panner)S +2124(marker)S +2436(window.)S +5568 V +1260(Images)S +1578(with)S +1786(more)S +2021(colors)S +2295(than)S +2497(can)S +2665(be)S +2789(displayed)S +3202(will)S +3389(automatically)S +3964(be)S +4089(quantized)S +4508(to)S +4617(the)S +4770(number)S +5106(of)S +5220(available)S +5688 V +1260(colors)S +1546(before)S +1842(display,)S +2198(24-bit)S +2479(formats)S +2826(are)S +2988(not)S +3157(currently)S +3558(supported)S +3993(\(but)S +4195(may)S +4408(be)S +4543(in)S +4662(the)S +4825(future)S +5104(and)S +5289(will)S +5486(be)S +5808 V +1260(similarly)S +1646(quantized\).)S +6048 V +1260(Formats)S +1620(which)S +1896(permit)S +2189(larger)S +2454(than)S +2659(8-bit)S +2881(pixels)S +3153(will)S +3342(be)S +3469(sampled)S +3835(on)S +3968(a)S +4045(grid)S +4239(to)S +4350(determine)S +4782(an)S +4909(optimal)S +5248(range)S +5502(in)S +6168 V +1260(the)S +1418(data)S +1620(to)S +1734(be)S +1864(used)S +2083(to)S +2197(compute)S +2577(a)S +2657(linear)S +2920(transformation)S +3544(to)S +3658(the)S +3816(number)S +4157(of)S +4275(display)S +4599(colors.)S +4903(This)S +5116(is)S +5218(the)S +5375(same)S +6288 V +1260(sampling)S +1660(and)S +1837(transformation)S +2458(used)S +2674(by)S +2807(the)S +2962(IRAF)S +10 I +3223(DISPLAY)S +10 R +3645(task)S +3839(when)S +4089(computing)S +4551(the)S +10 I +4707(z1/z2)S +10 R +4947(values)S +5236(and)S +5414(pro-)S +6408 V +1260(vides)S +1501(a)S +1575(much)S +1827(better)S +2084(initial)S +2348(display)S +2667(than)S +2869(simple)S +3166(truncation)S +3601(to)S +3709(8-bits.)S +6576 V +10 B +1260(Directory)S +1699(Browsing)S +6696 V +10 R +1510(The)S +1702(load)S +1911(panel)S +2165(contains)S +2536(a)S +2618(list)S +2779(of)S +2900(\256les)S +3105(in)S +3221(the)S +3381(current)S +3701(directory)S +4099(that)S +4287(may)S +4497(be)S +4629(selected)S +4988(for)S +5142(loading)S +5480(by)S +6816 V +1510(selecting)S +1901(with)S +2115(left)S +2284(mouse)S +2581(button.)S +2898(If)S +3000(the)S +3158(\256le)S +3322(is)S +3425(a)S +3504(directory)S +3899(the)S +4056(contents)S +4424(of)S +4542(the)S +4699(new)S +4900(directory)S +5295(will)S +5486(be)S +6936 V +1510(loaded,)S +1836(if)S +1932(it's)S +2095(a)S +2174(plain)S +2409(\256le)S +2572(an)S +2701(attempt)S +3036(will)S +3227(be)S +3356(made)S +3607(to)S +3720(load)S +3927(it)S +4018(as)S +4137(an)S +4267(image)S +4547(otherwise)S +4971(an)S +5101(error)S +5330(popup)S +7056 V +1510(will)S +1706(appear.)S +2065(Directories)S +2547(in)S +2664(the)S +2825(list)S +2987(are)S +3147(identi\256ed)S +3564(with)S +3781(a)S +3864(trailing)S +4192('/')S +4325(character,)S +4753(you)S +4942(will)S +5137(always)S +5453(see)S +7176 V +1510(any)S +1684(subdirectories)S +2274(listed)S +2521(even)S +2739(if)S +2830(a)S +2904(\256lter)S +3123(is)S +3220(speci\256ed.)S +7680 V +900(X11IRAF Project)S +2709(Last change: 10 Dec 1996)S +5480(14)S +7920 V +EP +%%Page: 15 15 +BP +/slant 0 def +/height 1.000000 def +10 R +10 R +480 V +900(XIMTOOL)S +1376(\()S +1425(1)S +1491(\))S +2787(USER COMMANDS )S +4956(XIMTOOL)S +5432(\()S +5481(1)S +5547(\))S +960 V +1510(The)S +10 I +1698(Root)S +10 R +1920(button)S +2209(will)S +2398(reset)S +2619(the)S +2774(current)S +3089(directory)S +3482(to)S +3593(the)S +3748(system)S +4059(root)S +4254(directory.)S +4673(The)S +10 I +4862(Home)S +10 R +5134(button)S +5424(will)S +1080 V +1510(reset)S +1730(the)S +1884(current)S +2198(directory)S +2590(to)S +2700(the)S +2854(user's)S +3124(login)S +3362(directory,)S +3779(the)S +10 I +3932(Up)S +10 R +4085(button)S +4372(moves)S +4664(up)S +4795(one)S +4970(directory)S +5361(level,)S +1200 V +1510(and)S +10 I +1688(Rescan)S +10 R +2010(reloads)S +2332(the)S +2488(\256le)S +2650(list)S +2807(by)S +2942(rescanning)S +3409(the)S +3566(directory.)S +3986(The)S +4176(current)S +4493(working)S +4861(directory)S +5256(is)S +5358(given)S +1320 V +1510(below)S +1784(the)S +1936(\256le)S +2094(selection)S +2479(window.)S +1488 V +10 B +1260(File)S +1451(Patterns)S +1608 V +10 R +1510(By)S +1663(default)S +1976(all)S +2112(\256les)S +2315(and)S +2495(directories)S +2952(will)S +3144(be)S +3274(listed.)S +3552(You)S +3760(may)S +3968(specify)S +4292(a)S +4372(\256lter)S +4597(to)S +4711(e.g.)S +4891(select)S +5154(only)S +5369(those)S +1728 V +1510(\256les)S +1718(with)S +1936(a)S +2020(given)S +2282(extension)S +2705(like)S +2895(")S +10 Y +2936(*)S +10 R +2986(.\256ts")S +3215(to)S +3333(list)S +3496(only)S +3714(\256les)S +3921(with)S +4139(a)S +4223(".\256ts")S +4493(extension.)S +4941(Directories)S +5424(will)S +1848 V +1510(always)S +1830(be)S +1967(seen)S +2187(in)S +2308(the)S +2473(list)S +2639(and)S +2826(are)S +2990(identi\256ed)S +3411(with)S +3632(a)S +3719(trailing)S +4051('/')S +4188(character.)S +4621(Any)S +4837(valid)S +5081(unix)S +5303(pattern)S +1968 V +1510(matching)S +1912(string)S +2170(will)S +2356(be)S +2480(recognized.)S +2136 V +10 B +1260(Direct)S +1555(File)S +1746(Load)S +2256 V +10 R +1510(If)S +1608(you)S +1791(know)S +2046(exactly)S +2367(which)S +2644(\256le)S +2805(you)S +2988(wish)S +3210(to)S +3321(load,)S +3551(you)S +3734(may)S +3939(enter)S +4171(its)S +4299(name)S +4548(in)S +4659(the)S +10 I +4814(Load)S +5053(File)S +10 R +5247(text)S +5430(box)S +2376 V +1510(and)S +1688(either)S +1949(hit)S +2089(<cr>)S +2312(or)S +2429(the)S +2585(Load)S +2824(button)S +3114(to)S +3226(load)S +3432(it.)S +3577(An)S +3733(absolute)S +4099(or)S +4215(relative)S +4547(path)S +4752(name)S +5001(may)S +5206(be)S +5333(given,)S +2496 V +1510(if)S +1601(a)S +1675(simple)S +1972(\256lename)S +2346(is)S +2443(speci\256ed)S +2828(it)S +2914(will)S +3100(be)S +3224(searched)S +3602(for)S +3748(in)S +3856(the)S +4008(current)S +4320(working)S +4683(directory.)S +2664 V +10 B +1260(Frame)S +1572(Selections)S +2784 V +10 R +1510(By)S +1662(default)S +1974(images)S +2292(will)S +2483(be)S +2612(loaded)S +2914(into)S +3106(frame)S +3374(number)S +3715(1,)S +3826(you)S +4012(may)S +4220(select)S +4483(a)S +4563(di)S +4641 H + (f)show 10 -.5 mul h (f)show +10 R +4702(erent)S +4937(frame)S +5205(using)S +5458(the)S +2904 V +1510(Frame)S +1795(menu)S +2047(button)S +2333(to)S +2441(cycle)S +2681(through)S +3022(the)S +3174(available)S +3564(frames.)S +3192 V +9 B +900(SAVE)S +1167(PANEL)S +3312 V +10 R +1260(The)S +1445(Save)S +1669(Panel)S +1921(lets)S +2090(you)S +2270(save)S +2477(the)S +2629(current)S +2941(contents)S +3304(of)S +3418(the)S +3571(main)S +3802(display)S +4122(window)S +4475(to)S +4584(a)S +4659(disk)S +4857(\256le)S +5016(\(including)S +5458(the)S +3432 V +1260(Panner/Coords)S +1896(markers,)S +2284(any)S +2470(general)S +2805(graphics)S +3185(markers,)S +3573(or)S +3698(overlay)S +4039(graphics)S +4419(displayed)S +4844(by)S +4986(the)S +5150(client)S +5414(pro-)S +3552 V +1260(gram\).)S +1554(Presently,)S +1982(only)S +2191(the)S +2344(contents)S +2708(of)S +2822(the)S +2975(main)S +3206(display)S +3526(window)S +3879(may)S +4082(be)S +4207(saved,)S +4490(there)S +4720(is)S +4819(no)S +4951(facility)S +5266(for)S +5414(sav-)S +3672 V +1260(ing)S +1424(the)S +1582(undisplayed)S +2101(contents)S +2470(of)S +2589(the)S +2747(entire)S +3010(frame)S +3278(bu)S +3378 H + (f)show 10 -.5 mul h (f)show +10 R +3439(er)S +3552(other)S +3792(than)S +3999(to)S +4112(enable)S +4407(the)S +4564(autoscale)S +4970(feature.)S +5306(A)S +5413(lim-)S +3792 V +1260(ited)S +1440(number)S +1775(of)S +1888(formats)S +2223(are)S +2374(currently)S +2764(available,)S +3179(others)S +3453(will)S +3639(be)S +3763(added)S +4031(in)S +4139(future)S +4407(versions.)S +3960 V +10 B +1260(File)S +1451(Name)S +4080 V +10 R +1510(The)S +1695(File)S +1881(Name)S +2149(text)S +2329(box)S +2509(allows)S +2800(you)S +2980(to)S +3088(enter)S +3317(the)S +3469(\256le)S +3627(name)S +3873(of)S +3987(the)S +4140(saved)S +4398(\256le.)S +4582(A)S +4685("%d")S +4931(anywhere)S +5349(in)S +5458(the)S +4200 V +1510(name)S +1770(will)S +1970(be)S +2108(replaced)S +2489(by)S +2632(a)S +2719(sequence)S +3127(number)S +3475(allowing)S +3868(multiple)S +4245(frames)S +4559(to)S +4680(be)S +4817(saved)S +5087(with)S +5308(unique)S +4320 V +1510(names.)S +4488 V +10 B +1260(Format)S +4608 V +10 R +1510(The)S +1704(Format)S +2032(box)S +2221(allows)S +2521(you)S +2710(to)S +2827(choose)S +3143(the)S +3305(format)S +3611(of)S +3734(the)S +3896(image)S +4180(to)S +4298(be)S +4432(created.)S +4784(Not)S +4974(all)S +5114(formats)S +5459(are)S +4728 V +1510(currently)S +1900(implemented.)S +4896 V +10 B +1260(Color)S +5016 V +10 R +1510(The)S +1701(Color)S +1965(box)S +2151(lets)S +2326(you)S +2512(choose)S +2825(the)S +2983(color)S +3224(type)S +3432(of)S +3551(the)S +3709(image)S +3989(to)S +4103(be)S +4233(created.)S +4581(The)S +4773(options)S +5105(will)S +5298(change)S +5136 V +1510(depending)S +1965(on)S +2104(the)S +2265(format,)S +2595(e.g.)S +2778(FITS)S +3023(doesn't)S +3356(allow)S +3617(color)S +3861(so)S +3989(no)S +4127(color)S +4370(options)S +4703(will)S +4897(be)S +5029(allowed.)S +5408(For-)S +5256 V +1510(mats)S +1741(which)S +2027(allow)S +2291(24-bit)S +2572(images)S +2897(will)S +3095(be)S +3231(written)S +3556(using)S +3815(the)S +3979(current)S +4303(colormap)S +4722(after)S +4946(converting)S +5415(to)S +5536(a)S +5376 V +1510(24-bit)S +1779(image,)S +2078(pseudocolor)S +2596(images)S +2909(will)S +3095(be)S +3219(written)S +3532(with)S +3740(the)S +3892(current)S +4204(colormap.)S +5664 V +9 B +900(PRINT)S +1207(PANEL)S +5784 V +10 R +1260(The)S +1449(Print)S +1678(Panel)S +1934(allows)S +2229(you)S +2413(dump)S +2675(the)S +2831(contents)S +3198(of)S +3315(the)S +3471(main)S +3706(display)S +4030(window)S +4387(as)S +4505(Encapsulated)S +5072(Postscript)S +5502(to)S +5904 V +1260(either)S +1526(a)S +1608(named)S +1912(printer)S +2216(device)S +2514(or)S +2635(to)S +2751(a)S +2833(disk)S +3038(\256le.)S +3259(The)S +10 I +3452(Print)S +3696(To)S +10 R +3840(selects)S +4144(the)S +4304(type)S +4514(of)S +4635(output,)S +4954(the)S +10 I +5114(Print)S +5358(Com-)S +6024 V +1260(mand)S +10 R +1513(box)S +1694(will)S +1881(adjust)S +2151(accordingly,)S +2678(either)S +2936(as)S +3050(a)S +3125(Unix)S +3356(printer)S +3653(command)S +4078(or)S +4192(as)S +4306(a)S +4381(\256le)S +4540(name.)S +4842(A)S +4946("%d")S +5193(anywhere)S +6144 V +1260(in)S +1372(the)S +1528(name)S +1778(for)S +1928(disk)S +2129(output)S +2419(will)S +2609(be)S +2737(replaced)S +3108(by)S +3242(a)S +3320(sequence)S +3719(number)S +4058(allowing)S +4442(multiple)S +4810(frames)S +5115(to)S +5226(be)S +5353(saved)S +6264 V +1260(with)S +1469(unique)S +1772(names.)S +2083(Selecting)S +2486(printers)S +2822(from)S +3047(the)S +3200(installed)S +3570(list)S +3724(will)S +3911(automatically)S +4486(change)S +4799(the)S +4952(command)S +5377(to)S +5486(be)S +6384 V +1260(used)S +1474(to)S +1583(generate)S +1951(the)S +2104(output.)S +2416(This)S +2625(command)S +3049(does)S +3262(not)S +3420(necessarily)S +3893(need)S +4111(to)S +4219(be)S +4343(a)S +4417(printer)S +4713(command,)S +5162(the)S +5314(printer)S +6504 V +1260(con\256guration)S +1823(\256le)S +1981(lets)S +2150(you)S +2330(de\256ne)S +2604(any)S +2778(command)S +3202(string)S +3460(to)S +3568(process)S +3897(the)S +4049(image.)S +6792 V +9 B +1080(COLOR)S +1437(OPTIONS)S +6912 V +10 R +1260(The)S +1469(Color)S +1751(box)S +1955(lets)S +2148(you)S +2352(choose)S +2683(the)S +2859(color)S +3118(type)S +3344(of)S +3481(the)S +3657(image)S +3955(to)S +4087(be)S +4235(created.)S +4631(PseudoColor)S +5203(or)S +5341(24-bit)S +7032 V +1260(postscript)S +1679(will)S +1865(be)S +1989(created)S +2306(using)S +2553(the)S +2705(current)S +3017(colormap)S +3424(and)S +3598(enhancements.)S +7680 V +900(X11IRAF Project)S +2709(Last change: 10 Dec 1996)S +5480(15)S +7920 V +EP +%%Page: 16 16 +BP +/slant 0 def +/height 1.000000 def +10 R +10 R +480 V +900(XIMTOOL)S +1376(\()S +1425(1)S +1491(\))S +2787(USER COMMANDS )S +4956(XIMTOOL)S +5432(\()S +5481(1)S +5547(\))S +960 V +9 B +1080(POSTSCRIPT)S +1672(OPTIONS)S +1080 V +10 B +1260(Orientation)S +1200 V +10 R +1510(Set)S +1668(the)S +1820(page)S +2038(orientation.)S +1368 V +10 B +1260(Paper)S +1545(Size)S +1488 V +10 R +1510(Select)S +1784(the)S +1936(paper)S +2187(size)S +2372(to)S +2480(be)S +2604(used.)S +1656 V +10 B +1260(Image)S +1556(Scale)S +1776 V +10 R +1510(Set)S +1677(the)S +1838(scale)S +2076(factor)S +2347(used)S +2569(to)S +2686(compute)S +3069(the)S +3230(\256nal)S +3447(image)S +3730(size.)S +3979(No)S +4140(checking)S +4539(is)S +4645(done)S +4878(to)S +4996(make)S +5252(sure)S +5458(the)S +1896 V +1510(image)S +1784(will)S +1970(\256t)S +2084(correctly)S +2468(on)S +2598(the)S +2750(page.)S +2184 V +9 B +1080(PROCESSING)S +1692(OPTIONS)S +2304 V +10 B +1260(Auto)S +1501(Scale)S +2424 V +10 R +1510(Toggles)S +1865(whether)S +2219(or)S +2335(not)S +2496(the)S +2651(image)S +2928(is)S +3028(automatically)S +3605(scaled)S +3887(to)S +3998(\256t)S +4116(the)S +4272(page.)S +4549(If)S +4649(not)S +4811(enabled,)S +5180(the)S +5336(image)S +2544 V +1510(scale)S +1744(will)S +1935(be)S +2064(used)S +2282(to)S +2395(determine)S +2829(the)S +2986(output)S +3277(image)S +3556(size,)S +3771(otherwise)S +4194(the)S +4351(image)S +4629(will)S +4819(be)S +4947(scaled)S +5230(down)S +5486(\(if)S +2664 V +1510(necessary\))S +1960(to)S +2068(\256t)S +2182(on)S +2312(the)S +2464(page.)S +2832 V +10 B +1260(Auto)S +1501(Rotate)S +2952 V +10 R +1510(Determines)S +2005(whether)S +2361(or)S +2479(not)S +2642(the)S +2800(image)S +3080(will)S +3272(be)S +3402(rotated)S +3715(to)S +3829(\256t)S +3949(on)S +4085(the)S +4243(page.)S +4492(When)S +4766(set,)S +4938(an)S +5068(image)S +5348(larger)S +3072 V +1510(than)S +1717(the)S +1874(current)S +2191(orientation)S +2659(will)S +2850(be)S +2979(rotated)S +3291(and)S +3470(possibly)S +3839(scaled)S +4123(to)S +4236(\256t)S +4355(the)S +4511(page,)S +4758(otherwise)S +5180(the)S +5336(image)S +3192 V +1510(may)S +1712(be)S +1836(scaled)S +2115(so)S +2234(that)S +2414(it)S +2500(\256ts)S +2653(in)S +2761(the)S +2913(current)S +3225(orientation.)S +3360 V +10 B +1260(Max)S +1484(Aspect)S +3480 V +10 R +1510(Automatically)S +2112(increases)S +2507(the)S +2659(scale)S +2888(so)S +3007(the)S +3159(image)S +3433(\256lls)S +3614(the)S +3766(page)S +3984(in)S +4092(the)S +4244(current)S +4556(orientation.)S +3648 V +10 B +1260(Annotate)S +3768 V +10 R +1510(The)S +1696(annotate)S +2065(option)S +2352(toggles)S +2672(whether)S +3024(or)S +3138(not)S +3297(the)S +3450(\256nal)S +3660(\256le)S +3820(includes)S +4185(annotation)S +4639(such)S +4854(as)S +4969(the)S +5123(image)S +5399(title,)S +3888 V +1510(a)S +1584(colorbar,)S +1971(and)S +2145(axis)S +2336(labels.)S +2654(There)S +2916(is)S +3013(currently)S +3403(no)S +3533(option)S +3819(for)S +3965(partial)S +4250(annotation.)S +4176 V +9 B +1080(PRINTER)S +1512(SELECTION)S +4296 V +10 R +1260(The)S +1487(printer)S +1825(selection)S +2252(list)S +2447(lets)S +2658(choose)S +3007(the)S +3201(printer)S +3540(to)S +3691(be)S +3858(used.)S +4139(The)S +4367(printer)S +4706(con\256guration)S +5312(\256le)S +5513(is)S +4416 V +1260(/usr/local/lib/ximprint.cfg)S +2342(by)S +2493(default)S +2821(or)S +2954(may)S +3176(be)S +3320(reset)S +3558(using)S +3825(the)S +10 I +3997(-printCon\256g)S +10 R +4542(command)S +4986(line)S +5186(switch)S +5497(or)S +4536 V +10 I +1260(printCon\256g)S +10 R +1752(resource.)S +2144(The)S +2329(format)S +2625(of)S +2738(the)S +2890(\256le)S +3048(is)S +3145(simply)S +4776 V +10 I +1950(name\\tcommand)S +5016 V +10 R +1260(The)S +10 I +1450(name)S +10 R +1701(value)S +1952(is)S +2054(what)S +2284(appears)S +2624(in)S +2738(the)S +2896(selection)S +3287(list)S +3446(and)S +3626(may)S +3834(be)S +3964(more)S +4205(than)S +4413(a)S +4493(single)S +4768(word,)S +5034(the)S +10 I +5192(command)S +5136 V +10 R +1260(can)S +1432(be)S +1560(any)S +1738(command)S +2166(that)S +2350(accepts)S +2677(EPS)S +2884(input)S +3124(from)S +3352(a)S +3429(pipe,)S +3659(the)S +3814(two)S +3997(\256elds)S +4247(must)S +4475(be)S +4602(separated)S +5011(by)S +5144(a)S +5221(tab)S +5376(char-)S +5256 V +1260(acter.)S +1538(Normally)S +1951(the)S +2103(command)S +2527(will)S +2713(be)S +2837(a)S +2912(simple)S +10 I +3210(lpr)S +3358(-Pfoo)S +10 R +3611(or)S +3725(some)S +3967(such,)S +4206(but)S +4365(can)S +4534(also)S +4726(include)S +5051(converters)S +5497(or)S +5376 V +1260(previewers.)S +1752(At)S +1882(most)S +2107(128)S +2287(printer)S +2583(commands)S +3046(may)S +3248(be)S +3372(used.)S +5664 V +9 B +900(INFO)S +1152(PANEL)S +5784 V +10 R +1260(The)S +1450(information)S +1957(panel)S +2208(is)S +2310(underused)S +2755(at)S +2862(present)S +3185(but)S +3348(is)S +3450(meant)S +3729(to)S +3842(provide)S +4183(basic)S +4424(information)S +4932(about)S +5190(the)S +5348(frame)S +5904 V +1260(being)S +1524(displayed.)S +1974(It)S +2077(is)S +2186(updated)S +2544(to)S +2664(be)S +2800(current)S +3124(while)S +3388(changing)S +3796(enhancements,)S +4428(pan/zoom)S +4864(regions,)S +5224(or)S +5348(frame)S +6024 V +1260(selection.)S +1684(In)S +1811(cases)S +2065(where)S +2352(the)S +2518(image)S +2806(title)S +3006(string)S +3278(is)S +3389(truncated)S +3804(in)S +3926(the)S +4093(main)S +4338(display)S +4672(window,)S +5064(the)S +5231(user)S +5442(can)S +6144 V +1260(always)S +1567(pop)S +1747(up)S +1877(the)S +2029(info)S +2220(window)S +2572(to)S +2680(see)S +2837(the)S +2989(full)S +3158(title.)S +6432 V +9 B +900(TCLSHELL)S +6552 V +10 R +1260(The)S +10 I +1446(TclShell)S +10 R +1805(allows)S +2097(the)S +2250(user)S +2447(to)S +2556(type)S +2759(commands)S +3224(directly)S +3561(to)S +3671(the)S +3825(TCL)S +4046(interpreter,)S +4518(letting)S +4806(you)S +4988(send)S +5203(messages)S +6672 V +1260(to)S +1369(the)S +1522(object)S +1797(manager)S +2171(or)S +2284(execute)S +2618(speci\256c)S +2953(procedures)S +3420(in)S +3528(the)S +3680(TCL)S +3899(code)S +4117(that)S +4297(makes)S +4582(up)S +4712(the)S +4864(GUI.)S +5096(It)S +5187(is)S +5284(used)S +5497(as)S +6792 V +1260(a)S +1338(development)S +1888(or)S +2005(debugging)S +2461(tool)S +2651(for)S +2801(the)S +2957(GUI,)S +3193(but)S +3355(for)S +3505(an)S +3633(example)S +4005(of)S +4122(what)S +4350(it)S +4440(does,)S +4682(bring)S +4927(it)S +5017(up)S +5151(and)S +5329(type)S +5536(a)S +6912 V +1260(command)S +1684(such)S +1897(as)S +7152 V +10 I +1380(send)S +1593(helpButton)S +2062(set)S +2203(background)S +2710(red)S +7680 V +10 R +900(X11IRAF Project)S +2709(Last change: 10 Dec 1996)S +5480(16)S +7920 V +EP +%%Page: 17 17 +BP +/slant 0 def +/height 1.000000 def +10 R +10 R +480 V +900(XIMTOOL)S +1376(\()S +1425(1)S +1491(\))S +2787(USER COMMANDS )S +4956(XIMTOOL)S +5432(\()S +5481(1)S +5547(\))S +960 V +9 B +900(ENVIRONMENT)S +1080 V +10 R +1260(DISPLAY)S +2700(speci\256es)S +3074(which)S +3348(display)S +3667(terminal)S +4030(to)S +4138(use)S +1200 V +1260(IMTOOLRC)S +2700(frame)S +2962(bu)S +3062 H + (f)show 10 -.5 mul h (f)show +10 R +3123(er)S +3230(con\256guration)S +3793(\256le)S +1320 V +1260(imtoolrc)S +2700(frame)S +2962(bu)S +3062 H + (f)show 10 -.5 mul h (f)show +10 R +3123(er)S +3230(con\256guration)S +3793(\256le)S +3951(\(alternative\))S +1608 V +9 B +900(FILES)S +1728 V +10 R +1260(/usr/local/lib/imtoolrc)S +2700(default)S +3007(frame)S +3269(bu)S +3369 H + (f)show 10 -.5 mul h (f)show +10 R +3430(er)S +3537(con\256guration)S +4100(\256le)S +1848 V +1260(/usr/local/lib/ximprint.cfg)S +2700(default)S +3007(printer)S +3303(con\256guration)S +3866(\256le)S +1968 V +1260(/usr/local/lib/imtoolcmap)S +2700(default)S +3007(colormap)S +3414(directory)S +2088 V +1260(/dev/imt1i)S +2700(default)S +3007(input)S +3243(\256fo)S +2208 V +1260(/dev/imt1o)S +2700(default)S +3007(output)S +3293(\256fo)S +2328 V +1260(/tmp/.IMT%d)S +2700(default)S +3007(unix)S +3215(socket)S +2616 V +9 B +900(BUGS)S +2736 V +900(SEE)S +1112(ALSO)S +2856 V +10 R +1260(xgterm\(1\),)S +1714(xtapemon\(1\))S +3144 V +9 B +900(COPYRIGHT)S +3264 V +10 R +1260(Copyright\(c\))S +1806(1986)S +2036(Association)S +2538(of)S +2651(Universities)S +3164(for)S +3310(Research)S +3705(in)S +3813(Astronomy)S +4293(Inc.)S +7680 V +900(X11IRAF Project)S +2709(Last change: 10 Dec 1996)S +5480(17)S +7920 V +EP +%%Trailer +%%DocumentFonts: Times-Roman Times-Bold Times-Italic Symbol +%%Pages: 17 +
\ No newline at end of file |