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

[ENH] Code revision of anatomical workflows #622

Merged
merged 14 commits into from
Aug 1, 2017

Conversation

oesteban
Copy link
Member

@oesteban oesteban commented Jul 29, 2017

Part of #225 , depends on #621

  • Convert several Function interfaces into fully-fledged nipype interfaces.
  • Some PEP8 fixes
  • Use n_procs at Node initialization.
  • Set memory limit to FSL FAST.

@oesteban oesteban requested a review from effigies July 29, 2017 06:36
@effigies effigies mentioned this pull request Jul 29, 2017
8 tasks
Copy link
Member

@effigies effigies left a comment

Choose a reason for hiding this comment

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

Looks good. Couple minor comments. Circle issue is weird, but I don't see anything here that might have triggered it.



class FSInjectBrainExtractedOutputSpec(TraitedSpec):
subjects_dir = Directory(desc='FreeSurfer SUBJECTS_HOME')
Copy link
Member

Choose a reason for hiding this comment

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

SUBJECTS_DIR



class FSInjectBrainExtractedInputSpec(BaseInterfaceInputSpec):
subjects_dir = Directory(mandatory=True, desc='FreeSurfer SUBJECTS_HOME')
Copy link
Member

Choose a reason for hiding this comment

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

SUBJECTS_DIR


# https://surfer.nmr.mgh.harvard.edu/fswiki/SubmillimeterRecon
mris_inflate = '-n 50' if hires else None
return (t2w, hires, mris_inflate)
Copy link
Member

Choose a reason for hiding this comment

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

Is there any reason to keep these functions separate from the interfaces? The functions themselves don't make a lot of sense to use except in a pipeline (the latter especially), so there's not much need to preserve them for other uses.

Copy link
Member Author

Choose a reason for hiding this comment

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

It is generally easier to write unit tests on these split functions, if we find the time. Other than that, I don't have a particular preference.

Copy link
Member Author

Choose a reason for hiding this comment

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

@effigies still considering to move the code into the interfaces? Otherwise, this is ready to merge.


return workflow


def init_gifti_surface_wf(name='gifti_surface_wf'):
"""
Extract surfaces from FreeSurfer derivatives folder and
re-center GIFTI coordinates to fit align to native T1 space
Copy link
Member

Choose a reason for hiding this comment

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

Typo in the old docstring. Remove fit.

@effigies effigies merged commit 0cc9ac5 into nipreps:master Aug 1, 2017
@oesteban oesteban deleted the enh/CodeRevision-anatomical branch August 1, 2017 22:50
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.

None yet

2 participants