Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

ep_afni.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002    Major portions of this software are copyrighted by the Medical College
00003    of Wisconsin, 1994-2000, and are released under the Gnu General Public
00004    License, Version 2.  See the file README.Copyright for details.
00005 ******************************************************************************/
00006    
00007 #ifndef _AFNI_EPI_HEADER_
00008 #define _AFNI_EPI_HEADER_
00009 
00010 /*****************************  AFNI STUFF *************************************/
00011 #include "iochan.h"                     /* I/O to other processes              */
00012 
00013 #define AFNI_CONTROL_PORT  7954         /* always send control data to AFNI    */
00014 #define AFNI_TCP_PORT      7953         /* maybe send image data to AFNI       */
00015 
00016 #define AFNI_OPEN_CONTROL_MODE   1      /* 1st time thru: open control channel */
00017 #define AFNI_WAIT_CONTROL_MODE   2      /* waiting for AFNI to open control    */
00018 #define AFNI_OPEN_DATA_MODE      3      /* now can open data channel to AFNI   */
00019 #define AFNI_CATCHUP_MODE        4      /* waiting for AFNI to open data       */
00020 #define AFNI_CONTINUE_MODE       5      /* at last! data channel is ready!     */
00021 
00022 /*-- global control variables --*/
00023 
00024 #ifdef MAIN
00025   int      AFNI_mode        = 0 ;    /* if > 0, then means AFNI is active  */
00026   int      AFNI_use_tcp     = 0 ;    /* if > 0, use TCP/IP to send images */
00027   char     AFNI_host[128]   = "\0" ; /* hostname of CPU AFNI is on       */
00028   char     AFNI_iochan[128] = "\0" ; /* I/O channel name to AFNI        */
00029   IOCHAN * AFNI_ioc         = NULL ; /* ptr to I/O channel itself      */
00030   int      AFNI_atexit_setup= 0    ; /* is AFNI_exit setup yet?       */
00031   char     AFNI_buf[1024]          ; /* temporary space              */
00032   int      AFNI_verbose     = 0    ; /* debugging mode              */
00033 
00034   char     AFNI_infocom[256]= "3T_toafni" ;  /* command for AFNI  */
00035 #else
00036   extern int      AFNI_mode ;
00037   extern int      AFNI_use_tcp ;
00038   extern char     AFNI_host[] ;
00039   extern char     AFNI_iochan[] ;
00040   extern IOCHAN * AFNI_ioc ;
00041   extern char     AFNI_buf[] ;
00042   extern int      AFNI_atexit_setup ;
00043   extern char     AFNI_infocom[] ;
00044   extern int      AFNI_verbose ;
00045 #endif
00046 /*******************************************************************************/
00047 
00048 /*-- prototypes --*/
00049 
00050 extern void AFNI_start_io(int) ;
00051 extern void AFNI_send_image(int) ;
00052 extern void AFNI_exit(void) ;
00053 
00054 /*-- help string --*/
00055 
00056 #ifdef MAIN
00057 #define AFNI_HELP_STRING                                                       \
00058     "\n    -afni host       - Send reconstructed images to AFNI running"       \
00059     "\n                        CPU 'host'.  If 'host' = '%%' or '.', then"     \
00060     "\n                        the local CPU and shared memory will be used"   \
00061     "\n                        to transfer data; otherwise, TCP/IP sockets"    \
00062     "\n                        will be used.  N.B.: You must start AFNI with"  \
00063     "\n                        the command 'afni -rt' for this to work."       \
00064     "\n    -verbose          - turn on AFNI debugging messages"
00065 #endif
00066 
00067 /*-- how to execute a command on another system --*/
00068 
00069 #ifdef HP
00070 # define RSH "remsh"
00071 #else
00072 # define RSH "rsh"
00073 #endif
00074 
00075 /*=============================================================================*/
00076 #endif /* _AFNI_EPI_HEADER_ */
 

Powered by Plone

This site conforms to the following standards: