tvmark -- mark objects on the image display
tvmark frame coords
TVMARK marks objects on the display by writing directly into the frame buffer specified by frame . TVMARK can draw on any devices supported by the IRAF display program. After marking, the contents of the frame buffer may be written out to the iraf image outimage . The output image is equal in size and intensity to the contents of the frame buffer displayed at the time of writing.
In interactive mode objects to be marked may be selected interactively using the image cursor or read from the text file coords . Objects in the coordinate list may be selected individually by number, in groups by specifying a range of numbers, or the entire list may be read. New objects may be added to the list interactively using the append keystroke command. In batch mode cursor commands may be read from a text file by setting commands to the name of the text file. This may be a user created file of cursor commands or a log file from a previous interactive run of TVMARK. If no command file is specified then all the objects in the coordinate list are marked with the default mark type /fImark/fR.
The mark commands entered in interactive mode can be saved in the text file logfile . If autolog is enabled and logfile is defined all cursor commands are automatically logged. If autolog is turned off then the user can select which commands are to be logged interactively using the interactive keep keystroke.
The default mark type are currently "none", "point", "plus", "cross", "circle", a list of concentric circles, and "rectangles", a list of concentric rectangles. The size of the "point" mark is set using the parameter pointsize while the sizes of the "plus" and "cross" mark types are set by the txsize parameter. Txsize is in font units which for the simple raster font currently implemented is six display pixels in x and seven display pixels in y. The radii and lengths parameters describe the concentric circles and concentric rectangles to be drawn respectively. If number=yes then objects in the coordinate list will be automatically numbered as well as marked. The position of the number can be altered with the nxoffset and nyoffset parameters.
In interactive mode tvmark maintains a scratch buffer. The user opens the scratch buffer by issuing a save command which saves the current contents of the frame buffer in a temporary iraf image. The user can continue marking and if unsatisfied with the results restore the last saved copy of the frame buffer with the restore command. Subsections of the saved frame buffer can be restored to the current frame buffer with the erase keystroke command. Finally a snapshot of the frame buffer can be saved permanently by using the write command. These snapped images can be redisplayed by setting the display task parameter ztrans = "none".
Interactive TVMARK Keystroke/Colon Commands The following keystroke commands are available. ? Print help + Mark the cursor position with + x Mark the cursor position with x . Mark the cursor position with a dot c Draw defined concentric circles around the cursor position r Draw defined concentric rectangles around the cursor position s Draw line segments, 2 keystrokes v Draw a circle, 2 keystrokes b Draw a rectangle, 2 keystrokes f Draw filled rectangle, 2 keystrokes e Mark region to be erased and restored, 2 keystrokes - Move to previous object in the coordinate list m Move to next object in the coordinate list p Mark the previous object in the coordinate list n Mark next object in the coordinate list l Mark all the objects in the coordinate list o Rewind the coordinate list a Append object at cursor position to coordinate list and mark d Delete object nearest the cursor position in the coordinate list and mark k Keep last cursor command q Exit tvmark The following colon commands are available. :show List the tvmark parameters :move N Move to Nth object in coordinate list :next N M Mark objects N to M in coordinate list :text [string] Write text at the cursor position :save Save the current contents of frame buffer :restore Restore last saved frame buffer :write [imagename] Write the contents of frame buffer to an image The following parameters can be shown or set with colon commands. :frame [number] :outimage [imagename] :coords [filename] :logfile [filename] :autolog [yes/no] :mark [point|line|circle|rectangle|cross|plus] :radii [r1,...,rN] :lengths [l1,...,lN] [width] :font [raster] :color [number] :number [yes/no] :label [yes/no] :txsize [1,2,..] :pointsize [1,3,5...]
0 = sunview background color (normally white) 1-200 = frame buffer data values, windowed 201 = cursor color (white) 202 = black 203 = white 204 = red 205 = green 206 = blue 207 = yellow 208 = cyan 209 = magenta 210 = coral 211 = maroon 212 = orange 213 = khaki 214 = orchid 215 = turquoise 216 = violet 217 = wheat 218-254 = reserved for use by other windows 255 = black (sunview foreground color)
1. Display an image, mark all the objects in the coordinate file m92.coo.1 with red dots, and save the contents of the frame buffer in the iraf image m92r.snap. Redisplay the marked image.
cl> display m92r 1 cl> tvmark 1 m92.coo.1 outimage=m92r.snap col=204 cl> display m92r.snap 2 ztrans="none"
2. Execute the same command only number the objects in the coordinate list instead of marking them.
cl> display m92r 1 cl> tvmark 1 m92.coo.1 outimage=m92r.snap mark=none\ >>> number+ col=204 cl> display m92r.snap 2 ztrans="none"
3. Display an image and draw concentric circles with radii of 5, 10 and 20 pixels corresponding to an aperture radius and inner and outer sky annulus around the objects in the coordinate list.
cl> display m92r 1 cl> tvmark 1 m92.coo.1 mark=circle radii="5,10,20" col=204
4. Display an image, mark objects in a coordinate list with dots and append new objects to the coordinate file.
cl> display m92r 1 cl> tvmark 1 m92.coo.1 interactive+ ... type q to quit the help menu ... ... type :number yes to turn on numbering ... ... type l to mark all objects in the coordinate file ... move cursor to desired unmarked objects and type a ... type :write to take a snap shot of the frame buffer ... type q to quit
5. Make a finder chart of a region containing 10 stars by drawing a box around the field, marking each of the 10 stars with a dot, labeling each with an id and finally labelling the whole field. Save all the keystroke commands in a log file.
cl> display m92r 1 log=m92r.log auto+ cl> tvmark 1 "" interactive+ ... type q to quit the help menu ... ... to draw a box around the finder field move the cursor to the lower left corner of the finder field and type b, move the cursor the upper right corner of the field and type b again ... to mark and label each object move to the position of the object and type ., next move slightly away from the object and type :text id ... to label the chart with a title first type :txsize 2 for bigger text then move the cursor to the position where the title should begin and type :text title ... save the marked image with :write ... type q to quit the program
6. Edit the log file created above to remove any undesired commands and rerun tvmark redirecting cursor input to the log file.
cl> display m92r 1 cl> tvmark 1 "" commands=logfile inter-
7. Draw a box on the display with a lower left corner of 101,101 and an upper right corner of 200,200 using a simple cursor command file. Note than in interactive mode the b key is the one that draws a box.
The command file contains the following 3 lines 101.0 101.0 101 b 200.0 200.0 101 b 200.0 200.0 101 q cl> display m92r 1 cl> tvmark 1 "" commands=commandfile inter-
Tvmark is a prototype task which can be expected to undergo considerable modification and enhancment in the future. The current version of this task does not produce publication quality graphics. In particular aliasing is easily visible in the code which draws circles and lines.
Input from the coordinate list is sequential. No attempt has been made to arrange the objects to be marked in order for efficiency of input and output.
Note that the move command does not currently physically move the image cursor. However the next mark drawn will be at the current coordinate list position.
Users may wish to disable the markcur option in the imtool setup window before running tvmark.
display, imedit, imexamine