B: The System DLLs

 

 

SliceO_System\3D.dll

 

System Variables defined in this library:

 

 

$GEOM_TAG_NB

(I32,R)

Number of potential 3D geometries created from TAG data (through modes such as (Contour Line, or Shell). (= $TAG_NB)

 

 

$GEOM_FILE_NB

(I32)

Number of 3D geometries not created from TAG (probably imported in sliceOmatic from a 3D format such as MOVIE.BYU).

 

 

Commands recognized in this library:

 

Geom: t_surf Write (mov|dxf|stl|stl_ascii|obj) file_name

Write all the geometries matching the template "t_surf" to the file "file_name" using the selected file format. The available formats are:

 

mov

Movie.BYU format.  This old polygon format, developed by Brigham Young University for their MOVIE.BYU program in the 80's, is very simple, which makes it ideal to store simple polygonal objects such as those created in sliceOmatic.  The format is described in more detail in appendix E

 

dxf

Autocad file format.  The geometries will be saved using the POLYLINE primitives.  A definition of the DXF file format can be found in Wikipedia.

 

stl

Stereolithography file format (binary version and ASCII versions).  A definition of the STL file format can be found in Wikipedia.

 

Note:

STL format can only describe 1 object.  If multiple objects are selected, sliceOmatic will create 1 file per object.

 

 

stl_ascii

 

obj

Wavefront OBJ file format.  A definition of the OBJ file format can be found in Wikipedia.

 

Geom: t_surf Delete

Delete all the geometries matching the template "t_surf".

 

 

SliceO_System\A.dll

 

System Variables defined in this library:

 

 

$FRAME_TOTAL

(U32)

Total number of frames.

 

$FRAME_LIST

(U32)

List of all the frames (1, ..., n)

 

 

$FRAME_OVR

(P)

Pointer to the frame under the mouse (or NULL if the mouse is not over a frame).

 

$FRAME_CUR

(P)

Array of pointers to the current frames.  One entry for each window.

 

$MOUSE_WND

(P)

Position of the mouse in window, infinite and frame coordinates.

 

 

 

$MOUSE_INF

(P)

 

$MOUSE_FRM

(P)

 

 

SliceO_System\Brush.dll

 

System Variables defined in this library:

 

 

$BRUSH_MAX

(U16,R)

Maximum number of brushes (Read only)

 

$BRUSH_NB

(U16)

Number of brushes actually used.  (Default=$BRUSH_MAX)

 

$BRUSH_LIST

(A,U16)

List of all the brushes (1,...,n)

 

$BRUSH_CUR

(U16)

Index of the current brush. (1 to $BRUSH_NB)

 

$BRUSH_SIZE

(A,U16)

Array of brush sizes, one per brush.

 

$BRUSH_RADIUS

(U16,R)

Maximum brush radius. (Read only)

 

$BRUSH_BIG

(U16)

Size of the big square brush (created with the middle mouse button).

 

Commands recognized in this library:

 

Brush: Current value

Assign a value to the variable $BRUSH_CUR used to specify the current brush.

 

 

SliceO_System\Computer.dll

 

System Variables defined in this library:

 

 

$COMPUTER_NAME

(S,R)

The name of the computer running the program

 

$COMPUTER_THREAD_MAX

(U16,R)

The maximum number of thread that can be run (= Number of CPU + Hyper Threading)

 

$COMPUTER_THREAD_NB

(U16)

The number of concurrent thread that will use in multi-thread operations

 

$COMPUTER_THREAD_ID

(A,U32)

Vector of thread IDs (only valid during multi-thread operations)

 

 

SliceO_System\Database.dll

 

System Variables defined in this library:

 

 

$DB_CLASS_NB

(U32)

Number of defined classes

 

$DB_TREE_NB

(U32)

Number of classes used in the database tree

 

$DB_FILE_NB

(U32)

Number of files loaded in the program

 

 

$DB_FILE_PT

(A,P)

Array of pointers to the loaded files structures

 

$DB_ROOT_PT

(P)

Pointer to the root class in the database tree

 

Commands recognized in this library:

 

Database: List

List all the classes currently available. 

 

Database: Tree [str_1 ... str_n]

Re-create the database tree of images using the classes specified. If no class is specified, only the root and frames classes will be used.

 

Database: Stool

Print out the content of the database tree.

 

 

SliceO_System\Document.dll

 

Commands recognized in this library:

 

Document: Append file_name

Open the document "file_Name" and append information at its end. If no path is specified, the default path ($DEFAULT_FILE_PATH) will be used.

 

Document: Close

Close the document .

 

Document: Open file_name

Open the document "file_Name".  If the file was already existing, its content will be erased. If no path is specified, the default path ($DEFAULT_FILE_PATH) will be used.

 

Document: Write string1 ...

Write the strings to the opened document .

 

Note:

 

The "Document" mechanism can be used to save information from the program's variables.

ex:

document: open test.txt

document: write The current brush is: $BRUSH_CUR

document: close

 

 

SliceO_System\File.dll

 

Commands recognized in this library:

 

File: t_file Dim x y z

Change the pixel dimensions for all the files matching the templates "t_file".  If one of the parameters "x", "y" or "z" is "0", then that parameter will be left unchanged.

 

Note:

 

The "z" dimension of a pixel is the slice thickness. So, for example, changing the slice thickness of all the images loaded in sliceO to 2mm can be done with:

file: * dim 0 0 2

 

File: t_file D_H x y z

Change image's horizontal direction vector for all the files matching the templates "t_file".  If one of the parameters "x", "y" or "z" is "0", then that parameter will be left unchanged.

 

File: t_file D_V x y z

Change image's vertical direction vector for all the files matching the templates "t_file".  If one of the parameters "x", "y" or "z" is "0", then that parameter will be left unchanged.

 

File: t_file Org x y z [t]

Change the image's origin for all the files matching the templates "t_file".  If one of the parameters "x", "y" "z" or "t" is "0", then that parameter will be left unchanged.

 

Templates:

 

t_file is a template for the file's names

 

 

SliceO_System\GLI.dll

 

System Variables defined in this library:

 

 

$GLI_COLOR_COMPONENT

(U8)

Component used in a color (RGB) image: Max(=0), Red(=1), Green(=2), Blue(=3) or Composite(=4).

 

$GLI_COLOR_DISPLAY

(U8)

Red, Green or Blue components are displayed as B&W (=0) or color (=1).

 

 

SliceO_System\Interface.dll

 

System Variables defined in this library:

 

 

$INTERFACE_SIZE

(U8)

Specify the size of all interface tools in the program (0,1 or 2). (Default=2)

 

$INTERFACE_FLOAT

(U8)

Specify if the interface windows are docked (=0) or floating (=1) (Default=0)

 

$INTERFACE_HELP_KEY

(S)

Define which key is associated with the help function. (Default="F12")

 

$INTERFACE_HELP_INDEX

(S)

Give the path to a local copy of the HTML Index file. If none is given, we use the TomoVision web pages. (Default=none)

 

$INTERFACE_TOOL_WIDTH

(I16)

Give the size (in pixels) of the control area. (Default=350)

 

$INTERFACE_TEXT_HEIGHT

(I16)

Give the minimum height (in pixels) of the text window. (Default=120)

 

$INTERFACE_MENU_HEIGHT

(I16)

Give the height (in pixel) of the menu bar. (Default=26)

 

$INTERFACE_TITLE_FONT...

 

Specify the appearance of little text in the interface (FONT_NAME, FONT_SCALE and FONT_WEIGHT)

 

$INTERFACE_TOOL_FONT...

 

Specify the appearance of all other text in the interface (FONT_NAME, FONT_SCALE and FONT_WEIGHT)

 

Commands recognized in this library:

 

Interface: Size (small|medium|big)

Assign a value to the variable $INTERFACE_SIZE used to specify the size of all the tools used in sliceOmatic.  This is useful if your screen resolution is insufficient to display all the tools you want at the same time.

 

 

SliceO_System\Key.dll

 

System Variables defined in this library:

 

 

$KEY_NAME

(A,P,R,U)

Array of pointers to structure containing the definition of all the available keys on the keyboard

 

$KEY_CODE

(A,P,R,U)

Array of pointers to structure containing all the remapped keys.

 

Commands recognized in this library:

 

Key: List

List all currently mapped keys

 

Key: name Map script_command

Associate a command to a specific key.

ex:

key: g map "Grid: on toggle"

key: SHIFT_F5 map "overlay: file toggle"

 

Note:

 

The list of all available key names is provided in Appendix C.

 

 

SliceO_System\OpenGL.dll

 

System Variables defined in this library:

 

 

$OPENGL_CONTEXT

(U32)

Specify the driver used by the program.

 

$OPENGL_FLAG

(U32)

Bit field of graphic modes.

 

$OPENGL_SPEED

(U32)

Split 3D redraw.

 

$OPENGL_TEXTURE_SIZE

(U32)

Maximum texture size (in pixels, must be a power of 2). (Default=512)

 

 

$OPENGL_STATE

(U32,U)

Current state of OpenGL

 

Commands recognized in this library:

 

OpenGL: Context value

Assign a value to the variable $OPENGL_CONTEXT used to specify the graphic driver used by the program.  (See the Drivers tab of The Configuration Menu.)

 

OpenGL: Flag value

Assign a value to the variable $OPENGL_FLAG.  The flag is a "or" of the different supported values.

The supported values are (in hexadecimal):

0x01 = Index mode. TAG images are displayed using color index rather than RGB values.

 

OpenGL: Speed value

Assign a value to the variable $OPENGL_SPEED used to split big 3D geometries in multiple parts to keep real-time when manipulating 3D objects.  (1 <= value < 100).  By default value=1.

 

 

SliceO_System\Read.dll

 

System Variables defined in this library:

 

 

$READ_PATH

(S)

Macro for the GLI path when reading

 

$READ_PATIENT

(S)

Macro for the GLI file name to use

 

$FILE_TAG_DIR_FLAG

(U8)

1 if a directory other than the one of the original GLI file is used

 

$FILE_TAG_DIR_NAME

(S)

Path of the directory where the TAG files are to be saved

 

$FILE_TAG_SUFFIX_FLAG

(U8)

1 if a suffix is to be added to the TAG file's name

 

$FILE_TAG_SUFFIX_NAME

(S)

Suffix to add to the TAG file's name

 

$DEFAULT_FILE_PATH

(S)

Default file's path

 

$DEFAULT_ICON_PATH

(S)

Path to the icons used in sliceO

 

$DEFAULT_USER_PATH

(S)

Path to the users directory

 

$DEFAULT_PIPE_PATH

(S)

Path to the sliceO_5.dat file

 

$STARTUP_SCRIPT

(S)

Path to a script to read at startup (default=none)

 

Commands recognized in this library:

 

Read: Startup file_name

Read a startup script.  This command is used internally by the program to read an optional script at startup. (See the Basic tab of The Configuration Menu).

 

Read: Scratch path_name

Specify the scratch directory to use to create temporary files.  By default, the scratch directory is "c\temp".

 

Read: Image file_name [t=offset]

Read an image file in the program. The file can contain one or multiple images (depending on the file format). SliceOmatic can read a number of different file formats.  A detailed list is available on our web site. You can also specify an offset that will be added to the original images positions.

 

Read: Script file_name

Read and execute a script file.

 

Read: Geom file_name

Read a 3D geometry in the program.  SliceOmatic can read files in MOVIE.BYU and STL formats.

 

Read: Patient patient_name

Associate the value specified by "patient_name" to the variable $PATIENT used to read files

 

Read: Path path_name

Associate the value specified by "path_name" to the variable $PATH used to read files

 

 

SliceO_System\Regional.dll

 

System Variables defined in this library:

 

 

$REGIONAL_FRACTION

(U8)

Character used to specify how a floating point value is represented. (Default = '.')

 

$REGIONAL_SEPARATOR

(U8)

Character used to specify the character used to mark the end of a cell in the spreadsheet file format.  (Default, = '\t')

 

$REGIONAL_FILLER

(S)

Character used to specify what string should be used to express results that have no values.  (Default = " ")

 

Commands recognized in this library:

 

Regional: Fraction (.|,)

Assign a value to the variable $REGIONAL_FRACTION used to specify how a floating point value is represented. The default value is ".".

 

Regional: Separator (tab|,)

Assign a value to the variable $REGIONAL_FRACTION used to specify the character used to mark the end of a cell in the spreadsheet file format.  By default, the "tab" character is used.

 

Regional: Filler string

Assign a value to the variable $REGIONAL_FRACTION used to specify what string should be used to express results that have no values.  By default the "space" (" ") character is used.

 

Note:

 

A description of these parameters can also be found in the File tab of The Configuration Menu.

 

 

SliceO_System\Select.dll

 

System Variables defined in this library:

 

 

$SELECT_FRM_NB

(U16,R)

The number of frames selected in the current window.

 

$SELECT_GLI_MIN

(F32)

The minimum GLI value among the selected frames.

 

$SELECT_GLI_MAX

(F32)

The maximum GLI value among the selected frames.

 

Commands recognized in this library:

 

Select: t_frame Set (on|off|toggle)

All the frames matching the templates "t_frame" will have their selection flag set t on, off or toggled.

 

Templates:

 

t_frame is a template for the frame's names

 

 

SliceO_System\Tag.dll

 

System Variables defined in this library:

 

 

$TAG_MAX

(U16,R)

Maximum number of TAG. (= 256)

 

$TAG_NB

(U16)

Number of TAG accessible (16 <= $TAG_NB <= $TAG_MAX)

 

$TAG_CUR

(U16)

Current tag value (0 <= $TAG_CUR <= $TAG_NB)

 

$TAG_ENABLE

(A,U8)

Array of "Enabled" flags for all tags.  Used in 3D

 

$TAG_LABEL

(A,S)

Array of tag labels.

 

$TAG_SELECT

(A,U8)

Array of "Select" flags for all tags

 

$TAG_RED

(A,U16)

Array of red, green and blue colors for all tags (use 8 higher bits)

 

 

 

$TAG_GRN

(A,U16)

 

$TAG_BLU

(A,U16)

 

$TAG_ALPHA

(A,F32)

Array of transparencies for all tags

 

$TAG_MIX

(F32)

Mix value for the "Mixed" display mode

 

$TAG_AUTOSAVE

(U16)

Delay between auto-saves (0=off)

 

Commands recognized in this library:

 

Tag: Current value

Assign a value to the variable $TAG_CUR used to specify the current TAG.

 

Tag: Number value

Assign a value to the variable $TAG_NB used to specify the total number of TAG used by the program. Value must be a power of 2 between 16 and 256 (16, 32, 64, 128 or 256).  By default the number of TAB available is 128.  (See the TAG tab of The Configuration Menu.)

 

Tag: Grab

Assign the TAG value under the cursor  to the variable $TAG_CUR used to specify the current TAG (the cursor must be over a frame).

 

Tag: Mix value

Assign a value to the variable $TAG_MIX used to specify the the ratio of TAG color to GLI color used in the "Mixed" color mode.  (See Color Scheme in The 2D Tools section)

 

Tag: Autosave value

Assign a value to the variable $TAG_AUTOSAVE used to specify the delay between automatic saving of the TAG images.  (See the TAG tab of The Configuration Menu.)

 

Tag: Suffix (off|string)

Assign values to the variable $FILE_TAG_SUFFIX_FLAG and $FILE_TAG_SUFFIX_NAME used to add a suffix to the saved tag file's names.  (See the TAG tab of The Configuration Menu.)

 

Tag: Path (off|path_name)

Assign values to the variable $FILE_TAG_DIR_FLAG and $FILE_TAG_DIR_NAME used to specify where the tag files are saved.  (See the TAG tab of The Configuration Menu.)

 

Tag: t_tag Color R G B

Assign a color to a tag value.

 

Tag: t_tag Delete

Delete the tag values matching the template "t_tag" from the selected frames.

 

Tag: t_tag Change value

Change the tag value of all tags that match the template "t_tag" to the value "value" for all selected frames.

 

Tag: t_tag Label string

Assign the label "string" to all the tags matching the template "t_tag".

 

Templates:

 

t_tag is a template for the TAG values.  It matches either the TAG ID ("0" to "256") or the TAG label or "cur" for the current TAG value.

 

 

SliceO_System\Undo.dll

 

System Variables defined in this library:

 

 

$UNDO_MAX

(U16,R)

Maximum number of UNDO. (= 40)

 

$UNDO_NB

(U16)

Current number of possible Undo. (0 <= $UNDO_NB <= $UNDO_MAX)

 

$UNDO_SIZE

(U32)

Maximum size of each undo (in bytes) (Default=10Mb)

 

$UNDO_TAG

(A,U8)

Array of TAGs that are modified by the latest Undo/Redo operation.

 

Commands recognized in this library:

 

Undo: Number value

Assign a value to the variable $UNDO_NB used to specify the maximum number of undo operations kept. (0 <= value <= $UNDO_MAX).  A value of 0 turns the undo to off.

 

Undo: Size value

Assign a value to the variable $UNDO_SIZE used to specify the maximum size of any undo operation. Value is specified in Mbytes. (1<= value <= 100)

 

Undo: Undo

Perform one "undo" operation.

 

Undo: Redo

Perform one "redo" operation.

 

 

SliceO_System\Variable.dll

 

Commands recognized in this library:

 

Variable: List [mode ...]

List the variables that match the "mode" arguments.  Mode can be one of: user, system, char, short, int, long, float, double, vector, color, string, array, unsigned, pointer or readonly.

 

ex:

Var: list system unsigned short

will list all U16 system variables.

 

Variable: Print "var_name"

Report "the name of the variable" = "the value of the variable".

 

Note:

 

You must use quotes ("") to protect the variable name, otherwise it will be replaced by its value before the "Variable" command even receives it!

 

 

SliceO_System\Write.dll

 

System Variables defined in this library:

 

 

$WRITE_HEADER

(U8)

Bits field flag for the creation of headers.

0x01 = Patient Info

0x02 = Scanner Info

0x04 = Image Info

 

Commands recognized in this library:

 

Write: Header (patient|scanner|image) (on|off)

Enable or disable the creation of optional headers when writing output files. (See the File tab of The Configuration Menu.)

 

Write: TAG [mode]

Save all modified TAG files.  The "mode" argument is reserved for sliceOmatic's use.