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

BundleSeg exploration viewer for filtering #1035

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

Conversation

frheault
Copy link
Member

@frheault frheault commented Oct 11, 2024

Quick description

Implemented a new BundleSeg slider feature for filtering
Improved code to limit RAM usage by processing FreeSurfer surfaces (FSS) in chunks, making it easier to handle larger datasets.

New Features:

  • Exploration Mode (--exploration_mode):
    This mode searches all bundles at a higher pruning threshold (12mm).
    A second script then visualizes the results and can save outputs in the specified folder.
  • Distance Threshold Modification (--modify_distance_thr):
    Allows customization of the pruning distance threshold for all bundles.
    Default value is 0.0, but this parameter can be adjusted based on the user's requirements.

Performance Improvements:
Slight speed optimization, especially for large datasets. For example, processing a 2GB tractogram with 6M streamlines and 51 atlas bundles takes approximately 5 minutes on 4 processes.
RAM usage is now optimized, allowing for smoother handling of large subjects on machines with limited resources (e.g., 5 large subjects processed on 4 CPUs with 32GB RAM).

Note: Using more than 4 processes (e.g., 8 or 16) doesn't significantly improve speed in this scenario.

image
Title:
...

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

Provide data, screenshots, command line to test (if relevant)

...

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

@pep8speaks
Copy link

pep8speaks commented Oct 11, 2024

Hello @frheault, Thank you for updating !

Line 152:80: E501 line too long (81 > 79 characters)
Line 163:80: E501 line too long (85 > 79 characters)
Line 177:80: E501 line too long (80 > 79 characters)
Line 261:80: E501 line too long (81 > 79 characters)
Line 319:80: E501 line too long (83 > 79 characters)

Line 210:80: E501 line too long (81 > 79 characters)
Line 277:80: E501 line too long (84 > 79 characters)
Line 286:80: E501 line too long (84 > 79 characters)
Line 375:80: E501 line too long (81 > 79 characters)

Line 192:80: E501 line too long (80 > 79 characters)
Line 217:80: E501 line too long (80 > 79 characters)
Line 292:80: E501 line too long (80 > 79 characters)
Line 406:80: E501 line too long (80 > 79 characters)
Line 458:80: E501 line too long (81 > 79 characters)
Line 465:80: E501 line too long (80 > 79 characters)

Line 25:80: E501 line too long (80 > 79 characters)

Comment last updated at 2024-11-19 14:02:24 UTC

Copy link

codecov bot commented Oct 11, 2024

Codecov Report

Attention: Patch coverage is 18.96956% with 346 lines in your changes missing coverage. Please review.

Project coverage is 68.08%. Comparing base (e7337af) to head (6ec2906).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1035      +/-   ##
==========================================
- Coverage   68.93%   68.08%   -0.86%     
==========================================
  Files         438      439       +1     
  Lines       22889    23219     +330     
  Branches     3106     3135      +29     
==========================================
+ Hits        15779    15809      +30     
- Misses       5793     6088     +295     
- Partials     1317     1322       +5     
Components Coverage Δ
Scripts 68.47% <3.90%> (-1.37%) ⬇️
Library 67.52% <48.27%> (-0.14%) ⬇️
---- 🚨 Try these New Features:

@frheault
Copy link
Member Author

@GuillaumeTh Testing BundleSeg on a random big tractogram with the new --exploration_mode option and then using the viewer would be great for a tumor case showcase.

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