-
Notifications
You must be signed in to change notification settings - Fork 533
ENH: Add -hires and -expert flags to ReconAll #1857
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
Conversation
At present, this assumes people will create their own expert files. I could add a new interface to be used like: expert_file = pe.Node(ExpertFile(mris_inflate='-n 15'), name='ExpertFile') That produces the file mris_inflate -n 15 As a sketch of the specs limiting the options to programs that will accept expert files (there might be a better way): class ExpertFileInputSpec:
talairach = traits.Str(desc="Flags to pass to talairach commands")
...
mri_aparc2aseg = traits.Str(desc="Flags to pass to mri_aparc2aseg commands")
class ExpertFileOutputSpec:
out_file = File(exists=True, desc="Expert options file") |
Just to note: Segfault still occurring sometimes on Travis. |
Codecov Report
@@ Coverage Diff @@
## master #1857 +/- ##
==========================================
+ Coverage 73.04% 73.05% +0.01%
==========================================
Files 1064 1064
Lines 53367 53411 +44
==========================================
+ Hits 38981 39019 +38
- Misses 14386 14392 +6
Continue to review full report at Codecov.
|
Added the |
Isn't the ExpertOptions interface a little bit of an overkill? I mean it only produces one config file and it will only be connected to ReconAll node (correct me if I am wrong). Wouldn't it be more straightforward to fold this into ReconAll itself? We have created on demand config files on other occasions https://github.com/nipy/nipype/blob/master/nipype/interfaces/dcm2nii.py#L195 |
b824128
to
1941987
Compare
@chrisfilo How do you feel about this fold-in? It accepts either an existing file or a dictionary of I'm also okay with simply dropping file creation. |
@@ -632,6 +633,10 @@ class ReconAllInputSpec(CommandLineInputSpec): | |||
desc="Number of processors to use in parallel") | |||
parallel = traits.Bool(argstr="-parallel", | |||
desc="Enable parallel execution") | |||
hires = traits.Bool(argstr="-hires", min_ver='6.0.0', | |||
desc="Conform to minimum voxel size (for voxels < 1mm)") | |||
expert = traits.Either(File, DictStrStr, argstr='-expert %s', |
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.
File(exists=True)
?
Hmm... now we are not exposing all of the possible dict keys. What about adding all of those inputs to ReconAll 1941987#diff-08eb19cbbabcb3f9cef1bb3197b661ecL2885 and xoring on the expert_file input? This would have an advantage of people knowing straight away what are the possible options WDYT? |
@@ -933,6 +980,24 @@ def cmdline(self): | |||
iflogger.info('resume recon-all : %s' % cmd) | |||
return cmd | |||
|
|||
def _prep_expert_file(self): | |||
if isdefined(self.inputs.extra): |
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.
extra?
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.
What I get for pushing before testing. Updated.
@satra How do you feel about this interface? @chrisfilo is right that the expert file is |
379e59f
to
2aa325e
Compare
FreeSurfer 6 supports a
-hires
flag for submillimeter reconstruction. Currently, it's recommended that an expert options file be provided to modify defaultmris_inflate
parameters, so I've also added the-expert
flag, though it is not new.