-
Notifications
You must be signed in to change notification settings - Fork 39
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: Output thickness, curvature, and sulcal depth files #296
Conversation
…e using to_scanner
…o derivatives yet
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.
If we restore all of the removed lines, we'll preserve the work done in #295. Then I think we can reduce this to a relatively small addition. We'll then need to go into outputs.py
and add a couple nodes to write out the files correctly, mirroring what we do for .surf.gii
:
smriprep/smriprep/workflows/outputs.py
Lines 592 to 601 in b29578e
# Surfaces | |
name_surfs = pe.MapNode( | |
Path2BIDS(), iterfield="in_file", name="name_surfs", run_without_submitting=True | |
) | |
ds_surfs = pe.MapNode( | |
DerivativesDataSink(base_directory=output_dir, extension=".surf.gii"), | |
iterfield=["in_file", "hemi", "suffix"], | |
name="ds_surfs", | |
run_without_submitting=True, | |
) |
(fs2gii, allsurf_list, [('converted', 'in1')]), | ||
(fscurv2funcgii, allsurf_list, [('converted', 'in2')]), | ||
(allsurf_list, outputnode, [('out', 'surfaces')]) |
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.
I think we're going to have trouble conflating .surf.gii
files and .shape.gii
files. I think we should probably not combine them and instead make a new morphometrics
output. Something like:
(fs2gii, allsurf_list, [('converted', 'in1')]), | |
(fscurv2funcgii, allsurf_list, [('converted', 'in2')]), | |
(allsurf_list, outputnode, [('out', 'surfaces')]) | |
(fscurv2funcgii, outputnode, [('converted', 'morphometrics')]), |
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.
that makes a lot of sense -- I'll make sure to do the same moving forward when handling the cifti conversion
allsurf_list = pe.Node( | ||
niu.Merge(7), | ||
name="allsurf_list", | ||
run_without_submitting=True, | ||
) |
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.
allsurf_list = pe.Node( | |
niu.Merge(7), | |
name="allsurf_list", | |
run_without_submitting=True, | |
) |
whitesurf_list = pe.Node( | ||
niu.Merge(3, ravel_inputs=True), | ||
name="whitesurf_list", | ||
run_without_submitting=True, | ||
) | ||
fscurv2funcgii = pe.MapNode( | ||
fs.MRIsConvert(out_datatype="gii", to_scanner=True), | ||
iterfield=["in_file", "scalarcurv_file"], name="fscurv2funcgii", | ||
) |
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.
We don't need to iterate if in_file
is always the same.
whitesurf_list = pe.Node( | |
niu.Merge(3, ravel_inputs=True), | |
name="whitesurf_list", | |
run_without_submitting=True, | |
) | |
fscurv2funcgii = pe.MapNode( | |
fs.MRIsConvert(out_datatype="gii", to_scanner=True), | |
iterfield=["in_file", "scalarcurv_file"], name="fscurv2funcgii", | |
) | |
fscurv2funcgii = pe.MapNode( | |
fs.MRIsConvert(out_datatype="gii"), | |
iterfield=["scalarcurv_file"], name="fscurv2funcgii", | |
) |
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.
won't the in_file vary by hemisphere? I'm a little confused by the interface, I'll admit :)
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.
Oh right. That might be the best way to do this after all.
(get_surfaces, whitesurf_list, [('smoothwm', 'in1'), | ||
('smoothwm', 'in2'), | ||
('smoothwm', 'in3')]), | ||
(whitesurf_list, fscurv2funcgii, [('out', 'in_file')]), |
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.
(get_surfaces, whitesurf_list, [('smoothwm', 'in1'), | |
('smoothwm', 'in2'), | |
('smoothwm', 'in3')]), | |
(whitesurf_list, fscurv2funcgii, [('out', 'in_file')]), | |
(get_surfaces, fscurv2funcgii, [('smoothwm', 'in_file')]), |
@ericfeczko The requirement that we find the right |
that sounds perfect -- I'm in meeting hell right now, but I can try to give this a shot tonight or tomorrow. |
Here's an (untested) attempt: 857e0bd You may need to add my fork to try it out:
|
What are the expected outputs? I guess |
Closed by #305 |
This address issue #288. I'm running into some errors with the outputs due to some syntax issues that were introduced. Will be doing some testing with circle CI today to debug. Will also ensure pep8 compatibility.