Program Resource Files. 1

ASCII File Standard. 1

White Space. 1

File Format Version Number 1

Integer Numeric Information. 2

Floating Point Numbers. 2

Hexadecimal Numbers. 2

Text Data. 2

Comment Fields. 3

Files in the Home Directory. 3

Program Resources Directory. 4

Program Language Directory. 6

Help Directory. 6

Post Script Printer Directory. 6

Post Script Language Directory. 7

 

Program Resource Files

The program gets its resources from various files. Below is a list and description of those files.  All of the below files which are ASCII text files follow the ASCII file standard unless noted otherwise (there are presently four exceptions).  There is generally no reason why a user should need to edit any of these files except for the files in the subdirectory frames.d which define the stereotactic frame.

 

All files ending in .loc may have to be edited at the time the program is installed so that the program can find files and directories.  These files should contain the complete path to the directories and files that they respectively point to.  However, a relative path can be used if the program is always run from the same directory.

 

Note that language is selected in three places:  in the X resource file System2001Res, in the language.dir.loc file, and in the ps.language file.

ASCII File Standard

These files are self documenting because they can contain comments that the program will skip over when reading the files.  Below we describe how numeric and text data is stored in these files, to be distinguished from comments that can be placed in the file.  The application determines what the format of the file is as regards the sequence and type of data to be stored in the file.  See the stereotactic frame example for an example file.

White Space

White space consist of spaces and non printable characters.

File Format Version Number

Every file begins with a file format version number.  This number defines the version of the format of the file, not the version of the file, nor the format of the file.  The format of the file may be defined by either the file name or the directory in which the file is found or the context in which the program reads and writes the file.  The version of the file would be the file date that the operating system stores in the directory.  If the particular application requires any of this information, then that information will be included in the format of the file. 

 

The file format version is an integer.  The purpose of the file format version is to allow for upward compatibility with changes in the contents of a file in later versions of a program.  If new data or different data is to be added to a file, then the new version of a program could still possibly read a file written by or for an older version of the program.  Likewise, an older version of a program, in seeing a format version it does not recognize, would know that it cannot read a file as it probably was written for a later version of the software.

Integer Numeric Information

All numeric information is to be separated by white space.  An example is:

134   829

 

Integers may have a leading - or + sign.   Any other characters will lead to an error condition.

Floating Point Numbers

All numeric information is to be separated by white space.  An example of floating points numbers are:

 

3.14159    2.69    1234

 

Note that a decimal point is not necessary.  Exponential notation with e or E is accepted:

 

 3.14e+12    3.14e12    3.14E-12

 

Numbers may have a leading - or + sign.  There can be no spaces in the number, such as 3.14  e-12  because a space is white space and separates separate numbers, and the example would be interrupted as two separate numbers: 3.14 and 1.0e-12.

Hexadecimal Numbers

A field with base 16 numbers is supported.  The numbers are to be separated by white space.  A hexadecimal number is limited to no more than eight characters.  The characters a-f may be lower or upper case.

Text Data

A text string that may include any white space, spaces or non-printable characters, must begin with the two symbols:  <*

 

and end with the two symbols:  *>

 

All the text between <* and *> will be considered to be part of the text string that is read as a single item.

 

However, text data may also be separated with white space and the <*   *> deliminators not used.  In that case, the text string will start when a printable character is encountered and stop when white space is encountered.   Therefore it is suitable to not use the <* ... *> convention when the text data is to consist of a single word.

Comment Fields

Within the file the C and C++ methods of creating comments will be used.  All data starting with /* and ending with */ will be ignored, unless embedded in a text field between <* and *>.  Unlike C and C++, the /* ... */ may be nested.   For example:

 

  /*  this is a comment /* this is included in the comment */   end of comment */

 

is all a single comment.

 

When ever // is encountered, the rest of the line is a comment until new line is encountered, unless embedded in a text field.

 

Comment lines allow these files to be documented as to their contents and format.

 

An example follows:

/* file type: 2 = Central Axis */ 2

/* file format version: */ 1

/* machine directory name: */ <*Precise*>

/* energy = */ 6

/* date of data: */ <*03-DEC-2000 21:38:30   *>

/* wedge number, 0 = no wedge */ 1

/* field size in cm = */  15.00  15.00

/* Source to Surface Distance in cm = */ 100.00

/* Number of depths: */ 50

/*   depth cm    value*/

     0.00            0.143700

     0.10            0.147900

     0.20            0.156000

 

The below is the same file without the comments.   Note that the only requirement is that white space separate items.   Since the text Precise does not have a space (white space) in it, the <*  *> could be omitted.

 

 2 1  <*Precise*>

6   <*03-DEC-2000 21:38:30   *>

   1

15.0  15.00 100.00  50

     0.00     0.143700       0.10

           0.147900

     0.20            0.156000

