Skip to content
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

DWI preprocessing #13

Closed
wants to merge 13 commits into from
Closed

DWI preprocessing #13

wants to merge 13 commits into from

Conversation

yeunkim
Copy link

@yeunkim yeunkim commented Mar 23, 2017

Implementation of HCP minimal preprocessing pipeline's diffusion preprocessing.
Supports multiple runs (i.e. run-01, run-02) and directions (i.e. dir98, dir99). Requires both phase encodings (i.e. LR and RL or AP and PA).
Example BIDS compatible naming scheme:
sub-01_acq-dir98AP_run-01_dwi.bval
sub-01_acq-dir98AP_run-01_dwi.bvec
sub-01_acq-dir98AP_run-01_dwi.nii.gz
sub-01_acq-dir98AP_run-01_dwi.json
sub-01_acq-dir98AP_run-01_sbref.nii.gz
sub-01_acq-dir98AP_run-01_sbref.json
.
.
.
etc.

Perhaps in the future, the naming scheme could be similar to this.

@chrisgorgo
Copy link
Contributor

Could you rebase or merge master?

@chrisgorgo
Copy link
Contributor

Could you also remove those XML files - I think they were added by accident.

run.py Outdated
dwiname = "Diffusion" + "_dir-" + dirnum + "_" + session + "_corr"

diracqs = [x for x in acqs if dirnum in x]
if "AP" or "PA" in diracqs:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to use the metadata in the sidecar JSON file instead of file names - we cannot rely on those. You can easily access it via get_metadata method from pybids.

@chrisgorgo
Copy link
Contributor

It's a good starting point! Let me know if you have any questions.

run.py Outdated
print('\n', cmd, '\n')
# run(cmd, cwd=args["path"], env={"OMP_NUM_THREADS": str(args["n_cpus"])})

def run_task_fmri_analysis(**args):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's leave this for another PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The task FMRI processing that is.

run.py Outdated
subject=subject_label, type='dwi',
extensions=["nii.gz", "nii"]))

for session in numruns:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not call it "run" instead of "session"? it would be less confusing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants