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 12 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 206:80: E501 line too long (81 > 79 characters)
Line 273:80: E501 line too long (84 > 79 characters)
Line 282:80: E501 line too long (84 > 79 characters)
Line 371: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 455:80: E501 line too long (80 > 79 characters)
Line 462:80: E501 line too long (80 > 79 characters)

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

Comment last updated at 2024-10-17 17:25:26 UTC

Copy link

codecov bot commented Oct 11, 2024

Codecov Report

Attention: Patch coverage is 19.10670% with 326 lines in your changes missing coverage. Please review.

Project coverage is 67.98%. Comparing base (a07a8ec) to head (0f80d61).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1035      +/-   ##
==========================================
- Coverage   68.79%   67.98%   -0.81%     
==========================================
  Files         432      433       +1     
  Lines       22455    22764     +309     
  Branches     3039     3063      +24     
==========================================
+ Hits        15448    15477      +29     
- Misses       5709     5986     +277     
- Partials     1298     1301       +3     
Components Coverage Δ
Scripts 68.35% <4.11%> (-1.31%) ⬇️
Library 67.46% <48.52%> (-0.11%) ⬇️

@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