Files in the Home Directory

 

System2100:  the executable for the program.  This is what is run.

 

rlDicomDump:  a utility program that will dump the information in a Dicom image file to standard output.  This program file might be found instead in a subdirectory called tools.d or tools.dir.

 

System2100Res:  the X resource file, may also go in the /usr/lib/X11/app-defaults directory.  The format of this file is defined by X, not our ASCII file standard.

 

X looks in the home directory and then in /usr/lib/X11/app-defaults for this file.  If the file is only in the home directory and the user logs in with some other home directory, then X will not be able to find this resource file.  If X cannot find this file the program run will not be useable as text for fields will not be found, and proper creation of popup windows will not occur.  If the user uses su to change user name, X will still look in the original home directory that the user logged into, not the new one.

 

rlresources.dir.loc:  This file defines and contains the path to the directory where the program resource files are.

Program Resources Directory

This directory is pointed to by the file rlresources.dir.loc found in the home directory.  This directory contains files needed by the program.  These files define default values and text used by the program that are not found in an X resource file.

 

AutoBodySurface:  contains information for the automatic contouring of the skin surface.

 

ComputeScoutImages:  contains information for the computed scout images.

 

DrawSizes:  contains information for reducing the number of triangles used in 3d displays.  See also Frame3dDrawable.

 

FileSelectionOptions:  contains default choices for the file selection dialogs, such as whether showing the complete path is the default or not.

 

Frame3dDrawable:  contains default material properties for outlined volumes and isosurfaces.  Contains information to select the resolution to draw in 3d displays (see also DrawSizes).

 

FrameAxesColor:  defines the color to draw a 3d display of axes in.

 

IsoSurface:  contains default values for iso-surfaces.

 

Light:  contains default values for the Open GL light source used in 3d displays.

 

LightModel:  contains default values for the Open GL light model.

 

NewImagesDirectory.loc:   contains the path to the directory where the program should begin looking for Dicom images that are to be imported into a patient directory.  This should be where new images arrive.

 

PatientDirectory.loc:  contains the path to the patient directory.  Each patient will be a directory entry in this directory.

 

Programs.loc:  this file contains the directory where other executables are to be found, such as program rlDicomDump, which may be elsewhere than the home directory (such as tools.dir or tools.d).

 

ROIvolume:  contains default information for region of interest outlined volumes.

 

ScreenColors.dat:  contains a definition of the colors that can be used by the program for graphics.

 

StackedImageCachSize:   contains defaults values for the caching of images by the stacked image set class.

 

XGLResources.dat:  contains values and default values for specifying the visual models to use in the program, both for the user interface and the graphics windows.  For example the X or Open GL protocols may be set here.  Putting part of the user interface into the overlay planes is controlled here.

 

default.que:  contains the default printer que name to use for all print jobs.

 

frames.d:  a directory containing the files that define stereotactic frames.  Each file in this directory must be a rod frame definition file.  These files are written by the user.

 

language.dir.loc:  contains the path to the directory to read files that are specific to a particular language.  Files in this directory would define the spelling of words to use in the user interface.  For example, this file might contain the entry English.d.  This language directory is not to be confused with the language directory used by the Post Script printer files below.

 

ps.dir.loc:  contains the path to the directory where specific information exist for the printer.

 

ps.language:  Contains the name of the language to use for printer applications.  If this file is not found in the resources directory, than it is also searched for the in the printer directory defined by ps.dir.loc.

 

rlLicense.dat:  the license file for the program.

 

tmp.dir.loc:  path to a directory to store temporary files, such as files to be printed, along with default values to be used in connection with temporary files.  The program will purge this directory automatically.  Do not use this directory for anything else that you want to keep.

Program Language Directory

This directory is pointed to by the entry in the file language.dir.loc in the resource directory.  Files in this directory are specific to the language to be used and define text that cannot be assigned in an X resource file.  Each supported language would have a separate directory.

 

AutoBodyLabels:  a list of labels to search for in the name of a body or skin outline.  If the name of the volume does not contain one of these words, the user is prompted to be sure he is putting the skin boundary into the right volume.

 

ComputedScoutLabels:  the words to use to label the coronal, sagittal, and transverse scout views.

 

HelpDirectory.loc:  contains the path to the help directory (where the help files are kept).  This directory can be anywhere but is usually in the specific language directory.

 

PatientOrientationLabels:  the labels and their abbreviations to use to label the patient axes, such as superior, inferior, left, right, anterior, posterior.  Other default values are defined as well, such as the minimum size of the window in which labels will appear.

Help Directory

This directory is pointed to by the file HelpDirectory.loc in the resources specific language directory above.  This directory contains each of the files that the program will look for when a help button is pushed.  The name of each file is hard coded into the program.  The files are numerous and will not be listed here.  This directory can be anywhere but is generally contained in the specific language directory.

