Doxygen Source Code Documentation
3dinfo.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
| 
 | ||||||||||||
| compute the overall minimum and maximum voxel values for a dataset Definition at line 20 of file 3dinfo.c. References argc, free, machdep(), mainENTRY, PRINT_VERSION, Syntax(), THD_dataset_info(), THD_delete_3dim_dataset(), THD_open_dataset(), and THD_open_one_dataset(). 
 00021 {
00022    THD_3dim_dataset * dset ;
00023    int iarg , verbose = 0 ;
00024    char * outbuf ;
00025 
00026    if( argc < 2 || strncmp(argv[1],"-help",4) == 0 ) Syntax() ;
00027 
00028    mainENTRY("3dinfo main") ; machdep() ; PRINT_VERSION("3dinfo") ;
00029 
00030    iarg = 1 ;
00031         if( strncmp(argv[iarg],"-verb" ,5) == 0 ){ verbose =  1; iarg++; }
00032    else if( strncmp(argv[iarg],"-short",5) == 0 ){ verbose = -1; iarg++; }
00033 
00034    for( ; iarg < argc ; iarg++ ){
00035 #if 0
00036       dset = THD_open_one_dataset( argv[iarg] ) ;
00037 #else
00038       dset = THD_open_dataset( argv[iarg] ) ;
00039 #endif
00040       if( dset == NULL ){
00041          printf("\nCan't open dataset %s\n",argv[iarg]) ;
00042          continue ;
00043       }
00044 
00045       outbuf = THD_dataset_info( dset , verbose ) ;
00046       if( outbuf != NULL ){
00047          printf("\n") ;
00048          puts(outbuf) ;
00049          free(outbuf) ; outbuf = NULL ;
00050       } else {
00051          printf("\nCan't get info for dataset %s\n",argv[iarg]) ;
00052       }
00053 
00054       THD_delete_3dim_dataset( dset , False ) ;
00055    }
00056    exit(0) ;
00057 }
 | 
| 
 | 
| 31 July 1996: be more specific about errors * Definition at line 9 of file 3dinfo.c. Referenced by F3D_initialize_user_data(), get_line_opt(), main(), and T3D_initialize_user_data(). 
 00010 {
00011    printf(
00012     "Prints out sort-of-useful information from a 3D dataset's header\n"
00013     "Usage: 3dinfo [-verb OR -short] dataset [dataset ...]\n"
00014     "  -verb means to print out lots of stuff\n"
00015     "  -short means to print out less stuff\n"
00016    ) ;
00017    exit(0) ;
00018 }
 | 
 
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
                             
 
 
 
 
       
	   
	   
	   
	  