This function calls fslhd to obtain a nifti header

fslhd(file, opts = "", verbose = TRUE, ...)

Arguments

file

(character) image filename or character of class nifti

opts

(character) additional options to be passed to fslhd

verbose

(logical) print out command before running

...

options passed to checkimg

Value

Character of information from fslhd

Examples

if (have.fsl()){
 mnifile = file.path(fsldir(), "data", "standard", 
   "MNI152_T1_2mm.nii.gz")
 fslhd(mnifile)
}   
#> fslhd "/usr/local/fsl/data/standard/MNI152_T1_2mm.nii.gz" 
#>  [1] "filename\t/usr/local/fsl/data/standard/MNI152_T1_2mm.nii.gz"
#>  [2] ""                                                           
#>  [3] "sizeof_hdr\t348"                                            
#>  [4] "data_type\tINT16"                                           
#>  [5] "dim0\t\t3"                                                  
#>  [6] "dim1\t\t91"                                                 
#>  [7] "dim2\t\t109"                                                
#>  [8] "dim3\t\t91"                                                 
#>  [9] "dim4\t\t1"                                                  
#> [10] "dim5\t\t1"                                                  
#> [11] "dim6\t\t1"                                                  
#> [12] "dim7\t\t1"                                                  
#> [13] "vox_units\tmm"                                              
#> [14] "time_units\ts"                                              
#> [15] "datatype\t4"                                                
#> [16] "nbyper\t\t2"                                                
#> [17] "bitpix\t\t16"                                               
#> [18] "pixdim0\t\t-1.000000"                                       
#> [19] "pixdim1\t\t2.000000"                                        
#> [20] "pixdim2\t\t2.000000"                                        
#> [21] "pixdim3\t\t2.000000"                                        
#> [22] "pixdim4\t\t1.000000"                                        
#> [23] "pixdim5\t\t0.000000"                                        
#> [24] "pixdim6\t\t0.000000"                                        
#> [25] "pixdim7\t\t0.000000"                                        
#> [26] "vox_offset\t352"                                            
#> [27] "cal_max\t\t8000.000000"                                     
#> [28] "cal_min\t\t3000.000000"                                     
#> [29] "scl_slope\t1.000000"                                        
#> [30] "scl_inter\t0.000000"                                        
#> [31] "phase_dim\t0"                                               
#> [32] "freq_dim\t0"                                                
#> [33] "slice_dim\t0"                                               
#> [34] "slice_name\tUnknown"                                        
#> [35] "slice_code\t0"                                              
#> [36] "slice_start\t0"                                             
#> [37] "slice_end\t0"                                               
#> [38] "slice_duration\t0.000000"                                   
#> [39] "toffset\t\t0.000000"                                        
#> [40] "intent\t\tUnknown"                                          
#> [41] "intent_code\t0"                                             
#> [42] "intent_name\t"                                              
#> [43] "intent_p1\t0.000000"                                        
#> [44] "intent_p2\t0.000000"                                        
#> [45] "intent_p3\t0.000000"                                        
#> [46] "qform_name\tMNI_152"                                        
#> [47] "qform_code\t4"                                              
#> [48] "qto_xyz:1\t-2.000000 0.000000 -0.000000 90.000000 "         
#> [49] "qto_xyz:2\t0.000000 2.000000 -0.000000 -126.000000 "        
#> [50] "qto_xyz:3\t0.000000 0.000000 2.000000 -72.000000 "          
#> [51] "qto_xyz:4\t0.000000 0.000000 0.000000 1.000000 "            
#> [52] "qform_xorient\tRight-to-Left"                               
#> [53] "qform_yorient\tPosterior-to-Anterior"                       
#> [54] "qform_zorient\tInferior-to-Superior"                        
#> [55] "sform_name\tMNI_152"                                        
#> [56] "sform_code\t4"                                              
#> [57] "sto_xyz:1\t-2.000000 0.000000 0.000000 90.000000 "          
#> [58] "sto_xyz:2\t0.000000 2.000000 0.000000 -126.000000 "         
#> [59] "sto_xyz:3\t0.000000 0.000000 2.000000 -72.000000 "          
#> [60] "sto_xyz:4\t0.000000 0.000000 0.000000 1.000000 "            
#> [61] "sform_xorient\tRight-to-Left"                               
#> [62] "sform_yorient\tPosterior-to-Anterior"                       
#> [63] "sform_zorient\tInferior-to-Superior"                        
#> [64] "file_type\tNIFTI-1+"                                        
#> [65] "file_code\t1"                                               
#> [66] "descrip\t\tFSL5.0"                                          
#> [67] "aux_file\t"