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: added 'hsvs' option to 5ttgen + mrtransform fix #3630

Merged
merged 5 commits into from
Mar 17, 2024

Conversation

teanijarv
Copy link
Contributor

@teanijarv teanijarv commented Feb 20, 2024

  • added Hybrid Surface and Volume Segmentation ('hsvs') option to the 5TT image generation class
  • removed the in_file existing requirement (exists=True -> exists=False) for 5ttgen because hsvs requires a directory not a file as input
  • changed '-inverse' parameter location from 1 to 2 in mrtransform class (to make it possible to insert it in the command together with other parameters)

- Added 'hsvs' option for 5ttgen function
- Changed '-inverse' parameter location from 1 to 2 (otherwise cannot use together with -linear)
@teanijarv teanijarv changed the title ENH: added 'hsvs' option to 5ttgen ENH: added 'hsvs' option to 5ttgen + mrtransform fix Feb 20, 2024
argstr="%s",
position=-3,
mandatory=True,
desc="tissue segmentation algorithm",
)
in_file = File(
exists=True, argstr="%s", mandatory=True, position=-2, desc="input image"
exists=False, argstr="%s", mandatory=True, position=-2, desc="input image"
Copy link
Member

Choose a reason for hiding this comment

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

So it seems like you need either a file or a directory, not a missing file.

in_file = traits.Either(
    File(exists=True),
    Directory(exists=True),
    argstr="%s", mandatory=True, position=-2, desc="input image / directory"
)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! I added this solution now. :)

@@ -822,7 +823,7 @@ class MRTransformInputSpec(MRTrix3BaseInputSpec):
)
invert = traits.Bool(
argstr="-inverse",
position=1,
position=2,
Copy link
Member

Choose a reason for hiding this comment

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

This means -invert will appear after all of the things with position=1. Does it need to come last, before in_files/out_file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the position change for now, but I just added this previously because if I wanted to use -inverse with some other parameter and they both had 'position=1' then only one would show up on the command. But it can also be fixed by just using inputs.args string.

Copy link

codecov bot commented Feb 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.15%. Comparing base (42302ed) to head (7fc44fd).
Report is 7 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3630   +/-   ##
=======================================
  Coverage   63.15%   63.15%           
=======================================
  Files         308      308           
  Lines       40825    40825           
  Branches     5656     5656           
=======================================
  Hits        25781    25781           
  Misses      14031    14031           
  Partials     1013     1013           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@effigies effigies merged commit 46e1df6 into nipy:master Mar 17, 2024
16 of 18 checks passed
@effigies effigies mentioned this pull request Mar 20, 2024
6 tasks
@effigies effigies mentioned this pull request Oct 31, 2024
6 tasks
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