Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
tools:preprocessmprage [2025/08/04 14:27] – created will | tools:preprocessmprage [2025/08/04 14:38] (current) – will | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== preprocessMprage (Hallquist pipeline) ====== | ====== preprocessMprage (Hallquist pipeline) ====== | ||
- | '' | + | '' |
+ | |||
+ | It is analogous to [[https:// | ||
Important files include: | Important files include: | ||
Line 7: | Line 9: | ||
* '' | * '' | ||
* '' | * '' | ||
+ | |||
+ | |||
+ | |||
+ | ===== mp2rage ===== | ||
+ | |||
+ | The mp2rage from 7T projects ([[: | ||
+ | See [[: | ||
+ | | ||
+ | * skullstrip the INV component instead of the combined UNIDEN or use [[: | ||
+ | * SPM correction via VS's [[projects: | ||
+ | * try '' | ||
+ | |||
===== QA/QC ===== | ===== QA/QC ===== | ||
Line 14: | Line 28: | ||
The most likely failure is during skullstripping. | The most likely failure is during skullstripping. | ||
- | {{: | + | {{: |
==== Failure example ==== | ==== Failure example ==== | ||
- | {{: | + | {{: |
Inspecting further with '' | Inspecting further with '' | ||
- | {{: | + | {{: |
+ | |||
+ | ===== Options ===== | ||
+ | |||
+ | < | ||
+ | ---------------------------------------------- | ||
+ | preprocessMprage is a shell script that computes the nonlinear warp of a | ||
+ | participant' | ||
+ | |||
+ | It is intended to be run within an mprage directory containing raw data (or a | ||
+ | nifti of the raw data if you use the -n option). | ||
+ | |||
+ | The basic pipeline is: | ||
+ | 1) Convert dicom files to NIFTI | ||
+ | 2) Optional bias field correction to reduce spatial variation in intensity | ||
+ | due to coil sensitivity. Particularly important for 32-channel T1 images. | ||
+ | 3) Brain extract the structural image | ||
+ | 4) Warp structural to standard stereotactic space using affine (linear) | ||
+ | transformation: | ||
+ | 5) Warp structural image to stereotactic space using nonlinear transformation | ||
+ | with fnirt. Affine coefficients from the linear warping are used as | ||
+ | | ||
+ | | ||
+ | use a custom settings file adapted from FSL's MNI configuration. | ||
+ | |||
+ | Command line options: | ||
+ | -b -bet_opts: bet options. Passes value to fsl bet (brain extraction). | ||
+ | Must be quoted (e.g., -b "-f 0.7"). Defaults to "-R -f 0.5 -v" | ||
+ | -bright_skull: | ||
+ | Skull voxels that are bright (esp. near top of brain) can lead to artifactual stretching in FNIRT. | ||
+ | This correction is recommended if the skull is noticeably brighter (2-3x) than brain voxels. | ||
+ | -check_dependencies: | ||
+ | -cleanup: cleanup intermediate files not needed for further processing. | ||
+ | -cleanup_only: | ||
+ | -custom_brainmask: | ||
+ | Must be the same dimensions as the structural scan. Technically, | ||
+ | non-zero values are used to mask the structural image. | ||
+ | -cut_zindex Z: keep index Z to end. use Z1-Z2 to specify range. (e.g. ' | ||
+ | useful when brain is only part of image. | ||
+ | -d -delete_dicom: | ||
+ | untouched), -d y (" | ||
+ | compresses files into archive file: mprage_dicom.tar.gz. If not | ||
+ | passed, user will be prompted for action. Can also use " | ||
+ | -deface: use pydeface to remove face and maybe also hands and arms near the face (esp. babies) | ||
+ | -deneck: remove from the neck down with local remove_neck.py (implemented for baby data) | ||
+ | -fnirt_mask: | ||
+ | vtight: no dilation of template brain mask | ||
+ | tight: 1x dilation (-dilF) of mask | ||
+ | normal: 2x dilation (-dilF -dilF) of mask (default) | ||
+ | loose: 3x dilation (-dilF -dilF -dilF) of mask | ||
+ | -grad_unwarp: | ||
+ | Structural image will be corrected for gradient distortion prior to transformation to template. | ||
+ | -h -help: print command help | ||
+ | -log: Name for log file that documents each command that is run. Default: preprocessMprage.log | ||
+ | -n -nifti: skip DICOM conversion and start with specified NIFTI file. | ||
+ | Example: -n mprage.nii.gz (will complete bet, flirt, and | ||
+ | fnirt, but skip DICOM -> NIFTI conversion). | ||
+ | -no_bias: skip bias field correction. | ||
+ | -no_robustfov: | ||
+ | -o -output: output file name. The filename for the final warped mprage image. | ||
+ | Defaults to mprage_nonlinear_warp_< | ||
+ | -p -dicom: file pattern for dicom MR files. Defaults to " | ||
+ | -post_bet_skullmask: | ||
+ | See https:// | ||
+ | -r -template_brain: | ||
+ | Default is " | ||
+ | -startover: ignore .preprocessmprage_complete. useful if changing/ | ||
+ | -ss_method: skull-stripping method used to create final brain-extracted data. Default is fnirt-inv. Options: | ||
+ | fnirt-inv: uses the template brain mask warped onto the subject' | ||
+ | bet: uses the bet program (FSL) to skull strip (also respects -bet_opts). | ||
+ | 3dSkullStrip: | ||
+ | noisy: use @NoisySkullStrip | ||
+ | ROBEX: uses the ROBEX program (which doesn' | ||
+ | freesurfer=/ | ||
+ | -strong_bias: | ||
+ | -unifize: | ||
+ | -use_old_mni: | ||
+ | -w -warpres: resolution of warp basis (nonlinear neighborhood size) in mm. Default is 8 mm. | ||
+ | -weak_bias: used for images with little and/or smooth bias fields (cf. fsl_anat). This is the default. | ||
+ | |||
+ | Example call: preprocessMprage -r MNI_2mm -b "-R -f 0.5 -g 0.2" -d a -o mprage_final.nii.gz -w 6 | ||
+ | ---------------------------------------------- | ||
+ | |||
+ | </ |