idtIdt (X window interactive image display tool) provides a graphical user interface to the NCAR View interactive metafile translator ictrans.
idt [ -toolkitoption ... ] [ -background color ] [ -f font] [ -foreground color ] [ -history ] [ -lmin min ] [ -lmax max ] [ -lscale scale ] [ -oldidt ] [ -pal pal_fname ] [-reverse ] [ -soft ] [ -Version ] [ metafile ]
idt provides a graphical user interface to the NCAR View interactive metafile translator ictrans. idt supports a subset of the ictrans command interface.
idt provides two types of command panels for interacting with imagery. The first type is the control panel, which you see when you initially invoke idt. The control panel displays messages from the translators, provides a metafile selection utility and is responsible for instantiating the second type of command panel, the display panel. The display panel provides mechanisms for controlling translators. Each display panel manages a single metafile translator. There can be multiple display panels in existence at the same time but only one control panel.
idt accepts all of the standard X Toolkit command line options (see X(1)). idt also accepts the following options:
- -f fontcap
- Fontcap file to be used for stroking text. When
interpreting CGM TEXT command elements use fontcap as the
default font for textual translation. Note: CGMs may
contain textual descriptions which are not embedded in CGM
TEXT elements. Hence they are not influenced by fontcap
specifications. Note also that a CGM may explicitly specify
a named font which may override a font provided on the
command line. The environment variable FONTCAP may also be
used to specify a default fontcap.
If fontcap is preceded by a UNIX directory path then ctrans will look in that directory for the specified fontcap. Otherwise idt searches the directory $NCARG_ROOT/lib/ncarg/fontcaps for the fontcap.
See fontcap(5NCARG) for a description of the available fontcaps. See fcap(1NCARG) for a list of the fontcaps installed on your system.
This option overrides the FONTCAP environment variable.
- Write a record of all commands sent to the translator
to the file ./.idthist.
- Print the version number and then exit.
The following options are ignored by idt and are passed on to the metafile translator ictrans. See ictrans(1NCARG) for a description of their use.
- -lmin linewidth
- -lmax linewidth
- -lscale linewidth
- -pal pal_fname
- -foreground color
- -background color
Control panel commands
The control panel provides a text widget for displaying messages from the translators and a row of command buttons. Messages are preceded with the string "Display[X]", where "X" is an integer id associated with the translator sending the message. The first translator spawned is "Display", the second is "Display", etc.
- select file
- Selects a file for translation. This button brings up a
popup menu containing a file selection box. The uppermost
dialog box of the file selection box is used for specifying
a filter for searching for files. For example, the filter
"/usr/local/lib/*.cgm" finds all files in the directory
/usr/local/lib whose names end with ".cgm". The finder
understands standard shell metacharacters.
The bottom dialog box displays the currently selected file. The user may enter a file name here or select one with the mouse from the list of files displayed in the middle text widget.
- Popup a display panel. A display panel is popped up
ready for translation of the file most recently
selected with the file selector. This command will fail
if a file has not been selected.
- Quits the application and terminates all translators.
Display panel commands
The display panel provides a mechanism for manipulating the translator associated with a particular metafile. On most systems the name of the metafile appears in the title bar at the top of the panel. The first row in the panel contains a scroll bar for randomly selecting a frame to be translated. The label bar to the right displays the number of the frame scrolled to. The panel is intended to resemble a video tape editor. Thus, the second row contains play back, jog back, stop, jog and play buttons, respectively. The third and forth rows contain more complex display commands.
- Toggle the looping mode on or off. When loop is on pressing
the play (playback) button causes the translator to process
all the frames in the segment sequentially (reverse
sequentially) and then start over from the beginning
(end). The process continues until the "stop" button is
selected. By default loop mode is off.
- Sets duplication variable. If dup is set to 1 each frame is
displayed once, if dup is set to 2 each frame is displayed
twice, etc. The default value of dup is 1.
- Go to the specified frame and translate it. goto provides
random access to the frames contained in the metafile.
- Set the skip variable. If skip is set to 1 every other frame
is displayed during subsequent plays, if skip is set to 2
every third frame is displayed, etc. The default value for
skip is 0.
- Set the between-frame animation delay-time. When idt is
in animation mode you may request that idt pause for a
period of time between the display of each image. The
effect of setting a delay time is to govern the speed
at which idt "plays" imagery.
- start segment
- Define the first frame in the segment. This button and
the stop segment button define a segment which is a
subset of the frames contained in the metafile. When in
play (playback) mode only the frames contained within
the defined segment are translated. The default value
for start segment is 1, the first frame in the file.
- stop segment
- Define the last frame in the segment. The default frame
is the last frame in the file. Hence, by default the
segment is the entire metafile.
- set window
- Specify the workstation window (in the GKS sense). Four
coordinates are specified which define a rectangular
window which is a subset of normalized VDC rectangle
with corner points (0,0) and (1.0,1.0). The specified
window is then mapped onto the entire viewport. For
example, if the workstation window is defined by the
corner points (0,0) and (0.5 0.5) then the lower left
quarter of a plot would be blown up to fill the largest
rectangle which fits in the drawing window while
retaining the aspect ratio described by the normalized
coordinates. Specification of such a window can be
used for zooming and panning.
- Terminate processing of current metafile.
- current frame
- Update the "Scrolled to Frame ->" label box with the
number of the current frame.
- Send the current frame to the printer. The print command
brings up a menu of all devices configured for accepting
translator output. This list is created dynamically in
response to changes in the spooler configuration file (see
ncarv_spool(5NCARG)). Selecting an item from the menu causes
the current frame to be sent to that device.
- Save a frame to a file. This command allows you to
write the metacode for the current frame to a file. The
result is a complete NCAR Computer Graphics Metafile
(CGM) containing a single frame.
- Reset windowing transformations previously set by the
zoom command back to their default.
- Zoom in on an area of a plot. The function of this command
is identical to that of the window command. The zoom
command, however, allows you to select the area of interest
interactively with the mouse.
- Toggle animation mode on or off. When idt is put into animation mode the currently defined segment is rasterized with the translator and loaded into the X server memory. Subsequent idt commands operate on the memory-resident images. Not all idt commands are available in animation mode. By default animation is off.
As with all standard X applications, idt may be customized through entries in the resource manager. In the following list of application resources provided by idt the resource name is given followed by its class in parentheses. These resources supplement the resources provided by the widgets themselves.
- history (Class History)
- Specify whether a history of commands sent to the metafile
translators is recorded to the file "./.idthist" or not. The
default for this resource is "False".
- fileSelectAction (Class FileSelectAction)
- Set the default action to be executed after a file has
been selected with the file selection box. Currently
the only value this resource understands is "display".
- messageHeight (Class MessageHeight)
- Set the height in lines of text of the message display
- oldIdt (Class OldIdt)
- Specifies the "-oldidt" option.
- translatorDevice (Class TranslatorDevice)
- Specify the output device for metafile translation. The
default for this resource is "X11".
- translatorFont (Class TranslatorFont)
- Specify the name of the fontcap to use for stroking
text during metafile translation. The default value for
this resource is "font1".
- translatorSoft (Class TranslatorSoft)
- Specifies the ictrans "-soft" option.
- translatorLmin (Class TranslatorLmin)
- Specifies the ictrans "-lmin" option.
- translatorLmax (Class TranslatorLmax)
- Specifies the ictrans "-lmax" option.
- translatorLscale (Class TranslatorLscale)
- Specifies the ictrans "-lscale" option.
- translatorForeground (Class TranslatorForeground)
- Specifies the ictrans "-foreground" option.
- translatorBackground (Class TranslatorBackground)
- Specifies the ictrans "-background" option.
- translatorReverse (Class TranslatorReverse)
- Specifies the ictrans "-reverse" option.
idt provides the following actions for use in event translation:
- This action causes the file selector popup to search
for files using the key supplied in the file finder
- This action notifies the file selector that a selection
has been made.
- This action updates the text box in the file selector
which displays the currently selected file.
- This action confirms a selection made in one of the display panel popup dialog boxes.
In order to specify resources, it is useful to know the hierarchy of the widgets which make up idt. In the notation below, indentation indicates hierarchal structure. The widget class name is given first, followed by the widget instance name.
Idt idt Paned paned Text text Form form Command select file Command display TopLevelShell ??> Paned paned Core canvas /* This is the drawing canvas Form form Scrollbar scrollbar Label Scrolled to Frame -> Form form Command playback Command jogback Command stop Command jog Command play Form form Toggle loop Command dup Command goto Command skip Command delay Command start segment Command stop segment Command set window Form form Command done Command current frame MenuButton print SimpleMenu menu SmeBSB ??> SmeBSB ??> SmeBSB ??> | | dynamically configured | | SmeBSB ??> SmeBSB ??> Command save Command zoom Command unzoom Toggle animate Grip grip Grip grip Grip grip Grip grip Grip grip Command quit Grip grip Grip grip Paned
The following resource specification can be used to set the default size of the graphics display window to 200 by 200 pixels:
Idt*canvas.width: 200 Idt*canvas.height: 200If you want to place the control panel in the top right corner insert the following into your .Xdefaults file:
- This is the standard X environment variable for specifying
display name. If the translation output device is X11 this
variable MUST be set.
- Default fontcap specifier.
- Path to root of NCL and NCAR Graphics installation.
- If set this variable contains the path to the installed
NCAR Graphics libraries. NCARG_LIB overrides
- If set, this environment variable contains a directory
path to be used for temporary files. On most systems
the default is /tmp. On some systems the default is
- Specifies the UNIX shell that the file selector is to
use for expanding metacharacters. /bin/sh is used by
- Specifies the name of a resource file that overrides the global resources stored in the RESOURCE_MANAGER property.
- .idthist - Translator command history file
- $NCARG_ROOT/lib/ncarg/xapp/Idt - Default resource file for idt
- $HOME/.ncarv_spool - User spooler configuration file
- $NCARG_ROOT/lib/ncarg/ncarv_spool - System spooler configuration file
See alsoctrans, ictrans, ncarv_spool, X(1), xrdb(1)
Zooming in on large cell arrays causes the translator to crash.
The metafile file translation process is performed by spawning the ictrans translator. ictrans does not understand standard X Toolkit options. Hence, the DISPLAY environment variable must be set when translating a metafile to be displayed in a window.
You can not save "zoomed" plots to a file. More precisely, you may save a "zoomed" plot, however, the resultant plot will not be "zoomed".
The "Scrolled to Frame" label is not continuously updated.
The range with which one may zoom in on a plot with either the zoom or window command is severely limited by Xlibs use of 'short' integers for containing screen coordinate data.
IRIX 4.x users should not set use the shared memory connection to their X server. i.e don't use the display shm:0.
Background color changes don't work when idt is in animate mode. idt will use whatever color was most recently set in the animation segment for the entire segment.