

To list the contents of your current directory, you can simply type ls. Here, we test whether the reorientation process worked. The slices should not be upside down anymore. ''' if par_dir != 'solutions' : # must be student account if not os. isfile ( 't1w_' ): raise ValueError ( "Cannot find the file 't1w_' - did you name it correctly?" ) t1 = nib. get_fdata () else : # admin account t1 = nib. get_fdata () print ( "Well done!" ) plot_ortho_slices ( t1 ) Īlright, let’s practice your CMD skills with one more nifty (pun intended) FSL command called fslroi. This command allows you to slice your file in several dimensions. For example, you can use it to remove the upper 20 slices in the X direction or remove several volumes (i.e., slicing in the “Time” direction, the fourth dimension of functional data). We’ll plot an axial slice for all 12 volumes below: Below, we loaded functional data from a very short run (only 12 volumes usually, runs are of course often much longer). Here, you can check if your fslroi command worked! It should show 10 volumes (vol 0-9), and the noise-volumes should be removed.''' if par_dir != 'solutions' : if not os. isfile ( '' ): raise ValueError ( "Cannot find the file '' - did you name it correctly?" ) func_fixed = nib. figure ( figsize = ( 15, 5 )) for i in range ( func_fixed. T, origin = 'lower', cmap = 'gray' ) plt. (You might wonder: well, why use fslroi while I could simply use Python to cut off the last two volumes? That’s a good point. Here, we made you work with fslroi to practice your command line skills, but using Python to do this is completely fine too. GIMME (Group Iterative Multiple Model Estimation).fASL Tutorial #5: Examining the Results.fASL Tutorial #2: Downloading and Installing.Introduction to the Human Connectome Project.Introduction to the Human Connectome Project (HCP) Parametric Modulation in SPM, FSL, and AFNI.Functional Connectivity and the CONN Toolbox.fMRI Tutorial #5: Statistics and Modelingįunctional Connectivity with the CONN Toolbox.fMRI Tutorial #2: Overview of The Flanker Task.Unix Tutorial #9: Automating The Analysis.Unix Tutorial #6: Conditional Statements.Unix Tutorial #4: Shells and Path Variables.Unix Tutorial #2: Copying and Removing Files.Unix Tutorial #1: Navigating the directory tree.Ultimately, if you work with real data, it’s up to you which software/programming language you want to use.)Īlright, enough practice with Linux, the command line, and FSL commands! You can start the other notebook ( first_level_analysis.ipynb) now. This diffusion-weighted image has the label “AP” affixed to it, which means that the data were acquired in the Anterior-to-Posterior phase-encoding direction.
