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

Adding legacy options to scil_convert_sh_basis.py #704

Merged
merged 4 commits into from
May 23, 2023

Conversation

karanphil
Copy link
Contributor

Hi, this is a small addition to the scil_convert_sh_basis.py script to allow for the choice of not legacy versions of descoteaux07 and tournier07 SH bases. Previously, both bases were assumed to be legacy, which is usually the case for Dipy (descoteaux07). However, the current Mrtrix3 tools use a new version of tournier07, which is not the "legacy" one. So when converting from tournier07 with new data to descoteaux07, I got some weird little blobs at the center of my fODFs. Now, we can specify if we don't want the legacy version for the output, and if the input was coded with legacy or not.

I was wondering if I should check for the input/output selected bases and choose not legacy by default for tournier07. What do you think @arnaudbore @CHrlS98 ?

@arnaudbore arnaudbore self-requested a review April 3, 2023 15:31
@arnaudbore
Copy link
Contributor

Build passed ! Good Job 🍻 !

Copy link
Contributor

@CHrlS98 CHrlS98 left a comment

Choose a reason for hiding this comment

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

It looks good, but I just wonder if we shouldn't change the name of the SH bases such that we have descoteaux07, descoteaux07_legacy, tournier07 and tournier07_legacy? And specify input SH basis and output SH basis instead of only input.

@karanphil
Copy link
Contributor Author

Good point. Either ways look fine to me. I will let @arnaudbore choose ;)

@CHrlS98
Copy link
Contributor

CHrlS98 commented Apr 3, 2023

We can start this way and then if we want to support legacy vs non-legacy everywhere we can think of a way to integrate it in the add_sh_basis_args() method.

Copy link
Contributor

@arnaudbore arnaudbore left a comment

Choose a reason for hiding this comment

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

A couple of comments but apart from that LGTM.

scripts/scil_convert_sh_basis.py Outdated Show resolved Hide resolved
@@ -42,13 49,18 @@ def main():
assert_inputs_exist(parser, args.in_sh)
assert_outputs_exist(parser, args, args.out_sh)

print(args.is_input_not_legacy)
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove print and add logging to verbose some info of the sh basis/legacy/not legacy...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure the verbose is necessary here... and if so, what would be the right way to do it?

scilpy/reconst/multi_processes.py Show resolved Hide resolved
@arnaudbore arnaudbore self-requested a review May 17, 2023 19:19
@arnaudbore
Copy link
Contributor

Build passed ! Good Job 🍻 !

@arnaudbore
Copy link
Contributor

Build passed ! Good Job 🍻 !

@arnaudbore
Copy link
Contributor

Build passed ! Good Job 🍻 !

@arnaudbore arnaudbore merged commit 0a8b5fa into scilus:master May 23, 2023
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.

3 participants