.TH MARSV 1 .SH NAME marsv \- View PDS images and measure the elevation of Mars surface using MOLA grid data; Output the result to a postscript formatted file .SH SYNOPSIS .B marsv .SH DESCRIPTION .I Marsv is a GUI program for measuring Mars elevation, latitude and longitude at the location pointed at by the mouse cursor, on a Qube image or MOLA grid data. The program draws a contour map overlaid on the image using MOLA grid data, and generates a postscript output file. .PP Marsv is intended to be an acme like user interface for manipulating Mars images with additional menu barproperty for 3 button mouse. The Left button shows the category name of the item, the Middle button executes the indicated job by the menu name, and the Right button lists the items for that category so that the user can choose and execute one. .PP In Altitude menu of ISISmenu category of QUBELoad menu or MOLALoad menu, the Left button shows the user the values of elevation, longitude and latitude of the location that the mouse points to. When the mouse in this mode is dragged, those values will be shown continuously, which makes you to understand the real shape of the object you are now watching. When you want to erase these data from the screen, press the Middle button. .PP In Contour menu of ISISmenu category of QUBELoad menu, dragging button 3 can make correction for the minor discrepancy between that indicated by MOLA grid data and by Qube image data. After this recalibration, remapping of the countour will be necessary to get a correct one. The values of longitude and latitude shown in Altitude menu of ISISmenu category are also recalculated by the above procedure. In short, you have to confirm the accuracy of those data shown by the mouse over the contour maps, and if necessary, that recalibration should be done. Those two values will not usually match each other from our experiences. .PP Marsv assumes there is a MOLA grid data (such as ieg0031t.img for 0.031 degree grid) in the $home/data/mars/mola/ directory. Additionally, marsv can read many other PDS formatted images of other planet (and such as gif images of course), and make simple annotations using Pen menu by changing colors from Palette menu. .SH IMPLEMENTATION Marsv designed as a single threaded concurrent program, ie. only a process can include many threads, using thread(2) and control(2) libraries of Plan 9. All the controles to a window should be done by sending a control message to an appropriate channel, which may not be necessarily attached to a visible window. Four general purpose user interfaces with its own windows are implemented as shown in struct Form, struct Filebrowse, struct Select and struct Viewer. Those structures are constructed using two new basic structures, named struct Win and struct WinComm, which control their shape, position and behaviour. All those strructures have ctl, data, winctl and event channels to send or receive the control messages or data, the last of which is just a handle to a real channel. Those channels will be created by the function of mkwincomm() in wincomm.c. .PP Struct Canvas is prepared to provide layer structures to marsv image by using memdraw and layer functions in memdraw(2) libraries of Plan 9, which is a mechanism to make multiple layers in the user's memory space. Each layer may be for drawing the altitude, latitude and longitude data at the moving mouse point, or for drawing image data themselves. Struct Layer and CanvasBase are used as their base structures. The other many structures from control(2) library are also used through newly defined structure of Wincontrol. Struct Canvas related thread has no winctl channel, then, has no distinct visible window, where channels are created individually, and mkwincomm() is not applied. The struct Viewer is used to copy the layered image to visible image. .PP We added struct Textbutton3 for our usage of 3 button menu bar to control(2) library. You may want to copy textbutton3.c.lib file to /sys/src/libcontrol/txtbutton3.c, and do mk the control library with some change to /sys/include/control.h and /sys/src/libcontrol/control.c and mkfile to make those usable. .PP If you want to extend functionarities to marsv, please refer to files such as imager.c or marsv.c. .SH BUGS Some images with larger width may fail to be shown, because of the limit of 9p protocol. 16 bit color is not supported to save the created image. You will lose true color from saving in 16 bit true color mode of Plan 9. To input file name etc. onto the entry box, you have to hit Enter key at the end to ensure the input, which is not a bug though. There may be many other bugs. .SH AUTHORS Marsv was written by Yoshitatsu Suzuki and Kenji Okamoto of Osaka Prefecture University. We are financially supported by the citizens of Osaka Prefecure Japan.