.. _external_pipeline: External Pipelines __________________ ********************************** Macaque diffusion weighted imaging ********************************** How to create a whole brain tractogram? *************************************** This pipeline call some commands of the MRtrix tool. You can find the documentation of MRtrix here : https://osf.io/pm9ba/ Perform conversion between different file types ------------------------------------------------ Convertion of bvecs bvals and dwi.nii files in one file .mif .. code-block:: bash $ mrconvert corrected_dwi_sub-xx_ses-T1_acq-AP_dwi.nii.gz -fslgrad corrected_bvecs_sub-xxx_ses-T1_acq-AP_dwi.txt raw_bvals_sub-xxx_ses-T1_acq-AP_dwi.txt output_sub-xxx.mif Option: -fslgrad to reimport diffusion gradient table Generation of a whole brain mask from a DWI image ------------------------------------------------- .. code-block:: bash $ dwi2mask sub-xxx.mif sub-xxx_mask.mif Diffusion tensor estimation ---------------------------- .. code-block:: bash $ dwi2tensor sub-xxx.mif tensor.mif Maps Generation of tensor-derived parameters --------------------------------------------- .. code-block:: bash $ tensor2metric tensor.mif -fa fa.mif Option: -fa to compute the fractional anisotropy (FA) of the diffusion tensor Constrained spherical deconvolution (CSD) ----------------------------------------- Estimation of the impulsionnal response = diffusion signal produced by 1 fiber .. code-block:: bash $ dwi2response dhollander sub-xxx.mif wm.txt gm.txt csf.txt -voxels voxels.mif -mask sub-xxx_mask.mif Option: -voxels to output an image showing the final voxel selection -mask to provide an initial mask for response voxel selection FOD estimation -------------- Estimate fiber orientation distributions from diffusion data using spherical deconvolution .. code-block:: bash $ dwi2fod msmt_csd sub-xxx.mif wm.txt wm.mif gm.txt gm.mif csf.txt csf.mif Convertion of the macaque T1 in .mif file ----------------------------------------- .. code-block:: bash $ mrconvert sub-xxx_T1.nii sub-xxx_T1.mif Generation of a volume which contain the probability to be on the gm-wm interface --------------------------------------------------------------------------------- For this step, you have to use the 5ttgen file generated by macapype. 5TT image is suitable for Anatomically-Constrained Tractography (ACT) (./test_pipeline_single_indiv_params_ants/full_ants_subpipes/brain_segment_from_mask_pipe/export_5tt_pipe/_session_01_subject_xx/export_5tt/gen_5tt.nii) .. code-block:: bash $ 5tt2gmwmi gen_5tt.nii gmwmSeed.mif Perform streamlines tractography -------------------------------- .. code-block:: bash $ tckgen -act gen_5tt.nii -backtrack -seed_gmwmi gmwmSeed.mif -select 1000000 wm.mif tracks_1M.tck Option: -act: use the Anatomically-Constrained Tractography framework during tracking; provided image must be in the 5TT (five-tissue-type) format -backtrack: allow tracks to be truncated and re-tracked if a poor structural termination is encountered -seed_gmwmi: seed from the grey matter - white matter interface -select: set the desired number of streamlines to be selected by tckgen Reduction of the fibers number ------------------------------ .. code-block:: bash $ tckedit tracks_1M.tck -number 200000 smaller_tracks_200k.tck Option: -number: set the desired number of selected streamlines to be propagated to the output file Estimation of the registration of two images together using a symmetric rigid transformation model --------------------------------------------------------------------------------------------------- .. code-block:: bash $ mrregister -type rigid -rigid T1_to_DWI.txt -transformed DWI_T1_space.mif fa.mif T1.nii Option: -type rigid: the registration type -rigid: the output text file containing the rigid transformation as a 4x4 matrix -transformed: image1 after registration transformed and regridded to the space of image2 Application of the spatial transformations to an image ------------------------------------------------------- .. code-block:: bash $ mrtransform -linear T1_to_DWI.txt fa.mif T1_DWI_space.mif Option: -linear: specify a linear transform to apply