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  

thd.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 _MCW_THDSOURCE_HEADER_
00008 #define _MCW_THDSOURCE_HEADER_
00009 
00010 #ifndef EXIT
00011 #define EXIT exit
00012 #endif
00013 
00014 #define THD_FATAL_ERROR(str) \
00015   { fprintf(stderr,"\a\n*** FATAL INTERNAL ERROR: %s\n",str);sleep(1);EXIT(1); }
00016 
00017 #define ATR_ALLINC 8
00018 
00019 #define DSET_ERR(str) \
00020    {fprintf(stderr,"\n*** DATASET error:   %s\n",str);dset_ok=False;}
00021 
00022 #define DSET_ERRN(str,val) \
00023    {fprintf(stderr,"\n*** DATASET error:   %s (%f)\n",str,(float)(val));dset_ok=False;}
00024 
00025 #define DSET_WARN(str) \
00026    {fprintf(stderr,"\n*** DATASET warning: %s\n",str);}
00027 
00028 #define WRITE_ERR(str) \
00029   { fprintf(stderr,"*** Datablock write error: %s\n",str); return False; }
00030 
00031 #define ORCODE(aa)                         \
00032   ( ((aa)=='R'||(aa)=='r') ? ORI_R2L_TYPE  \
00033    :((aa)=='L'||(aa)=='l') ? ORI_L2R_TYPE  \
00034    :((aa)=='P'||(aa)=='p') ? ORI_P2A_TYPE  \
00035    :((aa)=='A'||(aa)=='a') ? ORI_A2P_TYPE  \
00036    :((aa)=='I'||(aa)=='i') ? ORI_I2S_TYPE  \
00037    :((aa)=='S'||(aa)=='s') ? ORI_S2I_TYPE : ILLEGAL_TYPE )
00038 
00039 #define OR3OK(x,y,z) ( ((x)&6) + ((y)&6) + ((z)&6) == 6 )
00040 
00041 #define XLAB(xl,xv) ((xl) = ((xv)==0.0) ? (ZZ) : ( ((xv)<0.0) ? (RR) : (LL) ))
00042 #define YLAB(yl,yv) ((yl) = ((yv)==0.0) ? (ZZ) : ( ((yv)<0.0) ? (AA) : (PP) ))
00043 #define ZLAB(zl,zv) ((zl) = ((zv)==0.0) ? (ZZ) : ( ((zv)<0.0) ? (II) : (SS) ))
00044 
00045 #define FSWAP(x,y) (tf=(x),(x)=(y),(y)=tf)
00046 
00047 #include "mcw_malloc.h"
00048 
00049 #endif
 

Powered by Plone

This site conforms to the following standards: