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

Tractogram scripts part 5 #983

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

EmmaRenauld
Copy link
Contributor

Quick description

Next step in tractogram scripts verification. All the next scripts were already pretty much ok! Yeah! Pretty much only formatting changes, and more verifications!

Stopped after 6 scripts. A part 6 will follow :)

  • scil_tractogram_math
  • scil_tractogram_pairwise_comparison
  • scil_tractogram_project_maps_to_streamlines
  • scil_tractogram_project_streamlines_to_map
  • scil_tractogram_qbx
  • scil_tractogram_register

Type of change

Check the relevant options.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • My code follows the style guidelines of this project (run autopep8)
  • I added relevant citations to scripts, modules and functions docstrings and descriptions
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I moved all functions from the script file (except the argparser and main) to scilpy modules
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@EmmaRenauld EmmaRenauld changed the title [WIP] Tractogram scripts parts5 Tractogram scripts parts5 Apr 23, 2024
@EmmaRenauld EmmaRenauld changed the title Tractogram scripts parts5 Tractogram scripts part 5 Apr 23, 2024
@EmmaRenauld
Copy link
Contributor Author

scil_tractogram_project_streamlines_to_map: all tests failed at line assert_headers_compatible. Indeed, in the test data, the tractogram did not fit with the chosen maps. Changed the data.

Copy link

codecov bot commented Apr 23, 2024

Codecov Report

Attention: Patch coverage is 89.47368% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 67.98%. Comparing base (11f218b) to head (56e5a4a).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #983      +/-   ##
==========================================
+ Coverage   67.97%   67.98%   +0.01%     
==========================================
  Files         419      419              
  Lines       21615    21610       -5     
  Branches     3251     3248       -3     
==========================================
- Hits        14693    14692       -1     
+ Misses       5633     5632       -1     
+ Partials     1289     1286       -3     
Components Coverage Δ
Scripts 68.97% <88.88%> (+0.01%) ⬆️
Library 66.49% <100.00%> (ø)

scilpy/tractograms/tractogram_operations.py Outdated Show resolved Hide resolved
scripts/scil_tractogram_math.py Outdated Show resolved Hide resolved
scripts/scil_tractogram_math.py Outdated Show resolved Hide resolved
@@ -113,22 +112,24 @@ def main():
args = parser.parse_args()
logging.getLogger().setLevel(logging.getLevelName(args.verbose))

# Verifications
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need this comment? the methods are already pretty explicit in what they do...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So far, all scripts I checked have been separated into: verifications, loading, processing, saving. Easier to proof-read for me.

@frheault
Copy link
Member

@EmmaRenauld I just realized that scil_connectivity_pairwise_agreement.py use the word agreement, not comparison. Should it be a small PR or should we wait for a big connectivity refactor?

@EmmaRenauld
Copy link
Contributor Author

I just realized that scil_connectivity_pairwise_agreement.py use the word agreement, not comparison. Should it be a small PR or should we wait for a big connectivity refactor?

Indeed, I see that we have
-scil_tractogram_pairwise_comparison
-scil_bundle_pairwise_comparison
-scil_connectivity_pairwaise_agreement.

Is there a fundamental difference between these 3 scripts in the reason why we would want to use them, of the type of study?

If not, I can change it if you want, in any PR.

@frheault
Copy link
Member

They all return json with scores of similarity (dice, correlation, etc). And I just did a PR for the same concept with volume (for masks and atlas): scil_volume_pairwise_comparison.py

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

3 participants