Up to TkMeditGuide

Back to TkMeditSampleScreenshotScript

Continue to TkMeditCommandLineOptions

File Name Substitution

Whenever a file name is required to load or save data, the following system is used. First, on startup, TkMedit attempts to acquire a User Home Directory and a Subject Home Directory. The User Home Directory is always the current directory from which TkMedit was launched. The Subject Home Directory is based on the way in which the anatomical data was loaded. If the default TkMedit loading method is used, it is the concatenated contents of $SUBJECTS_DIR and the subject name. If the -f switch is used, it is the value of that parameter.

If the first character of the file name is ~ (tilde) or . (period), it is substituted with the Subject Home Directory or User Home Directory, respectively. If the first character is another alphanumeric character, a default location directory is prepended to the file name. If the first character is / (slash), it is left alone. This behavior is summarized below:

If the first character of FILENAME is....

The final file name is...

~ (tilde)

SUBJECT_HOME_DIR/FILENAME

. (period)

USER_HOME_DIR/FILENAME

/ (slash)

FILENAME

other character

Subject-home-dir/Subdirectory/FILENAME

...where FILENAME is the file name that was input.

The subdirectory used in the last substitution depends on the file type being loaded, and is appropriate for the standard NMR center directory structure. These are:

Data Type

Subdirectory

Head Points

bem

Surface

surf

Anatomical

mri

ROI/Label

label

RGB

image/rgb

Control Points (control.dat)

tmp

Edit (edit.dat)

tmp

Segmentation

mri

Color Table

$CSURF_DIR

Label

label

Anatomical Transform

mri/transforms