Differences between revisions 14 and 15
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
  Preprocessing specifically refers to anything that is done to the data prior to computing a standard deviation, but can also include various other things (e.g., computing masks). In FS-FAST, these are the preprocessing steps: Preprocessing specifically refers to anything that is done to the data prior to computing a standard deviation, but can also include various other things (e.g., computing masks). In FS-FAST, these are the preprocessing steps: 
Line 4: Line 3:
* 1. Brain Mask [[BR]]
* 2
. Motion Correction[[BR]]
* 3. Spatial Smoothing[[BR]]
* 4. Intensity Normalization (inorm)[[BR]]
*1. Motion Correction [[BR]]
*2. Spatial Smoothing [[BR]]
*3. Brain Masking [[BR]]
Line 9: Line 7:
It is not necessary to perform all these stages. Slice timing correction is possible in FS-FAST but is currently experimental (see stc-sess). Note that B0 correction is not yet available in FS-FAST. Most of these stages are self-explanatory. Brain Mask does a quick segmentation of the brain from the rest of the volume. Intensity normalization is the process of rescaling all intensity values within a 4D data set so that the in-brain mean is 1000. Intensity normalization is actually done in two stages. The first stage (above) just computes the in-brain mean; the second stage is actually perfromed during the analysis. The FS-FAST program "preproc-sess" will perform all of these stages. Most of these stages are self-explanatory.
Line 11: Line 9:
The FS-FAST program "preproc-sess" will perform all of these stages. You can run it something like: You can run it something like: preproc-sess -s <subjid or sessid> -fwhm 5 [[BR]]
Line 13: Line 11:
There are a lot of things going on "under the hood". By default, preproc-sess will perform motion correction, spatial smoothing and brain masking. The other stages have to be specified explicitly. -s subjid or sessid can find the raw data in subjid or sessid/bold/RRR as f.nii (RRR is a run number). It will use the first time point of the first run as a template for both motion correction and brain masking. The brain mask is created using FSL's bet program. The result is stored in bold/masks/brain.nii. This is a "binary" mask, i.e., each voxel is either 0 (not in the brain) or 1 (in the brain). “preproc-sess” will then perform motion correction (using AFNI) on each run that it finds in the bold directory using the first time point of the first run as the template. In each run, it will create a volume called fmc.nii. In addition, there will be fmc.mcdat with the motion correction parameters. It will also create mcextreg_000.bfloat, which can be used as a motion-related nuisance regressor at the time of analysis (discussed later). There is no answer to the question of "how much motion is too much?". Basically, you would like to avoid motion that is stimulus correlated as well as any sharp head jerks. Check severity of motion by plotting motion correction translation component versus time point with ["plot-twf-sess"]. [[BR]]
Line 14: Line 13:
["preproc-sess"] -smout fmcsm5 -fwhm 5 -s sessid[[BR]] The invocation to preproc-sess above instructs the program to perform volumetric (i.e., 3d cartesian) smoothing with a full-width-half-max (fwhm) of 5mm. It will automatically use the motion corrected volume (fmc.nii) as the input. The output will be saved in fmcsm5.nii. This will be peformed for each run. There are several philosophies about how much to smooth, but usually 1.5-2 voxels is acceptable. So, if your voxel size is 3.125 by 3.125 by 5.0 mm, then fwhm=5mm is reasonable. Also, when you are going to perform surfaced-based group random effects analysis, you should consider not smoothing in the volume at all and perform surface-based smoothing prior to random effects analysis. If you are going to do both volume and surface-based analyses, then you will have to perform two different analyses. Finally, brain masking does a quick segmentation of the brain from the rest of the volume.
Intensity normalization (INorm) will NOT be run by default. The “selxavg3-sess” performs intensity normalization in a different way that does not require the mean intensity (.meanval) to be computed in advance. You can turn on inorm with the -inorm flag. Also, slice-timing correction can be turn on by specifying a slice order with -sliceorder. [[BR]]
Line 16: Line 16:
There are a lot of things going on "under the hood", so I'll explain each one.By default, preproc-sess will perform brain masking, motion correction, and inorm. The other stages have to be specified explicitly. -s sessid tells preproc-sess the name of the session as created with unpacksdcmdir. Once it has the session, it can find the raw data in sessid/bold/RRR as f.bhdr (RRR is a run number). It will use the first time point of the first run as a template for both motion correction and brain masking. The brain mask is created using FSL's bet program. The result is stored in bold/masks/brain.bhdr. This is a "binary" mask, i.e., each voxel is either 0 (not in the brain) or 1 (in the brain). preproc-sess will then perform motion correction (using AFNI) on each run that it finds in the bold directory using the first time point of the first run as the template. In each run, it will create a volume called fmc.bhdr. In addition, there will be fmc.mcdat with the motion correction parameters. It will also create mcextreg_000.bfloat, which can be used as a motion-related nuisance regressor at the time of analysis (discussed later). There is no answer to the question of "how much motion is too much?". Basically, you would like to avoid motion that is stimulus correlated as well as any sharp head jerks. Check severity of motion by plotting motion correction translation component versus time point with ["plot-twf-sess"]. [[BR]]

