#This is a template for a FSL tool sub-section # Create subpages as ToolName/blah # Remember to add this page to the appropriate category <> = Using the Example Data to Learn FSL = == Introduction == We now explain how the different tools in FSL can be run on the example data provided in the data subdirectory. We strongly suggest that you work with a copy of data rather than the original, so that you can always go back to the original data if you need to. You can do this by typing (inside `feeds`) {{{ cp -r data examples cd examples }}} and then work with the files inside `examples`. The instructions given below should produce the same output as provided in `data`. Make sure your environment is setup correctly for using FSL - see the [[https://fsl.fmrib.ox.ac.uk/fsl/fsldev/FslInstallation#Running_FSL|Running FSL]] section on the Downloading and Installing page. To start the main FSL GUI, type `fsl`. To view the output of each tool, either load the output image(s) into your favourite NIFTI image viewer, or use the simple (non-interactive) display program `slices` which is in the `fsl/bin` directory (the setup commands above should have already added this to your program search path). Where links appear below, these mostly point to 2D PNG images created by running `slicer` on the relevant NIFTI format 3D image. (`slicer` is a command-line program which takes a 3D NIFTI format image and produces a 2D PNG image with various slices at various orientations from the input image; `slices` is a script which calls `slicer` and then starts up a 2D image viewer to show you the PNG image.) == BET == Set the '''Input image''' to be [[attachment:structural.png|structural]] and press '''OK'''. The output will be [[attachment:structural_brain.png|structural_brain]]. You will see a message on your terminal when BET has finished. == SUSAN == Set the '''Input image''' to be [[attachment:structural.png|structural]]. Set the '''Brightness threshold''' to `2000` (this is greater than the noise level and less than the grey-white contrast in the input image). Set the '''Mask SD''' to `2` (this sets the mask half-width to be 2mm). Press ''OK''. The output will be [[attachment:structural_susan.png|structural_susan]]. == FAST == Set the '''Input image''' to be [[attachment:structural_brain.png|structural_brain]] (i.e. it is important to have run BET first). Turn on the '''Partial volume maps''' optional output images. Press '''Go'''. The outputs will be [[attachment:structural_brain_seg.png|structural_brain_seg]], [[attachment:structural_brain_pve_0.png|structural_brain_pve_0]], [[attachment:structural_brain_pve_1.png|structural_brain_pve_1]] and [[attachment:structural_brain_pve_2.png|structural_brain_pve_2]]. == FLIRT == Set the '''Input image''' to be [[attachment:structural_brain.png|structural_brain]]. Set the '''Output image''' to be [[attachment:structural_brain2standard.png|structural_brain2standard]]. Press '''Go'''. == FUGUE == FUGUE does not have a GUI. On the command line type: {{{ prelude -c fieldmap -u unwrapped_phase }}} ([[attachment:fieldmap.png|fieldmap]], [[attachment:unwrapped_phase.png|unwrapped_phase]] images) This runs the phase map unwrapping. Now type: {{{ fugue -i epi -p unwrapped_phase -d 0.295 -u unwarped_epi }}} ([[attachment:epi.png|epi]], [[attachment:unwarped_epi.png|unwarped_epi]] images) This runs the unwarping of the input epi image. == SIENAX == SIENAX does not have a GUI. On the command line type: {{{ sienax structural }}} This runs the SIENAX cross-sectional (single-time-point) atrophy script, producing a web-page report `structural_sienax/report.html`. == FEAT == Press '''Select 4D data''' and select [[attachment:fmri.png|fmri]]. Press '''Stats and Full model setup''' to setup the GLM details. * Change the '''Number of original EVs''' to 2. * Setup '''EV1''' (the visual stimulation timing): set '''Off''' to `30`, '''On''' to `30` and '''Phase''' to `30`. This describes a square wave of total period 60s, starting with an ON period, hence the phase setting. * Setup '''EV2''' (the auditory stimulation timing): set '''Off''' to `45`, '''On''' to `45` and '''Phase''' to `45`. This describes a square wave of total period 90s, starting with an ON period, hence the phase setting. * Now setup the Contrasts. Set the '''Number of contrasts''' to `2`, set the first (OC1) to `[1 0]` and the second (OC2) to `[0 1]`. Thus the first output colour overlay image produced will show visual activation as only EV1 is used, and the second will show only auditory activation. * Now setup the F-tests. Set the '''Number of F-tests''' to `1`. Select both contrasts. Thus the third output colour overlay image produced will show where either visual or auditory activation occurs (i.e. will show both on a single image). * Press '''Done''' to finish the model setup. * Set the '''High pass filter cutoff''' to `100`. Although it is common to set this to 1.5 times the maximum stimulation period (in this case 90*1.5=135), the highpass filter used in FEAT has quite a slow roll-off above the cutoff frequency, so in fact setting this to just over the 90s period time is fine. * The default settings in Pre-stats and Thresholding & rendering can be left as they are. * In the Registration section, select the '''Main structural image'''. Set this to [[attachment:structural_brain.png|structural_brain]]. You are now ready to run FEAT. Press '''Go'''. As FEAT completes the different stages of processing, you will see messages appear on your terminal. When it has finished, the final messages will tell you the file name of a web page which you can view with your web browser to see the results. == MELODIC == Set the '''4D input data''' to be `fmri`. Note that this is the same raw data as was input to FEAT - normally you would ideally want to have done some pre-processing to the data before running MELODIC - see the [[Melodic|MELODIC help page]] for more information on this. Press '''Go'''. When MELODIC has finished, the final messages will tell you the file name of a web page which you can view with your web browser to see the results. == FIRST == First you must register your data to standard space; in a terminal type: {{{ first_flirt structural structural_to_std_sub }}} ([[attachment:structural.png|structural]], [[attachment:structural_to_std_sub.png|structural_to_std_sub]] images.) Now run a single structure's segmentation; type: {{{ run_first -i structural -t structural_to_std_sub.mat -n 20 -o structural_first_L_Hipp -m \ ${FSLDIR}/data/first/models_317_bin/L_Hipp_bin.bmv }}} ([[attachment:first.png|${FSLDIR}/data/first/models_317_bin/L_Hipp_bin.bmv]] image.) == FDT == To reconstruct the example data, open the FDT GUI and change the top option to '''BEDPOSTX: Estimation of diffusion parameters'''. Select the input directory `fdt_subj1` and pres '''Go'''. To load some of the output images into FSLView, type: {{{ cd fdt_subj1.bedpostX fslview nodif_brain mean_f1samples dyads1 }}} then press the (i) near the bottom of FSLView, to bring up the '''Overlay Information''' dialog. Make sure '''dyads''' is highlighted in the overlay list, and change the '''Display as''' to `RGB`. Change the '''Modulation''' to `mean_f1samples` (this is similar to the fractional anisotropy). You can now see colour-coding of the principal diffusion direction vector. Now change the '''Display as''' to `Lines` to see the same vectors represented as small red lines.