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  

imswap.c File Reference

#include "mrilib.h"

Go to the source code of this file.


Functions

int main (int argc, char *argv[])

Function Documentation

int main int    argc,
char *    argv[]
 

\** File : SUMA.c

Author:
: Ziad Saad Date : Thu Dec 27 16:21:01 EST 2001
Purpose :

Input paramters :

Parameters:
param  Usage : SUMA ( )
Returns :
Returns:
Support :
See also:
OpenGL prog. Guide 3rd edition , varray.c from book's sample code
Side effects :

Definition at line 9 of file imswap.c.

References argc, machdep(), mri_read_just_one(), mri_swapbytes(), and mri_write().

00010 {
00011    MRI_IMAGE *im ;
00012 
00013    if( argc < 3 || strncmp(argv[1],"-help",5) == 0 ){
00014       fprintf( stderr , "Usage: imswap infile outfile\n"
00015                         "* Swaps bytes in infile to produce outfile!\n" ) ;
00016       exit(0) ;
00017    }
00018 
00019    machdep() ;
00020 
00021    im = mri_read_just_one( argv[1] ) ;  if( im == NULL ) exit(1) ;
00022    mri_swapbytes( im ) ;
00023    mri_write( argv[2] , im ) ;
00024 
00025    exit(0) ;
00026 }
 

Powered by Plone

This site conforms to the following standards: