Personal tools

FSLUtils

From hpcwiki

Jump to: navigation, search

FSL provides a set of simple applications to explore, analyze and operate images. Here, some of them.

FSLInfo Displaying information about the image

fsl5.0-fslinfo intro/structural.nii.gz

data_type      INT16
dim1           256
dim2           256
dim3           128
dim4           1
datatype       4
pixdim1        1.0000000000
pixdim2        1.0000000000
pixdim3        1.2500000000
pixdim4        1.0000000000
cal_max        25500.0000
cal_min        20.0000
file_type      NIFTI-1+

FSLHd Displaying high description about the image

fsl5.0-fslhd intro/structural.nii.gz

 filename       intro/structural.nii.gz
 sizeof_hdr     348
 data_type      INT16
 dim0           3
 dim1           256
 dim2           256
 dim3           128
 dim4           1
 dim5           1
 dim6           1
 dim7           1
 vox_units      mm
 time_units     s
 datatype       4
 nbyper         2
 bitpix         16
 pixdim0        0.0000000000
 pixdim1        1.0000000000
 pixdim2        1.0000000000
 pixdim3        1.2500000000
 pixdim4        1.0000000000
 pixdim5        0.0000000000
 pixdim6        0.0000000000
 pixdim7        0.0000000000
 vox_offset     352
 cal_max        25500.0000
 cal_min        20.0000
 scl_slope      1.000000
 scl_inter      0.000000
 phase_dim      0
 freq_dim       0
 slice_dim      0
 slice_name     Unknown

 slice_code     0
 slice_start    0
 slice_end      0
 slice_duration 0.000000
 time_offset    0.000000
 intent         Unknown
 intent_code    0
 intent_name    
 intent_p1      0.000000
 intent_p2      0.000000
 intent_p3      0.000000
 qform_name     Scanner Anat
 qform_code     1
 qto_xyz:1      -1.000000  0.000000  -0.000000  0.000000
 qto_xyz:2      0.000000  1.000000  -0.000000  0.000000
 qto_xyz:3      0.000000  0.000000  1.250000  0.000000
 qto_xyz:4      0.000000  0.000000  0.000000  1.000000
 qform_xorient  Right-to-Left
 qform_yorient  Posterior-to-Anterior
 qform_zorient  Inferior-to-Superior
 sform_name     Scanner Anat
 sform_code     1
 sto_xyz:1      -1.000000  0.000000  0.000000  0.000000
 sto_xyz:2      0.000000  1.000000  0.000000  0.000000
 sto_xyz:3      0.000000  0.000000  1.250000  0.000000
 sto_xyz:4      0.000000  0.000000  0.000000  1.000000
 sform_xorient  Right-to-Left
 sform_yorient  Posterior-to-Anterior
 sform_zorient  Inferior-to-Superior
 file_type      NIFTI-1+
 file_code      1
 descrip        FSL4.1
 aux_file

FSLStats Compute some statistics from image intensities, as minimum, maximum, etc...

fsl5.0-fslstats intro/highres.nii.gz -R -r

 0.000000 32767.000000 0.000000 16711.169922 

Here the first two values corresponds to minimum and maximum values (-R option), the other two values are the minimum and maximum if the outer tails of the intensity distribution are ignored.

fsl5.0-fslstats intro/highres.nii.gz -l 1 -R -r

 11.000000 32767.000000 2696.991943 18976.724609 

Here the -l 1 option indicate the lower limit (avoiding zero values)

fsl5.0-fslstats intro/highres.nii.gz -l 1 -R -r -m -M

 11.000000 32767.000000 2696.991943 18976.724609 12057.230531 12057.230531

Here -m and -M indicates the mean and mean without zeros respectively and correspond to fifth and sixth values.