The invocation to preproc-sess above instructs the program to perform volumetric (i.e., 3d cartesian) smoothing with a full-width-half-max (fwhm) of 5mm. It will automatically use the motion corrected volume (fmc.bhdr) as the input. The output will be saved in fmcsm5.bhdr. This will be peformed for each run. There are several philosophies about how much to smooth, but usually 1.5-2 voxels is acceptible. So, if your voxel size is 3.125 by 3.125 by 5.0 mm, then fwhm=5mm is reasonable. Also, when you are going to perform surfaced-based group random effects analysis, you should consider not smoothing in the volume at all and perform surface-based smoothing prior to random effects analysis. If you are going to do both volume and surface-based analyses, then you will have to perform two different analyses. Finally, the intensity normalization is performed on the final output of preprocessing. The actual intensities will not be rescaled at this stage. Rather, inorm simply creates a .meanval file with the mean in-brain intensity. E.g., fmcsm5.meanval would be output from the command above.
Also, the “preproc-sess” only run a stage if the input is newer than the output. E.g., if you are running MC and smoothing, it will check whether the raw data has changed before rerunning MC, and it will check whether MC has changed before rerunning smoothing. If the output of a stage does not exist, it will of course run that stage. Automatic update can be turned off with -force or -no-update. This feature will only rerun the stages that are needed.

Preprocessing specifically refers to anything that is done to the data prior to computing a standard deviation, but can also include various other things (e.g., computing masks). In FS-FAST, these are the preprocessing steps:

*1. Motion Correction BR *2. Spatial Smoothing BR *3. Brain Masking BR

The FS-FAST program "preproc-sess" will perform all of these stages. Most of these stages are self-explanatory.

You can run it something like: preproc-sess -s <subjid or sessid> -fwhm 5 BR

There are a lot of things going on "under the hood". By default, preproc-sess will perform motion correction, spatial smoothing and brain masking. The other stages have to be specified explicitly. -s subjid or sessid can find the raw data in subjid or sessid/bold/RRR as f.nii (RRR is a run number). It will use the first time point of the first run as a template for both motion correction and brain masking. The brain mask is created using FSL's bet program. The result is stored in bold/masks/brain.nii. This is a "binary" mask, i.e., each voxel is either 0 (not in the brain) or 1 (in the brain). “preproc-sess” will then perform motion correction (using AFNI) on each run that it finds in the bold directory using the first time point of the first run as the template. In each run, it will create a volume called fmc.nii. In addition, there will be fmc.mcdat with the motion correction parameters. It will also create mcextreg_000.bfloat, which can be used as a motion-related nuisance regressor at the time of analysis (discussed later). There is no answer to the question of "how much motion is too much?". Basically, you would like to avoid motion that is stimulus correlated as well as any sharp head jerks. Check severity of motion by plotting motion correction translation component versus time point with ["plot-twf-sess"]. BR

The invocation to preproc-sess above instructs the program to perform volumetric (i.e., 3d cartesian) smoothing with a full-width-half-max (fwhm) of 5mm. It will automatically use the motion corrected volume (fmc.nii) as the input. The output will be saved in fmcsm5.nii. This will be peformed for each run. There are several philosophies about how much to smooth, but usually 1.5-2 voxels is acceptable. So, if your voxel size is 3.125 by 3.125 by 5.0 mm, then fwhm=5mm is reasonable. Also, when you are going to perform surfaced-based group random effects analysis, you should consider not smoothing in the volume at all and perform surface-based smoothing prior to random effects analysis. If you are going to do both volume and surface-based analyses, then you will have to perform two different analyses. Finally, brain masking does a quick segmentation of the brain from the rest of the volume. Intensity normalization (INorm) will NOT be run by default. The “selxavg3-sess” performs intensity normalization in a different way that does not require the mean intensity (.meanval) to be computed in advance. You can turn on inorm with the -inorm flag. Also, slice-timing correction can be turn on by specifying a slice order with -sliceorder. BR

Also, the “preproc-sess” only run a stage if the input is newer than the output. E.g., if you are running MC and smoothing, it will check whether the raw data has changed before rerunning MC, and it will check whether MC has changed before rerunning smoothing. If the output of a stage does not exist, it will of course run that stage. Automatic update can be turned off with -force or -no-update. This feature will only rerun the stages that are needed.

FsFastPreprocessData (last edited 2009-02-13 10:18:36 by DanielGoldenholz)