-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add MPRAGE processing and visualisation #46
Conversation
@jcohenadad please review This should contain everything needed to process MPRAGE scans and create the associated figure |
also adresses #38 |
data_processing.ipynb
Outdated
@@ -163,13 +168,14 @@ | |||
"source": [ | |||
"# Define useful variables\n", | |||
"\n", | |||
"path_data = os.getcwd()\n", | |||
"path_data = os.getcwd() #works if and only if this is run first and once. Otherwise it will pick up whatever the current directory is if someone wanted to rerun it\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data_processing.ipynb
Outdated
"# shim_modes = [\"CP\", \"CoV\"] # debugging\n", | ||
"print(f\"shim_modes: {shim_modes}\")\n", | ||
"subjects = sorted(glob.glob(\"sub-*\"))\n", | ||
"subjects = sorted(glob.glob(\"sub-*\")) #Same problem with rerunning it if the cwd is not the ds004906 root\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data_processing.ipynb
Outdated
@@ -259,12 +269,12 @@ | |||
"metadata": {}, | |||
"outputs": [], | |||
"source": [ | |||
"# Extract the signal intensity on the GRE scan within the spinal cord between levels C1 and T2 (included)\n", | |||
"# Extract the signal intensity on the GRE scan within the spinal cord between levels C3 and T2 (included)\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is outside the scope of this PR.
that should go in the PR body-- i've added it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on 36bb2d7 I'm getting:
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
Cell In[9], line 8
6 os.chdir(os.path.join(path_data, subject, "anat"))
7 CoV_flatten=glob.glob(os.path.join(path_data, subject, "anat", f"{subject}_acq-CoV_T1w_crop_flatten.nii.gz"))
----> 8 CoV_flatten=CoV_flatten[0]
9 CoV_flatten_data=nib.load(CoV_flatten).get_fdata()
10 CP_flatten=glob.glob(os.path.join(path_data, subject, "anat", f"{subject}_acq-CP_T1w_reg_flatten.nii.gz"))
IndexError: list index out of range
False alarm: I forgot to run required cells before :🤦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarifies text wrt choice of CoV GRE and MPRAGE for segmentation
Fixes #37
Fixes #38
Fixes #39
Fixes #43
Fixes #45