Last active
February 15, 2022 21:55
-
-
Save JohnGriffiths/5957856 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| ---------------------------------- | |
| jg_MUSC_connectome_tractography.py | |
| ---------------------------------- | |
| Modified version of MUSC connectome (probabilistic) tractography pipeline | |
| (original code is at bottom of file, plus links to website) | |
| Modifications: | |
| - Using own ROIs, and flirt, bedpostx, etc. are done, so just picking up the pipeline from the probtrackx part | |
| - Re-written ('improved') various non-python bits in python | |
| - Added 'verbose==2' flag to probtrackx call so it outputs streamlines | |
| - (Creates a voxelwise 'connectome atlas' ??) | |
| Notes: | |
| - To do: | |
| - tidy up all this scripts | |
| - make sure the libraries, nipype bits, etc work on cbu server | |
| - show others how to do that (incl. git; gists??) | |
| - **ADD VERBOSE=2 (add as an argument, or have to modify the musicip code??** | |
| - **look into connectome atlas generation** | |
| - **add chris filo neuroutils particle reader to tidy up streamlines into vtk** | |
| - **look into ways to flexibly re-parcellate these datasets | |
| - **look into ways of seeding from g/wm surface** | |
| - (note: nipype tractography workflow separates 1 tensor vs. 2 tensor models. don't think MUSC does that?) | |
| - (note: musc also has a deterministic tractography option with dtk. perhaps use this? | |
| - (Q: how much easier / quicker is this than a conventional nipype workflow?) | |
| - ipython notebook?? | |
| """ | |
| """ | |
| -------------- | |
| Import modules | |
| -------------- | |
| """ | |
| import os | |
| from os.path import join,isdir,isfile | |
| import glob | |
| import numpy as np | |
| import nibabel as nib | |
| from nipype.interfaces import fsl | |
| import muscip.connectome as mcon | |
| import bedpostx_particle_reader as bpx | |
| import subprocess as sp | |
| from IPython import embed | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment