home *** CD-ROM | disk | FTP | other *** search
- /*************************************************************/
- /* Copyright (C) 1989, California Institute of Technology */
- /* U. S. Government Sponsorship under NASA Contract */
- /* NAS7-918 is acknowledged. */
- /*************************************************************/
-
- /*** IMDISP module HELP.C
-
- HELP.C contains the command which services help requests from
- the IMDISP main menu. All help text for new commands goes here.
-
- ***/
-
- /* * * * INCLUDE files * * * */
-
- #include <stdio.h>
- #include <conio.h>
- #include "imdef.h"
- #include "imdisp.h"
- #include "dispio.h"
- #include "disputil.h"
- #include "labutil.h"
-
- /* * * * External functions * * * */
-
- /* * * * Function declarations * * * */
-
- int GiveHelp (void);
-
- /* * * * Global Variables * * * */
-
-
-
- int GiveHelp (void)
- {
- int command;
-
-
- if (OneScreen)
- {
- ClearDisplay (0);
- TextLine = TextHeight + 5; TextSample = 1;
- }
-
- command = GetCommand (&CommandString[4],
- "FIL DIS ERA SET HIS PAL STR CUR PRO REF SAV BAT MEN LAB TEX BRO OVE CD DIR TYP SYS PLO SER PRI NEG");
-
- switch (command)
- {
- case 0 :
- WriteText ("The following commands are available :");
- WriteText ("BATch . . . . to execute a batch command file");
- WriteText ("BROwse . . . . to display multiple files");
- WriteText ("CD . . . . MSDOS change directory command");
- WriteText ("CURsor . . . . to move the cursor around");
- WriteText ("DIR . . . . MSDOS directory command");
- WriteText ("DISplay . . . . to display the image");
- WriteText ("ERAse . . . . to erase the display");
- WriteText ("EXIt or QUIt . . . . to exit from the program");
- WriteText ("FILe . . . . to specify the name of the image");
- if (dispnl < 300)
- {
- WriteText ("Press any key to continue>>");
- getch();
- ClearDisplay (0);
- TextLine = TextHeight + 5; TextSample = 1;
- }
- WriteText ("HIStogram . . . . to display the histogram of the image");
- WriteText ("LABel . . . . to show image label");
- WriteText ("MENu . . . . to invoke menu list");
- WriteText ("NEGative . . . . to photo negative the image");
- WriteText ("OVErlay . . . . to draw grid lines on image");
- if (dispnl > 300 && dispnl < 400)
- {
- WriteText ("Press any key to continue>>");
- getch();
- ClearDisplay (0);
- TextLine = TextHeight + 5; TextSample = 1;
- }
-
- WriteText ("PALette . . . . to adjust the palette for the display");
- WriteText ("PLOt . . . . to display and plot spectral data");
- /*
- WriteText ("PRInt . . . . to print out the image");
- */
- WriteText ("PROfile . . . . to plot a profile of the image");
- WriteText ("REFresh . . . . to refresh the image plane");
- WriteText ("SAVe . . . . to save the image display to a file");
- if (dispnl < 300)
- {
- WriteText ("Press any key to continue>>");
- getch() ;
- ClearDisplay (0);
- TextLine = TextHeight + 5; TextSample = 1;
- }
-
- /*
- WriteText ("SERial . . . . to send commands to the serial port");
- */
- WriteText ("SET . . . . to set display options");
- WriteText ("STRetch . . . . to do a linear gray scale stretch");
- WriteText ("SYStem . . . . to execute MSDOS commands");
- WriteText ("TEXt . . . . to place text on screen");
- WriteText ("TYPe . . . . MSDOS type command");
- WriteText (" ");
-
- if (dispnl < 600)
- {
- WriteText ("Press any key to continue>>");
- getch();
- ClearDisplay (0);
- TextLine = TextHeight + 5; TextSample = 1;
- }
-
- WriteText ("Only the capitalized letters are required for the command.");
- WriteText ("The commands take optional keywords and values.");
- WriteText (" The syntax is: COMMAND KEY1=VAL1 KEY2 VAL2 . . .");
- WriteText ("Type 'HELP command' for help on a particular command.");
- break;
- case 1 :
- WriteText ("FILE takes a required string value, i.e. the file name");
- WriteText ("FILE without filename enters file prompt mode");
- WriteText ("FILE with a filename mask enters file prompt mode with");
- WriteText (" only the matching filenames");
- break;
- case 2 :
- WriteText ("DISPlay takes the following keywords :");
- WriteText (" ");
- WriteText ("SUBsample a positive integral subsampling factor");
- WriteText ("ZOOm a positive integral zoom factor");
- WriteText ("CENter to display area around cursor");
- WriteText ("NL NS number of lines and samples to display in image");
- WriteText ("SL SS starting line and sample in image");
- WriteText ("LEFT RIGHT move starting sample left or right from previous");
- WriteText ("UP DOWN move starting line up or down from previous");
- WriteText ("DSL DSS starting line and sample on display");
- WriteText ("FLIp flips the image top-to-bottom");
- break;
- case 3 :
- WriteText ("ERAse takes no parameters");
- break;
- case 4 :
- WriteText ("SET takes the following keywords :");
- WriteText (" ");
- WriteText ("DNLOw DNHIgh the DN range to compress into display pixel");
- WriteText (" Use no parameters to see the current values");
- WriteText ("BROwse fname sets the default filename for use with BROWSE");
- WriteText ("SELect fname sets default filename for use with BROWSE SELECT");
- WriteText ("NS = n sets the number of samples/line for display");
- WriteText ("SWAP swaps bytes when reading the image (>8 bits)");
- WriteText ("UNSWAP resets SWAP, so bytes aren't swapped");
- if (dispnl < 300)
- {
- WriteText ("Press any key to continue>>");
- getch();
- ClearDisplay (0);
- TextLine = TextHeight + 5; TextSample = 1;
- }
- WriteText ("DISplay vname changes the display type to the one specified.");
- WriteText (" Standard graphics modes supported:");
- WriteText (" CGA (640x200x2) EGA (640x350x16)");
- WriteText (" EGA480 (640x480x16) VGA320 (320x200x256)");
- WriteText (" VGA (640x480x16)");
- if (dispnl < 400)
- {
- WriteText ("Press any key to continue>>");
- getch();
- ClearDisplay (0);
- TextLine = TextHeight + 5; TextSample = 1;
- }
- WriteText (" Super VGA supported for the following:");
- WriteText (" ATI640 (640x480x256) - ATI VGA Wonder Board");
- WriteText (" ATI800 (800x600x256) - ATI VGA Wonder Board");
- WriteText (" ATI1024 (1024x768x16) - ATI VGA Wonder Board");
- WriteText (" EVGA512 (512x480x256) - Everex Board");
- WriteText (" EVGA640 (640x480x256) - Everex Board");
- WriteText (" ORCHID (640x480x256) - Orchid Board");
- WriteText (" ORCHID800 (800x600x256) - Orchid Board");
- WriteText (" ORCHID1024 (1024x768x256) - Orchid Board");
- WriteText (" PARADISE (640x400x256) - Paradise Board 256K");
- WriteText (" (640x480x256) - Paradise Board 512K");
- WriteText (" PGA (640x480x256) - PGA Board");
- WriteText (" Use the DOS SET command before starting IMDISP to set the default");
- WriteText (" display type. EG: SET IMDISP=VGA will start up in VGA mode.");
-
- break;
- case 5 :
- WriteText ("HISTogram takes the following keywords :");
- WriteText (" ");
- WriteText ("SUBsample a integral subsample factor for speed");
- WriteText ("NL NS number of lines and samples from image");
- WriteText ("SL SS starting line and sample in image");
- WriteText ("CENter do histogram on displayed portion of image");
- WriteText ("VOY Use histogram from standard PDS Voyager image");
- WriteText ("VIK Use histogram from standard PDS Viking image");
- WriteText ("COL draw histogram using current color settings");
- break;
- case 6 :
- WriteText ("PALette takes the following keywords :");
- WriteText (" ");
- WriteText ("EDIt = n to interactively adjust n color palette");
- WriteText (" using the arrow keys on numeric keypad:");
- WriteText (" left(4) and right(6) move to different palette color,");
- WriteText (" ^left and ^right move to colors in larger steps,");
- WriteText (" HOME and END move to the beginning/end colors,");
- WriteText (" up(2), down(8) to increment/decrement all colors,");
- WriteText (" letters R, r, G, g, B, b to incr/decr the color, ");
- WriteText (" invert the palette with x or X, scroll with S or s, ");
- WriteText (" and . or carriage return to end.");
- WriteText ("PSeudo color PS = 0 for default palette");
- WriteText (" PS = 1 for gray scale palette");
- WriteText (" PS = 2 IBM EGA palette");
- WriteText (" PS = 3 Redorange PS = 4 Prism");
- WriteText (" PS = 5 Topo PS = 6 Contour");
- WriteText (" PS = 7 BGRY PS = 8 Glasses1");
- WriteText (" PS = 9 Glasses2");
- WriteText ("SAVe = file saves palette in text file");
- WriteText ("LOAd = file loads palette from file");
- WriteText ("DISplay displays the current palette on the screen");
- WriteText ("ERAse erases the current palette from the screen");
- break;
- case 7 :
- WriteText ("STREtch takes the following keywords :");
- WriteText (" ");
- WriteText ("LOw, HIgh the low and high DN values of the stretch");
- WriteText (" e.g. STRET HI=128 for a stretch between 0 and 128");
- break;
- case 8 :
- WriteText ("CURSor takes no parameters");
- WriteText ("Use the numeric keypad to move the cursor around,");
- WriteText (" '-' and '+' to change the cursor step size, ");
- WriteText (" and '.' or carriage return to end.");
- break;
- case 9 :
- WriteText ("PROFile takes no parameters");
- WriteText ("Move the cursor around as in cursor command");
- WriteText (" '.' or carriage return to select the first and second points");
- break;
- case 10 :
- WriteText ("REFResh takes no parameters");
- WriteText ("Redisplays the images from the refresh buffer");
- WriteText ("and erases any graphics currently on the screen.");
- break;
- case 11 :
- WriteText ("SAVe takes the following keywords :");
- WriteText (" ");
- WriteText ("filename filename of image to save.");
- WriteText ("NL NS number of lines and samples to save");
- WriteText ("SL SS starting line and sample to save");
- WriteText ("BP number of bits per pixel in output image");
- break;
- case 12 :
- WriteText ("BATch takes the following keywords :");
- WriteText (" ");
- WriteText ("filename filename of batch command file");
- break;
- case 13 :
- WriteText ("MENu takes the following keywords :");
- WriteText (" ");
- WriteText ("filename filename of menu list file");
- break;
- case 14 :
- WriteText ("LABel prints the label for the current PDS or FITS");
- WriteText ("format image.");
- break;
- case 15 :
- WriteText ("TEXt takes the following format :");
- WriteText (" ");
- WriteText ("LINe line number to position text at");
- WriteText ("SAMple sample number to position text at");
- WriteText ("TEXT 'text to type out on screen' <cr>");
- break;
- case 16 :
- WriteText ("BROwse takes the following keywords :");
- WriteText (" ");
- WriteText ("mask a wildcard (ie. *.IMG) to select files to browse");
- WriteText ("SIZE the size to use for displaying multiple images");
- WriteText ("SUB a subsampling factor to use to display images");
- WriteText (" ie. 'SUB 2' scales the image to half size");
- WriteText ("NOLabel do not put the filename label on displayed images");
- WriteText ("DNLow DNHigh sets the DN range for all images (see SET)");
- WriteText ("PAUse pauses display when the screen gets full");
- WriteText ("ALL searches all subdirectories in addition to");
- WriteText (" the current directory");
- WriteText ("SELect interactively selects files as they are being");
- WriteText (" displayed and writes the filenames out to a");
- WriteText (" select file");
- WriteText ("FILe fname select files to browse from a file instead of");
- WriteText (" using a mask");
-
- break;
- case 17 :
- WriteText ("OVErlay takes the following keywords :");
- WriteText (" ");
- WriteText ("MAXLAT the upper left latitude of the current image");
- WriteText ("MAXLON the upper left longitude of the current image");
- WriteText ("LEGend draw a legend with the current color assignments");
- WriteText ("DN the dn value to use for drawing grid lines");
- break;
- case 18 : case 19 : case 20 : case 21 :
- WriteText ("The following MSDOS commands are supported:");
- WriteText (" ");
- WriteText ("drive letter: Change default drive to specified letter");
- WriteText ("CD path MSDOS change directory command");
- WriteText ("DIR mask MSDOS directory command");
- WriteText ("TYPe filename MSDOS type command");
- WriteText ("SYStem Spawns an MSDOS process");
- break;
- case 22:
- WriteText("PLOt takes the following keywords :");
- WriteText (" ");
- WriteText ("LIN n plot line n of the image (2-D file only)");
- WriteText ("SYMbol x draw the plot using character x instead of a line");
- WriteText ("ZOOm prompt user to zoom the plot");
- WriteText ("OVErlay overplot - do not erase the current plot");
- WriteText ("CENter plot the image line containing the cursor");
- WriteText ("MAX n set the maximum value in the plot");
- WriteText ("MIN n set the minimum value in the plot");
- WriteText ("COLor n use DN value n to plot the data");
- break;
- case 23 :
- WriteText ("SERial takes the following keywords :");
- WriteText (" ");
- WriteText ("INIt initialize the serial port");
- WriteText ("COM n set COMn as the serial port to use");
- WriteText ("BAUd n set the baud rate to n");
- WriteText ("COMmand 'string' write 'string' out the serial port");
- break;
- case 24 :
- WriteText ("PRInt takes the following keyword :");
- WriteText (" ");
- WriteText ("TEK4693 use the Tektronix 4693DX driver");
- break;
- case 25 :
- WriteText ("NEGative takes no parameters");
- break;
- }
- WriteText (" ");
- }