Doxygen Source Code Documentation
3dnvals.c File Reference
#include "mrilib.h"
Go to the source code of this file.
Functions | |
void | Syntax (void) |
int | main (int argc, char *argv[]) |
Function Documentation
|
---------- Adapted from 3dZeropad.c by RWCox - 08 Aug 2001 ----------* Definition at line 18 of file 3dnvals.c. References argc, DSET_NVALS, Syntax(), THD_delete_3dim_dataset(), and THD_open_dataset().
00019 { 00020 THD_3dim_dataset * dset ; 00021 int iarg , verbose = 0 ; 00022 00023 if( argc < 2 || strncmp(argv[1],"-help",4) == 0 ) Syntax() ; 00024 00025 iarg = 1 ; 00026 if( strncmp(argv[iarg],"-verb",5) == 0 ){ verbose = 1 ; iarg++ ; } 00027 00028 for( ; iarg < argc ; iarg++ ){ 00029 dset = THD_open_dataset( argv[iarg] ) ; 00030 if( dset == NULL ){ 00031 printf("-1\n") ; 00032 continue ; 00033 } 00034 printf("%d\n",DSET_NVALS(dset)) ; 00035 00036 THD_delete_3dim_dataset( dset , False ) ; 00037 } 00038 exit(0) ; 00039 } |
|
31 July 1996: be more specific about errors * Definition at line 9 of file 3dnvals.c.
00010 { 00011 printf( 00012 "Prints out the number of sub-bricks in a 3D dataset\n" 00013 "Usage: 3dnvals [-verb] dataset\n" 00014 ) ; 00015 exit(0) ; 00016 } |