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

FIX: Clarify phase encoding direction, rather than axis #2302

Merged
merged 7 commits into from
Oct 12, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions fmriprep/interfaces/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,12 @@ def _generate_segment(self):
'(boundary-based registration, BBR) - %d dof' % dof,
'FreeSurfer <code>mri_coreg</code> - %d dof' % dof],
}[self.inputs.registration][self.inputs.fallback]
if self.inputs.pe_direction is None:
pedir = 'MISSING - Assuming Anterior-Posterior'
else:
pedir = {'i': 'Left-Right', 'j': 'Anterior-Posterior'}[self.inputs.pe_direction[0]]
pedir = {
'i-': 'Left-Right',
'i': 'Right-Left',
'j-': 'Anterior-Posterior',
'j': 'Posterior-Anterior'
}.get(self.inputs.pe_direction, 'MISSING - Assuming Anterior-Posterior')
Copy link
Member

Choose a reason for hiding this comment

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

This is only true for LAS images. We need the orientation of the original image, to be certain.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point - I've added a commit to consider LAS/RAS. How extensive do you think our support should be for different orientations?


if isdefined(self.inputs.confounds_file):
with open(self.inputs.confounds_file) as cfh:
Expand Down