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_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

int THD_get_axis_direction THD_dataxes   daxes,
int    orient_code
 

Input is a dataset axes struct and an orientation code. Output is an int saying which dataset axis is this code.

  • +1 => dataset +x-axis
  • -1 => dataset -x-axis, etc.
  • 0 => bad inputs
  • RWCox - 19 Mar 2003 -----------------------------------------------------------------------------

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 }
 

Powered by Plone

This site conforms to the following standards: