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  

tagset.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 _THD_TAGLIST_HEADER_
00008 #define _THD_TAGLIST_HEADER_
00009 
00010 /*-----------------------------------------------------------------------
00011    October 1998: User defined "tags" to be placed into a dataset.
00012 -------------------------------------------------------------------------*/
00013 
00014 #define MAX_TAG_LABEL  40
00015 #define MAX_TAG_NUM   666
00016 
00017 typedef struct {
00018    int   set , ti ;
00019    float x,y,z, val ;
00020    char label[MAX_TAG_LABEL] ;
00021 } THD_usertag ;
00022 
00023 typedef struct {
00024    int num ;
00025    char label[MAX_TAG_LABEL] ;
00026    THD_usertag tag[MAX_TAG_NUM] ;
00027 } THD_usertaglist ;
00028 
00029 #define INIT_TAGLIST(tl)                     \
00030   do{ int iq ;                               \
00031       for( iq=0 ; iq < MAX_TAG_NUM ; iq++ ){ \
00032          (tl).tag[ii].set = 0 ;              \
00033          (tl).tag[ii].label[0] = '\0' ;      \
00034       } } while(0)
00035 
00036 #define TAGLIST_COUNT(tl)    ((tl)->num)
00037 #define TAGLIST_SUBTAG(tl,i) ((tl)->tag[i])
00038 #define TAGLIST_LABEL(tl)    ((tl)->label)
00039 
00040 #define TAG_LABEL(tt)        ((tt).label)
00041 #define TAG_X(tt)            ((tt).x)
00042 #define TAG_Y(tt)            ((tt).y)
00043 #define TAG_Z(tt)            ((tt).z)
00044 #define TAG_T(tt)            ((tt).t)
00045 #define TAG_VAL(tt)          ((tt).val)
00046 #define TAG_SET(tt)          ((tt).set)
00047 
00048 #define TAG_SETLABEL(tt,str)                     \
00049    ( strncpy((tt).label,(str),MAX_TAG_LABEL-1) , \
00050      (tt).label[MAX_TAG_LABEL-1] = '\0' )
00051 
00052 #define TAGLIST_SETLABEL(tl,str)  TAG_SETLABEL(*(tl),(str))
00053 
00054 #define ATRNAME_TAGSET_NUM     "TAGSET_NUM"
00055 #define ATRNAME_TAGSET_LABELS  "TAGSET_LABELS"
00056 #define ATRNAME_TAGSET_FLOATS  "TAGSET_FLOATS"
00057 
00058 #endif
 

Powered by Plone

This site conforms to the following standards: