1 /***************************************************************************** 2 Major portions of this software are copyrighted by the Medical College 3 of Wisconsin, 1994-2000, and are released under the Gnu General Public 4 License, Version 2. See the file README.Copyright for details. 5 ******************************************************************************/ 6 7 #ifndef _AFNI_EPI_HEADER_ 8 #define _AFNI_EPI_HEADER_ 9 10 /*-- Symbols to define what code to include for specific systems; --*/ 11 /*-- exactly one of these must be #define-d, or things won't work. --*/ 12 13 #undef AFNI_BRUKER_BRI 14 #define AFNI_SIGNA_KECK 15 16 /************************* AFNI variables, etc. ******************************/ 17 18 #include "iochan.h" /* I/O to other processes */ 19 20 #if 0 /* ZSS June 2011. Delete useless code after dust has settled. */ 21 #define AFNI_CONTROL_PORT 7954 /* always send control data to AFNI */ 22 #define AFNI_TCP_PORT 7953 /* maybe send image data to AFNI */ 23 /* 24 replace these two with: 25 get_port_named("AFNI_CONTROL_PORT") 26 and 27 get_port_named("AFNI_TCP_PORT") 28 */ 29 #endif 30 31 #define AFNI_OPEN_CONTROL_MODE 1 /* 1st time thru: open control channel */ 32 #define AFNI_WAIT_CONTROL_MODE 2 /* waiting for AFNI to open control */ 33 #define AFNI_OPEN_DATA_MODE 3 /* now can open data channel to AFNI */ 34 #define AFNI_CATCHUP_MODE 4 /* waiting for AFNI to open data */ 35 #define AFNI_CONTINUE_MODE 5 /* at last! data channel is ready! */ 36 37 /*-- global control variables --*/ 38 39 #ifdef MAIN 40 int AFNI_mode = 0 ; /* if > 0, then means AFNI is active */ 41 int AFNI_use_tcp = 0 ; /* if > 0, use TCP/IP to send images */ 42 char AFNI_host[128] = "\0" ; /* hostname of CPU AFNI is on */ 43 char AFNI_iochan[128] = "\0" ; /* I/O channel name to AFNI */ 44 IOCHAN * AFNI_ioc = NULL ; /* ptr to I/O channel itself */ 45 int AFNI_atexit_setup= 0 ; /* is AFNI_exit setup yet? */ 46 char AFNI_buf[1024] ; /* temporary space */ 47 int AFNI_verbose = 0 ; /* debugging mode */ 48 49 #if defined(AFNI_BRUKER_BRI) 50 char AFNI_infocom[256]= "3T_toafni" ; /* command for AFNI info */ 51 #elif defined(AFNI_SIGNA_KECK) 52 char AFNI_infocom[256]= "\0" ; /* no command for AFNI */ 53 #endif 54 55 #else 56 extern int AFNI_mode ; 57 extern int AFNI_use_tcp ; 58 extern char AFNI_host[] ; 59 extern char AFNI_iochan[] ; 60 extern IOCHAN * AFNI_ioc ; 61 extern char AFNI_buf[] ; 62 extern int AFNI_atexit_setup ; 63 extern char AFNI_infocom[] ; 64 extern int AFNI_verbose ; 65 extern int read_Signa_cvs() ; 66 #endif 67 /*******************************************************************************/ 68 69 /*-- prototypes --*/ 70 71 extern void AFNI_start_io(int) ; 72 extern void AFNI_send_image(int) ; 73 extern void AFNI_exit(void) ; 74 75 /*-- help string --*/ 76 77 #ifdef MAIN 78 #define AFNI_HELP_STRING \ 79 "\n" \ 80 "\n-afni host - Send reconstructed images to AFNI running on" \ 81 "\n computer 'host':" \ 82 "\n * If 'host' = '%%' or '.', then the local" \ 83 "\n system will be used, and data will be" \ 84 "\n transferred to AFNI with shared memory." \ 85 "\n * For other values of 'host', a TCP/IP socket" \ 86 "\n will be used to transfer data to AFNI. If" \ 87 "\n you want to use TCP/IP on the local system," \ 88 "\n use 'localhost'." \ 89 "\n * You must start AFNI with the command" \ 90 "\n 'afni -rt' for it to be able to accept" \ 91 "\n image data in realtime." \ 92 "\n-verbose - turn on debug messages for AFNI I/O" 93 #endif 94 95 /*-- how to execute a command on another system --*/ 96 97 #ifdef HP 98 # define RSH "remsh" 99 #else 100 # define RSH "rsh" 101 #endif 102 103 /*=============================================================================*/ 104 #endif /* _AFNI_EPI_HEADER_ */ 105