The sliceO_5 library contain all the functions that have been created for sliceOmatic 5.0. We will only present you the ones that can be of use to you. A number of function are used internally by the program and are of limited interest to programmers outside TomoVision.
Critical section protection. Only one function at a time can be inside the section of your code between "Access_Init" and "Access_End".
void Access_Init( char *str ) ;
void Access_End( char *str ) ;
void Fct_Change_Child( SliceO_Window *window, SliceO_Class *elem, SliceO_Class *old=NULL ) ;
void Fct_Change_Mode( SliceO_Window *window, unsigned char mode ) ;
void Fct_Change_Scale( SliceO_Window *window, float value, float factor ) ;
void Fct_Change_Window( SliceO_Window *window ) ;
The Iterator is a mechanism used to go through database.
int Iterator_Init( char iter_id, char *str, SliceO_Class *root=NULL ) ;
SliceO_Window *Iterator_Window( char iter_id, char flag=0 ) ;
SliceO_Class *Iterator_Class( char iter_id, unsigned int class_id, void *window=NULL, unsigned char flag=0 ) ;
void Iterator_End( char iter_id ) ;
Call the help page associated with the mouse position.
int Fct_Help( char *topic, char *bookmark=NULL ) ;
If you want to protect your module with a license, you use the "License_SliceO_Check" function.
int License_SliceO_Check( int module ) ;
These functions can be used when parsing script commands to replace wild cards with list of pointers.
int Fct_Match_Template_File( char *t_name, int max_match, SliceO_File *List[] ) ;
int Fct_Match_Template_Frame( char *t_name, int max_match, SliceO_Frame *List[] ) ;
int Fct_Match_Template_TAG( char *t_name, int max_match, unsigned short List[] ) ;
int Fct_Match_Template_Window( char *t_name, int max_match, SliceO_Window *List[] ) ;
int Fct_Match_Template_Geom( char *t_name, int max_match, SliceO_Geom *List[] ) ;
int Fct_Match_Template_Point( char *t_name, int max_match, SliceO_Point *List[] ) ;
int Fct_Match_Template_Light( char *t_name, int max_match, unsigned short List[] ) ;
int Fct_Match_Template_Id( char *t_name, int max_match, unsigned short List[] ) ;
// --- in fct_redraw.cpp ---
void Fct_Redraw( UInt64 flag, void *window_mode=NULL, void *class_mode=NULL, Region_2D *region=NULL ) ;
// --- in fct_update.cpp ---
void Fct_Update( UInt64 flag, void *window_mode=NULL, void *class_mode=NULL, Region_2D *region=NULL ) ;
Working with external variables
// --- ds fct_variable.c++ ---
void * Fct_Variable_Get( char *name, int *size=NULL, unsigned short *type=NULL, int (**update)(void)=NULL, char ignore_RO=0 ) ;
void * Fct_Variable_Value( char *name, int *size=NULL, unsigned short *type=NULL, int (**update)(void)=NULL ) ;
Coordinate systems
// --- in fct_window.cpp ---
SLICEO_DB void Wnd_2_Inf( SliceO_Window *wind, float curs_x, float curs_y, float *inf_x, float *inf_y ) ;
SLICEO_DB int Inf_2_Wnd( SliceO_Window *wind, float inf_x, float inf_y, float *wnd_x, float *wnd_y ) ;
// --- in structure.cpp ---
SLICEO_DB char *Get_Version_DB( char *test=NULL ) ;
SLICEO_DB void DB_Cleanup( void ) ;
SLICEO_DB void DB_Free( char **buffer ) ;
SLICEO_DB void **Mat_Alloc( int x, int y, char dim ) ;
SLICEO_DB void **Mat_Copy( int x, int y, char dim, void **source ) ;
SLICEO_DB void Mat_Free( int y, void **pt ) ;
// --- in class_frame.fct.cpp ---
SLICEO_DB int Fct_Draw_OpenGL_Pixel( unsigned char Color_Scheme,
float frm_scale_x, float frm_scale_y,
short frm_start_x, short frm_start_y,
short frm_dim_x, short frm_dim_y,
SliceO_Frame *pt ) ;
// --- in database_setup.cpp ---
SLICEO_DB void Database_Free( void ) ;
SLICEO_DB void Database_Geom_Cleanup( void ) ;
SLICEO_DB void Database_Cleanup( void ) ;
//SLICEO_DB void Database_Redraw_Clear( void ) ;
//SLICEO_DB void Database_Redraw_Set( void ) ;
SLICEO_DB void Database_Current( SliceO_Window *window, SliceO_Class *item=NULL ) ;
SLICEO_DB int Database_Click( SliceO_Window *window, int up_down, short x, short y ) ;
SLICEO_DB int Database_Motion( SliceO_Window *window, int up_down, short x, short y ) ;
SLICEO_DB int Database_Select( SliceO_Window *window, Region_2D *region_wnd ) ;
SLICEO_DB int Database_Scroll( SliceO_Window *window, int count, short x, short y ) ;
SLICEO_DB int Database_Key( SliceO_Window *window, int key, short x, short y ) ;
SLICEO_DB void Database_Visibility_Set( SliceO_Window *window ) ;
SLICEO_DB void Database_Resize( SliceO_Window *window ) ;
SLICEO_DB void Database_Stool( int trace_level ) ;
SLICEO_DB int Database_Tree_Generate( void ) ;
SLICEO_DB int Database_File_Add( SliceO_File *file ) ;
SLICEO_DB void Database_Update_A( UInt64 flag_update, SliceO_Class *elem=NULL ) ;
SLICEO_DB void Database_Update_B( UInt64 flag_update, SliceO_Class *elem=NULL ) ;
// --- in database_draw.cpp ---
SLICEO_DB int Database_Viewport( SliceO_Window *window, SliceO_Class *elem=NULL ) ;
SLICEO_DB int Database_Draw_OpenGL( UInt64 flag_draw, SliceO_Window *window, SliceO_Class *elem=NULL ) ;
SLICEO_DB int Database_Draw_Stencil( UInt64 flag_draw, SliceO_Window *window, SliceO_Class *elem=NULL ) ;
SLICEO_DB int Database_Draw_Highlight( UInt64 flag_draw, SliceO_Window *window, SliceO_Class *elem=NULL ) ;
SLICEO_DB int Database_Draw_3D( UInt64 flag_draw, SliceO_Window *window, SliceO_Class *elem=NULL ) ;
// ============================================================================
// ============================================================================
// ============================================================================
// --- in fct_center.cpp ---
SLICEO_DB int Fct_3D_Center( SliceO_Window *window ) ;
// --- in fct_contour.cpp
SLICEO_DB int Fct_Contour_Compute( unsigned int mode, unsigned short over_x, unsigned short over_y, unsigned short over_z ) ;
//SLICEO_DB void Fct_Contour_Cleanup( SliceO_Frame *frame ) ;
SLICEO_DB void Fct_Contour_Free( SliceO_Frame *frame ) ;
SLICEO_DB void Fct_Contour_Reset( void ) ;
SLICEO_DB void Fct_Contour_Draw_Points( SliceO_Frame *frame, short tag, int start, int skip ) ;
SLICEO_DB void Fct_Contour_Draw_Loops( SliceO_Frame *frame, short tag, int start, int skip ) ;
SLICEO_DB int Fct_Contour_Create( SliceO_Frame *frame, unsigned char mode, int o_x, int o_y ) ;
SLICEO_DB int Fct_Contour_Update( SliceO_Frame *frame ) ;
SLICEO_DB int Fct_Contour_Get_Pts( SliceO_Frame *frame, short tag, Point_2D **pts ) ;
SLICEO_DB int Fct_Contour_Get_Loops( SliceO_Frame *frame, short tag, SliceO_Buffer **loop_pt ) ;
// --- in fct_draw_sphere.cpp ---
SLICEO_DB void Fct_Draw_Sphere( int precision ) ;
// --- in fct_file_headers.cpp ----
SLICEO_DB int Fct_Header_Time_DB( FILE *fp_o, char *title, char *name ) ;
SLICEO_DB int Fct_Header_Time_ASCII( FILE *fp_o, char *title, char *name ) ;
SLICEO_DB int Fct_Header_Patient_DB( FILE *fp_o, int frame_nb, SliceO_Frame **frame_pt ) ;
SLICEO_DB int Fct_Header_Patient_ASCII( FILE *fp_o, int frame_nb, SliceO_Frame **frame_pt ) ;
SLICEO_DB int Fct_Header_Scanner_DB( FILE *fp_o, int frame_nb, SliceO_Frame **frame_pt ) ;
SLICEO_DB int Fct_Header_Scanner_ASCII( FILE *fp_o, int frame_nb, SliceO_Frame **frame_pt ) ;
SLICEO_DB int Fct_Header_Image_DB( FILE *fp_o, int frame_nb, SliceO_Frame **frame_pt ) ;
SLICEO_DB int Fct_Header_Image_ASCII( FILE *fp_o, int frame_nb, SliceO_Frame **frame_pt ) ;
// --- in fct_filename.cpp ----
SLICEO_DB int Fct_Open_DirName( char *title, char path[] ) ;
SLICEO_DB int Fct_Open_FileName( char *title, char *format_dscr, int max_files, char files[][MAX_PATH] ) ;
SLICEO_DB int Fct_Save_FileName( char *title, char *format_dscr, char *def_name, char *def_ext, char file[] ) ;
// --- in fct_float_2_text.cpp ---
SLICEO_DB char * Fct_Float_2_Text( double val, char *str=NULL ) ;
SLICEO_DB char * Fct_Float_2_Dist( double distance, char *units=NULL, char *str=NULL ) ;
SLICEO_DB char * Fct_Float_2_Surf( double surface, char *units=NULL, char *str=NULL ) ;
SLICEO_DB char * Fct_Float_2_Vol( double volume, char *units=NULL, char *str=NULL ) ;
// --- in fct_GEMS.cpp ---
SLICEO_DB float Dist_Point_Segment( Point_2D *P, Point_2D *L1, Point_2D *L2, Point_2D *Pt=NULL ) ;
SLICEO_DB float Dist_Point_Line( Point_3D *P, Point_3D *L1, Point_3D *L2, Point_3D *Pt=NULL ) ;
SLICEO_DB float Intertsection_Segment_Segment( Point_2D *A1, Point_2D *A2, Point_2D *B1, Point_2D *B2, Point_2D *Pt=NULL ) ;
SLICEO_DB float Intertsection_Line_Segment( Point_2D *A1, Point_2D *A2, Point_2D *B1, Point_2D *B2, Point_2D *Pt=NULL ) ;
SLICEO_DB int Tessellate( int nb_node, Point_2D *node_list, Point_2D **list_a, Point_2D **list_b, Point_2D ** list_c ) ;
SLICEO_DB float Line_Intersect_Plane( Vect Org, Vect Dir, Vect *plan, float d, Vect *Hit ) ;
SLICEO_DB float Line_Intersect_Movie( void *obj, Vect org, Vect dir, Vect *hit ) ;
SLICEO_DB char Line_Intersect_Box( void *obj, Vect Org, Vect Dir ) ;
SLICEO_DB float Line_Intersect_Poly( Vect Org, Vect Dir, void *patch, Vect *Hit ) ;
// --- in fct_geom.cpp ---
SLICEO_DB int Fct_Geom_Delete( char *t_name ) ;
SLICEO_DB SliceO_Geom *Fct_Geom_Match_Name( char *t_name ) ;
SLICEO_DB int Fct_Geom_Write( char *t_name, char *format, char *file_name ) ;
// --- in fct_gizmo.cpp ---
SLICEO_DB void Fct_Gizmo_Init( void ) ;
SLICEO_DB void Fct_Gizmo_Exit( void ) ;
SLICEO_DB void Fct_Gizmo_Data( SliceO_Window *window, char *str,
Point_2D *pos_wnd, Point_2D *offset,
float angle, float dim_x, float dim_y,
unsigned int color, char flag_3D ) ;
SLICEO_DB void Fct_Gizmo_Arrow( SliceO_Window *window,
Point_2D *pos_wnd,
float angle, float size,
unsigned int color=0x0FFFFFF, char flag_3D=1 ) ;
SLICEO_DB void Fct_Gizmo_Bump( SliceO_Window *window,
Point_2D *pos_wnd,
float angle, float size,
unsigned int color=0x0FFFFFF, char flag_3D=1 ) ;
SLICEO_DB void Fct_Gizmo_Target( SliceO_Window *window,
Point_2D *pos_wnd,
float angle, float size,
unsigned int color=0x0FFFFFF, char flag_3D=1 ) ;
SLICEO_DB void Fct_Gizmo_Draw( Point_2D *wnd_pos, float angle, float size ) ;
SLICEO_DB int Fct_Gizmo_Read( unsigned int *text, char *name, unsigned short min_opacity=0 ) ;
// --- in fct_GLI_2_float.cpp ---
SLICEO_DB float Fct_GLI_2_Float( SliceO_Frame *pt, int GLI_val ) ;
// --- in fct_GLI_2_color.cpp ---
SLICEO_DB unsigned int Fct_GLI_2_Color( unsigned char data_type, float pix_scale, float pix_offset ) ;
SLICEO_DB unsigned int Fct_GLI_2_Color( unsigned char data_type,
float pix_scale, float pix_offset,
float min, float max ) ;
SLICEO_DB unsigned int Fct_GLI_2_Color( int GLI_val ) ;
// --- in fct_GLI_interpolate.cpp ---
SLICEO_DB int Fct_GLI_Interpolate( SliceO_Class *pt, void *ima_1, void *ima_2, Vect pos ) ;
// --- in fct_group_test.cpp ---
SLICEO_DB unsigned int Fct_Group_Test( SliceO_Class *group ) ;
// --- in fct_help.cpp ---
SLICEO_DB int Fct_Help( char *topic, char *bookmark=NULL ) ;
// --- in fct_iterator.cpp ---
SLICEO_DB void Iterator_Create( void ) ;
SLICEO_DB int Iterator_Init( char iter_id, char *str, SliceO_Class *root=NULL ) ;
SLICEO_DB SliceO_Window *Iterator_Window( char iter_id, char flag=0 ) ;
SLICEO_DB SliceO_Class *Iterator_Class( char iter_id, unsigned int class_id, void *window=NULL, unsigned char flag=0 ) ;
SLICEO_DB void Iterator_End( char iter_id ) ;
SLICEO_DB void Iterator_Cleanup( void ) ;
// --- in fct_license.cpp ---
SLICEO_DB float License_SliceO_Firmware( void ) ;
SLICEO_DB int License_SliceO_Check( int module ) ;
SLICEO_DB int License_SliceO_Init( char *mode, unsigned int *Hasp_ID, char *date ) ;
SLICEO_DB int License_SliceO_Exit( void ) ;
// --- in fct_keyboard.cpp ---
SLICEO_DB int Fct_Key_From_Name( char *name ) ;
// --- in fct_loop.cpp ---
SLICEO_DB int Fct_Loop_Start( SliceO_Window *window, SliceO_Class *elem, unsigned char recurs=0 ) ;
SLICEO_DB int Fct_Loop_Stop( SliceO_Window *window, SliceO_Class *elem, unsigned char recurs=0 ) ;
// --- in fct_match_template.cpp ---
SLICEO_DB int Fct_Match_Template_File( char *t_name, int max_match, SliceO_File *List[] ) ;
SLICEO_DB int Fct_Match_Template_Frame( char *t_name, int max_match, SliceO_Frame *List[] ) ;
SLICEO_DB int Fct_Match_Template_TAG( char *t_name, int max_match, unsigned short List[] ) ;
SLICEO_DB int Fct_Match_Template_Window( char *t_name, int max_match, SliceO_Window *List[] ) ;
SLICEO_DB int Fct_Match_Template_Geom( char *t_name, int max_match, SliceO_Geom *List[] ) ;
SLICEO_DB int Fct_Match_Template_Point( char *t_name, int max_match, SliceO_Point *List[] ) ;
SLICEO_DB int Fct_Match_Template_Light( char *t_name, int max_match, unsigned short List[] ) ;
SLICEO_DB int Fct_Match_Template_Id( char *t_name, int max_match, unsigned short List[] ) ;
// --- in fct_OpenGL_format.cpp ---
SLICEO_DB int OpenGL_PixelFormat_RGB( HDC hDC ) ;
// --- in fct_OpenGL_context.cpp ----
SLICEO_DB int OpenGL_Context_On( HWND wnd, char flag ) ;
SLICEO_DB int OpenGL_Context_Off( HWND wnd, char flag ) ;
SLICEO_DB void OpenGL_Stencil_On( int mask_value ) ;
SLICEO_DB void OpenGL_Stencil_Off() ;
// --- in fct_point_2D.cpp ---
SLICEO_DB int Fct_Point_2D_Insert( unsigned short flag, SliceO_Window *window, SliceO_Frame *frame, int id ) ;
SLICEO_DB int Fct_Point_2D_Delete( unsigned short flag, SliceO_Window *window, SliceO_Frame *frame ) ;
SLICEO_DB int Fct_Point_2D_Capture( unsigned short flag, SliceO_Window *window, SliceO_Frame *frame ) ;
SLICEO_DB int Fct_Point_2D_Drag( unsigned short flag, SliceO_Window *window, SliceO_Frame *frame ) ;
// --- in fct_point_3D.cpp ---
SLICEO_DB int Fct_Point_3D_Insert( unsigned short flag, SliceO_Window *window, int id ) ;
SLICEO_DB int Fct_Point_3D_Delete( unsigned short flag, SliceO_Window *window ) ;
SLICEO_DB int Fct_Point_3D_Capture( unsigned short flag, SliceO_Window *window ) ;
SLICEO_DB int Fct_Point_3D_Drag( unsigned short flag, SliceO_Window *window ) ;
// --- in fct_random.cpp ---
SLICEO_DB void Fct_Random_Seed( unsigned int seed ) ;
SLICEO_DB float Fct_Random_Float( void ) ;
SLICEO_DB unsigned int Fct_Random_Int( void ) ;
// --- in fct_redraw.cpp ---
SLICEO_DB void Fct_Redraw( UInt64 flag, void *window_mode=NULL, void *class_mode=NULL, Region_2D *region=NULL ) ;
// --- in fct_tag_enable.cpp ---
SLICEO_DB int Fct_Tag_Enable( unsigned short min_count ) ;
// --- in fct_text.cpp ---
SLICEO_DB int Fct_Text_DrawRasterFont( char *str, short size,
unsigned char r, unsigned char g, unsigned char b,
float x, float y, float z ) ;
SLICEO_DB unsigned short *Fct_Text_To_Bitmap( HWND wnd,
char *str, char *font_name, int font_size,
int width, int height ) ;
// --- in fct_update.cpp ---
SLICEO_DB void Fct_Update( UInt64 flag, void *window_mode=NULL, void *class_mode=NULL, Region_2D *region=NULL ) ;
// --- ds fct_variable.c++ ---
SLICEO_DB void * Fct_Variable_Get( char *name, int *size=NULL, unsigned short *type=NULL, int (**update)(void)=NULL, char ignore_RO=0 ) ;
SLICEO_DB void * Fct_Variable_Value( char *name, int *size=NULL, unsigned short *type=NULL, int (**update)(void)=NULL ) ;
// ============================================================================
// ============================================================================
// ============================================================================
// --- in ogl_icon.cpp ---
SLICEO_DB void Icon_OGL_Slider( int cur, short p_x, short p_y, short d_x, short d_y ) ;
SLICEO_DB void Icon_OGL_PlusMinus( unsigned char flag, short x, short y ) ;
SLICEO_DB void Icon_OGL_CircleSlash( short x, short y ) ;
SLICEO_DB void Icon_OGL_Draw( short start_x, short start_y,
short dim_x, short dim_y,
char *path, char *name ) ;
//SLICEO_DB void Icon_OGL_Free( void ) ;
// --- in ogl_marker.cpp ---
SLICEO_DB void OpenGL_Marker_Draw( SliceO_Window *window, int color, float x, float y, float size, char *name ) ;
// --- in var_util.cpp ---
SLICEO_DB int Variable_Cleanup( void ) ;
SLICEO_DB char **Variable_Replacement( char *arg, int *nb_arg ) ;