Doxygen Source Code Documentation
suma_types.h
Go to the documentation of this file.00001 #ifndef _SUMA_TYPES_HEADER_FILE_ 00002 #define _SUMA_TYPES_HEADER_FILE_ 00003 00004 /*! Port number for talking to AFNI */ 00005 00006 #define SUMA_TCP_PORT 53211 00007 00008 /************************************************/ 00009 /**** Header for SUMA types (SUrface MApper) ****/ 00010 /**** Strawman version: 27 Feb 2001 - RWCox ****/ 00011 /************************************************/ 00012 00013 /*--- define types ---*/ 00014 00015 /*! Type to store a node in 3D space. */ 00016 00017 typedef struct { 00018 int id ; /*!< Node identifier (>= 0) */ 00019 float x ; /*!< x-coordinate */ 00020 float y ; /*!< y-coordinate */ 00021 float z ; /*!< z-coordinate */ 00022 } SUMA_ixyz ; 00023 00024 /*! Type to store a triangle (a list of node indexes). */ 00025 00026 typedef struct { 00027 float id,jd,kd ; 00028 } SUMA_ijk ; 00029 00030 /*! Type to store a node+color list */ 00031 00032 typedef struct { 00033 int id ; 00034 unsigned char r,g,b,a ; 00035 } SUMA_irgba ; 00036 00037 /*! Type code for SUMA_surface structs */ 00038 00039 #define SUMA_SURFACE_TYPE 53001 00040 00041 /*! A surface structure in 3D space: 00042 - a bunch of SUMA_ixyz's 00043 - a bunch of SUMA_ijk's linking them together */ 00044 00045 typedef struct { 00046 int type ; /*!< == SUMA_SURFACE_TYPE */ 00047 int num_ixyz ; /*!< Number of nodes */ 00048 int num_ijk ; /*!< Number of triangles */ 00049 int seq ; /*!< If 1, node .id's are sequential */ 00050 int seqbase ; /*!< If .id's sequential, is smallest .id */ 00051 int sorted ; /*!< If 1, node .id's are sorted */ 00052 00053 SUMA_ixyz *ixyz ; /*!< Node list: num_ixyz long */ 00054 SUMA_ijk *ijk ; /*!< Triangle list: num_ijk long */ 00055 00056 float xbot ; /*!< Smallest x-coordinate in nodes */ 00057 float ybot ; /*!< Smallest y-coordinate in nodes */ 00058 float zbot ; /*!< Smallest z-coordinate in nodes */ 00059 float xtop ; /*!< Largest x-coordinate in nodes */ 00060 float ytop ; /*!< Largest y-coordinate in nodes */ 00061 float ztop ; /*!< Largest z-coordinate in nodes */ 00062 00063 char idc[32] ; /*!< UNIQ_idcode() for this structure */ 00064 } SUMA_surface ; 00065 00066 /*! Macro for node count in a SUMA_surface struct */ 00067 00068 #define SUMA_NODE_COUNT(su) ((su)->num_ixyz) 00069 00070 /*! Macro for triangle count in a SUMA_surface struct */ 00071 00072 #define SUMA_TRIANGLE_COUNT(su) ((su)->num_ijk) 00073 00074 #endif /* _SUMA_TYPES_HEADER_FILE */