BRAIN.IM0 1 0 19 1This indicates that there are 20 slices in BRAIN.IM0 with the first slice beign numbered 0 and last being 19, and the increment is 1. A four-dimensional file would be represented as :
BRAIN2.IM0 2 0 19 1 0 7 1There are 20 slices and 8 time instances in this case for a total of 160 slices.
BRAIN2.IM0 2 0 19 1 0 7 1 SKULL.SH0 -1 CHILD.BS0 -2 BRAIN.SH1 -3 SKULL2.BS1 -4The related functions are VReadGlobalcomFile and VWriteGlobalcomFile.
typedef struct { short on; /*whether menu is on (1/0)*/ short item_selected; /*the upper left coordinate*/ short cmd_wd; /*the menu height*/ } HorizontalMenuInfo; /*menu width*/ typedef struct { short up; /*whether menu is on (1/0)*/ short x, y; /*the upper left coordinate*/ short height; /*the menu height*/ short width; /*menu width*/ } VerticalMenuInfo;This file stores information in the following format :
typedef struct { char cmd[30]; /*the name of the command*/ char function[30]; /*the name of the function*/ char process[30]; /*the name of the process*/ char filetype[100]; /*the types of files used*/ short father; /*the father pointer of node*/ short sibling; /*the next sibling pointer*/ short son; /*the son pointer of node*/ short x, y; /*the upper left coordinate*/ short terminal_leaf_node; /*terminal node (1/0)*/ } TreeInfo;The related functions are VDisplayMenu, VSelectMenuItem, VRemoveMenus, and VRedisplayMenus.
Process Name : input Function Name : main Error Occurred : Mon Oct 4 17:01:13 1993 Error Message : Invalid value in the file header for Type 1DThe above entries are obvious. The "Process Name" refers to the process where the error occured. The "Function Name" refers to the function within the process where the error occured. The "Error Occurred" entry writes the date and time this error was encountered. The "Error Message" entry indicated the kind of error that was noticed. All these entries are written to the 3DVIEWNIX.ERR file using VDecodeError function.
GROUP ELEMENT LENGTH VALUE VR VM TYPE DEFAULT 3DVIEWNIX-CODE DESCRIPTION ----- ------- ------ ----- -- -- ---- ------- -------------- ----------- COMMAND INFORMATION GROUP ------------------------- 0000 0000 0004 0000 ____ BD S 1 ____ 0,0 Group len 0000 0001 0004 0000 ____ BD S 1 ____ 0,0 Mess. len 0000 0010 ____ ____ ____ AT S 1 ____ 0,0 Recog code(ver. no.) The above gives a part of the protocol for the COMMAND INFORMATION GROUP in the GeneralInfo data structure of 3DVIEWNIX.HDR file. The ACRNEMA protocol is storred as a quadruple
0008 0010 1 0where each entry is a
62194;51400;48316; 17733;17733;22873; 23901;23644;32639; 0;0;6425; 49344;49087;58853; 65535;65535;42919; 65535;65535;1028; 65535;0;16448; 65535;0;16448; 9509;13107;15934; 30069;20046;30326; 65535;28013;0; /usr/mipgsun/fm/mipg_imagesEach of the first 12 entries are RGB values of the reserved color. The reserved colors are arranged as follows :
----------------------------------------------------- Reserved Color (Pixel) Purpose ----------------------------------------------------- 0 (246) - border and text color ----------------------------------------------------- 1 (247) - title,dialog and mouse win background color ----------------------------------------------------- 2 (248) - special color for 3d effect ----------------------------------------------------- 3 (249) - special color for 3d effect ----------------------------------------------------- 4 (250) - special color for 3d effect ----------------------------------------------------- 5 (251) - dialog message color ----------------------------------------------------- 6 (255) - text on image without overlay ----------------------------------------------------- 7 (254) - text on image with overlay ----------------------------------------------------- 8 (253) - image window color when overlay 1 is on ----------------------------------------------------- 9 (252) - image window color when overlay is off ----------------------------------------------------- 10 (245) - highlight color for menu/panel ----------------------------------------------------- 11 (244) - special color used in help -----------------------------------------------------If a user does not want to use the DEFAULT reserved colors, (s)he can change it within 3DVIEWNIX by using the MISCELLANEOUS/COLORMAP module.
Fatal error No error MEMORY ALLOCATION ERROR READ ERROR WRITE ERROR FILE OPEN ERROR IMPROPER FILE SEEK Invalid window ID .....VDecodeError looks up this file when a user passes the error code, and prints the proper error message to the 3DVIEWNIX.ERR file.
GENERAL PORT_DATA PREPROCESS VISUALIZE MANIPULATE ANALYZE MISC.Inside each category there are topics. Within topics, there are subtopics. The topics and subtopics are color coded for easy reading. The HELP contents are listed separately in the bottom window of the HELP window. The HELP file looks like :
#GENERAL# #Topic 1 INTRODUCTION 3DVIEWNIX is a data-, machine-, and application-independent software system developed by the Medical Image Processing Group, Department of Radiology, University of Pennsylvania, Philadelphia. ... #endtopic# #Topiclevel2 1.1 How To Use This Document Section 2 describes the 3DVIEWNIX installation procedure. Systems manager or those who are responsible to install 3DVIEWNIX at your site should read that section. ... #endtopic# #endchapter#It is easy to add new topics and subtopics to this list. However the the six categories in HELP are fixed. To change this, one will have to change the VDisplayHelp function. An experienced 3DVIEWNIX programmer should be able to do this.
-1 1 15 PORT-DATA 0 horizontal 0 0The first column in this entry represents parent of the current entry. The second column represents the son (daughter) and the third column represents the sibling of the current entry. In the case above this entry has no parent (-1), it has a son at the next line and the 15th entry down the file is the sibling. The next column is the name of the MENU command as it appears in the window. In this case it is "PORT-DATA". The next column represents the process associated with the command. In this case there is no process associated with the command. The next command indicates whether the next level of menu is going to be horizontal or vertical (terminal) menu. The next column represents the files that should be loaded when the INPUT module comes up. In this case there are no files that are associated with this comand. The last column of this entry indicates whether this comand is a terminal node (-1) or a non terminal node (0). The progams "cr_menu_tree" reads the MENU_TREE file and writes it in a binary file called MENU.COM file.
0 PORT-DATA 0 horizontal 0 1 In 0 horizontal 0 2 FromAcrnema from_disk 0 0 2 FromTape 0 vertical 0 3 GE8800 dummy_proc 0 0 3 GE9800 dummy_proc 0 0 3 SIGNA dummy_proc 0 0 3 PennPET dummy_proc 0 0 2 EasyHeader EasyHeader 0 0 2 CreateFileHeader create_fileheader 0 0 2 ModifyFileHeader modify_fileheader 0 IM0/BIM/MV0/BS0/BS1/SH0 2 Retrieve retrieve 0 0 1 Out 0 vertical 0 2 BackUp backup 0 0 1 ChangeDefaultTape change_tape 0 0The above entries show a systematic separation of levels in the menu. As shown above all entries starting with 1 are sons (duaghters) of entry starting with 0. Similarly all entries starting with 2 are sons (daughters) of entries starting with 1 and so on.
0 PORT-DATA 0 horizontal 0 ...... 2 FromTape 0 vertical 0 3 Elsinct elsinct 0 0 3 GE8800 dummy_proc 0 0 3 GE9800 dummy_proc 0 0 ...... 1 ChangeDefaultTape change_tape 0 0What the above addition means is that there will be another entry in the vertical menu under "FromTape" that will include Elsinct as the first entry. The "elsinct" program has no children and it will read any kind of file.
0 ANIMATION 0 horizontal 0 1 Still_pictures 0 horizontal 0 2 GIF gif 0 0 2 SunRaster sunraster 0 0 2 PostScript 0 vertical 0 3 GrayScale grayscale_postscript 0 0 3 Color color_postscript 0 0 2 TIFF tiff 0 0 2 Khoros 0 vertical 0 3 Viff viff_khoros 0 0 3 XV xv_khoros 0 0 1 Movie 0 vertical 0 2 Continuous continuous 0 0 2 DisContinuous discontinuous 0 0After editing the SIMPLE_MENU file, please run the "create_menu" program to create the MENU_TREE file in the FILES directory.
mipgsun /dev/nrst1 f 1/2inch chromos2 /dev/nrst0 f 1/4inch imager2 /dev/nrst0 f 1/4inch 3dv1 /dev/nrtape8mm t 8mm 3dv1 /dev/nrtape t 1/4inchThe format of TAPE_PATH_NAME file is :
machine_name1 device1 mt_option tape_size machine_name2 device2 mt_option tape_size .....where machine_name indicates the name of the machine the tape drive is mounted on; device indicates the name of the tape drive which does not rewind the tape automatically (i.e., /dev/nrst1); mt_option indicates the option to be used by the "mt" command to specify the tape device; tape_size indicates what kind of tape device (e.g., 1/4inch, 1/2inch, 8mm) it is.
% cc mtfsf.c -o mtfsf