Post Script Printer Directory

This directory is pointed to by the file ps.dir.loc in the resources directory.  Here files specific to the use of Post Scrip printers are defined.  Files are also here in a subdirectory that define the spelling of words for different languages.  These would be words that are to appear on printed pages.

 

ps.language:   this file may also be in the resources directory instead.  It defines the name of the language to use.  In the Post Script Printer Directory, a directory with this name must appear with the suffix of .dir.  For example, for English in this file, the subdirectory English.dir must be present, and is described below.

 

que_name_list:   this file contains the names of printer que names that are available.  The file in the resource directory, default.que, defines the que name to use from this list.  If the file default.que does not exist in the resources directory, than the first entry in this file is used for the default printer que name.

 

 

For the next three files, the prefix is found from the default.que file in the resources directory.  Shown below would be the result for the entry lp0 in default.que:

 

QueName.leader, where QueName is replaced with the actual printer que name, such as lp0.leader:   the contents of this file is appended to the front of any file being submitted to the printer.  Here for HP printers, for example, we command the printer to enter Post Script.  This file does not follow the ASCII standard, with the entire contents used as is.  It is not an error if this file does not exist.  Note that the file QueName.lang_prologue in the Post Script specific language directory below is next added to the print file being built, where QueName is replaced with the specific printer que name.

 

QueName.trailer, such as lp0.trailer:   the contents of this file is fixed to the end of any file submitted to the printer.  Here for HP printers we turn off the Post Script language.  This file does not follow the ASCII standard, with the entire contents used as is.  It is not an error if this file does not exist.

 

QueName.resource, such as lp0.resource:   here we define the paper size and margins for the particular printer que.

 

language.dir:   this directory is defined by the entry in the file ps.language, where .dir is appended to the end of the language name.  For example, for the entry English in ps.language, the program would look for the directory English.dir in this directory.

 

FontName.width: For each font that is on the post scrip printer that is to be specified to be used below, a file must exist here with the suffix .width.  For example, for Helvetica-Bold there must be a file:  Helvetica-Bold.width.

The font name must correspond to the font name known to the Post Script printer.

This file defines the width of each character in the font relative to a point size of 10.  Each entry in the file for a character consist of three entries, for example:

 

83  6.67  S

 

defines ASCII code of decimal value 83 to have a width of 6.67 points (for a font size of 10 points) and the character is S.  The last entry is for documentation purposes only within this file and does not define that S has an ASCII value of 83.  For a space the letters sp may be used in place of the character.  The letters na may be used for printable characters that can’t be represented in this text file.  If no entry is made for an ASCII value, a font width of zero is assumed.

Post Script Language Directory

This is the subdirectory where language specific files are kept.

 

QueName.lang_prologue:   this file is added to the post script file that is being built to be printed after the leader, QueName.leader (lp0.leader above).  This file is dumped as is and does not follow the ASCII file standard.  This will allow making any necessary additions such as loading a specific font for a specific language.  It is not an error if this file does not exist.

 

lp0.fontlist:   this file name is built from the entry in file default.que, here shown for printer que name lp0.  The font list file contains the name of the fonts that are to be used on the printer, and an abbreviation for each font, for example:

 

Helvetica HV

Times-Bold TB.

 

The names must correspond to the Post Script names known to the Post Script printer.  The abbreviations are used by this application.  For each font used here, a file must exist in the above Post Script printer directory with the ending .width.  For example, for Helvetica there must be an Helvetica.width file up one directory that defines the width of characters in that font.

 

A directory must be assigned here whose name is hardcoded in programs, for example System2100.d.  The files in this directory contain the font size, font, color, and text to use for text printed to a Post Script printer.   The file names are also hard coded in the program.  A typical entry in a file contained within this directory is shown below:

 

PatientNotes  12  TB  0 0 0 <*Notes on the Patient *>

 

The first entry, PatientNotes, defines a name hard coded in a program for this entry.  Each such name must be unique within each file.

The second entry, 12, is the font size to use.

The next entry, TB, is the abbreviation of the font name, and must be defined in the QueName.fontlist file above.

The next entries define the color to use.  The colors range from 0, 0, 0 for black to 255, 255, 255 for white.  Each of the three numbers is the intensity, respectively, for red, green, and blue, in the range of 0 to 255.

The last entry is the actual text to use (contained between <* and *> accordingly to our ASCII file standard above).

 

System2100.d:  This is the directory name to use for program System2100.

 

System2100.d/PatientReports.txt:   This file contains entries for program System2100 for printing patient reports.  See above for how the entries are formatted.  Different language directories will allow for changing the text to a spelling used by another language, and for specifying the fonts to use for the other language.

 

At this time multi-byte alphabets are not supported.