1 /***************************************************************************** 2 Major portions of this software are copyrighted by the Medical College 3 of Wisconsin, 1994-2000, and are released under the Gnu General Public 4 License, Version 2. See the file README.Copyright for details. 5 ******************************************************************************/ 6 7 #include "mrilib.h" 8 main(int argc,char * argv[])9int main( int argc , char *argv[] ) 10 { 11 MRI_IMAGE *im ; 12 13 if( argc < 3 || strncmp(argv[1],"-help",5) == 0 ){ 14 fprintf( stderr , "Usage: imswap infile outfile\n" 15 "* Swaps bytes in infile to produce outfile!\n" ) ; 16 exit(0) ; 17 } 18 19 machdep() ; 20 21 im = mri_read_just_one( argv[1] ) ; if( im == NULL ) exit(1) ; 22 mri_swapbytes( im ) ; 23 mri_write( argv[2] , im ) ; 24 25 exit(0) ; 26 } 27