1 #ifndef _SUMA_TYPES_HEADER_FILE_ 2 #define _SUMA_TYPES_HEADER_FILE_ 3 4 /*! Port number for talking to AFNI */ 5 6 #define SUMA_TCP_PORT 53211 7 8 /************************************************/ 9 /**** Header for SUMA types (SUrface MApper) ****/ 10 /**** Strawman version: 27 Feb 2001 - RWCox ****/ 11 /************************************************/ 12 13 /*--- define types ---*/ 14 15 /*! Type to store a node in 3D space. */ 16 17 typedef struct { 18 int id ; /*!< Node identifier (>= 0) */ 19 float x ; /*!< x-coordinate */ 20 float y ; /*!< y-coordinate */ 21 float z ; /*!< z-coordinate */ 22 } SUMA_ixyz ; 23 24 /*! Type to store a triangle (a list of node indexes). */ 25 26 typedef struct { 27 float id,jd,kd ; 28 } SUMA_ijk ; 29 30 /*! Type to store a node+color list */ 31 32 typedef struct { 33 int id ; 34 unsigned char r,g,b,a ; 35 } SUMA_irgba ; 36 37 /*! Type code for SUMA_surface structs */ 38 39 #define SUMA_SURFACE_TYPE 53001 40 41 /*! A surface structure in 3D space: 42 - a bunch of SUMA_ixyz's 43 - a bunch of SUMA_ijk's linking them together */ 44 45 typedef struct { 46 int type ; /*!< == SUMA_SURFACE_TYPE */ 47 int num_ixyz ; /*!< Number of nodes */ 48 int num_ijk ; /*!< Number of triangles */ 49 int seq ; /*!< If 1, node .id's are sequential */ 50 int seqbase ; /*!< If .id's sequential, is smallest .id */ 51 int sorted ; /*!< If 1, node .id's are sorted */ 52 53 SUMA_ixyz *ixyz ; /*!< Node list: num_ixyz long */ 54 SUMA_ijk *ijk ; /*!< Triangle list: num_ijk long */ 55 56 float xbot ; /*!< Smallest x-coordinate in nodes */ 57 float ybot ; /*!< Smallest y-coordinate in nodes */ 58 float zbot ; /*!< Smallest z-coordinate in nodes */ 59 float xtop ; /*!< Largest x-coordinate in nodes */ 60 float ytop ; /*!< Largest y-coordinate in nodes */ 61 float ztop ; /*!< Largest z-coordinate in nodes */ 62 63 char idc[32] ; /*!< UNIQ_idcode() for this structure */ 64 } SUMA_surface ; 65 66 /*! Macro for node count in a SUMA_surface struct */ 67 68 #define SUMA_NODE_COUNT(su) ((su)->num_ixyz) 69 70 /*! Macro for triangle count in a SUMA_surface struct */ 71 72 #define SUMA_TRIANGLE_COUNT(su) ((su)->num_ijk) 73 74 #endif /* _SUMA_TYPES_HEADER_FILE */ 75