Doxygen Source Code Documentation
thd_getorient.c File Reference
#include "mrilib.h"Go to the source code of this file.
| Functions | |
| int | THD_get_axis_direction (THD_dataxes *daxes, int orient_code) | 
Function Documentation
| 
 | ||||||||||||
| Input is a dataset axes struct and an orientation code. Output is an int saying which dataset axis is this code. 
 Definition at line 12 of file thd_getorient.c. References ORIENT_OPPOSITE, THD_dataxes::xxorient, THD_dataxes::yyorient, and THD_dataxes::zzorient. Referenced by main(). 
 00013 {
00014    if( daxes == NULL ) return 0;
00015 
00016    if(                 daxes->xxorient  == orient_code ) return  1 ;
00017    if( ORIENT_OPPOSITE(daxes->xxorient) == orient_code ) return -1 ;
00018    if(                 daxes->yyorient  == orient_code ) return  2 ;
00019    if( ORIENT_OPPOSITE(daxes->yyorient) == orient_code ) return -2 ;
00020    if(                 daxes->zzorient  == orient_code ) return  3 ;
00021    if( ORIENT_OPPOSITE(daxes->zzorient) == orient_code ) return -3 ;
00022    return 0 ;
00023 }
 | 
 
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
 
 
 
 
       
	   
	   
	   
	  