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

harmonzie labels for longitudinal lesions - WIP #1039

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

Conversation

frheault
Copy link
Member

@frheault frheault commented Oct 24, 2024

Quick description

This script takes in multiple lesions file (labels) from a single subject (could be scan-rescan, longitudinal, etc.) and relabel the lesions so the overlapping, temporally consistent lesions will have the same labels.

Based on:
https://www.sciencedirect.com/science/article/pii/S2213158218303711?via%3Dihub

image

...

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 24, 2024

Hello @frheault, Thank you for updating !

Line 13:80: E501 line too long (88 > 79 characters)
Line 517:80: E501 line too long (80 > 79 characters)
Line 563:80: E501 line too long (86 > 79 characters)
Line 579:80: E501 line too long (81 > 79 characters)

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

Comment last updated at 2024-10-29 15:43:26 UTC

@frheault
Copy link
Member Author

@Manonedde @ThoumyreStanislas If you have real data (co-registered), this could be tested.

If there are corner cases or problems, I will fix them before adding tests.

Copy link

codecov bot commented Oct 24, 2024

Codecov Report

Attention: Patch coverage is 3.19149% with 91 lines in your changes missing coverage. Please review.

Project coverage is 68.52%. Comparing base (b95593b) to head (34b73b3).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1039      +/-   ##
==========================================
- Coverage   68.79%   68.52%   -0.28%     
==========================================
  Files         432      433       +1     
  Lines       22456    22550      +94     
  Branches     3038     3057      +19     
==========================================
+ Hits        15449    15452       +3     
- Misses       5709     5800      +91     
  Partials     1298     1298              
Components Coverage Δ
Scripts 69.44% <0.00%> (-0.23%) ⬇️
Library 67.21% <5.76%> (-0.35%) ⬇️

@Manonedde
Copy link
Contributor

Here are test data from MS myelo-inferno subjects. Lesion masks are coregistered to session 1: sub-004_ms_test_harmonize_lesion.tar.gz

The results seem coherent but for the newly labelled lesion 160 (parahip lesion, green-yellow colors), for session 4 it is labelled 169 (in red) whereas it is close to lesion 160 (session 2, 3 and 5). Here are the results: Harmonize_labels.tar.gz

image

Harmonize_labels.tar.gz
sub-004_ms_test_harmonize_lesion.tar.gz

@Manonedde
Copy link
Contributor

Manonedde commented Oct 29, 2024

@arnaudbore arnaudbore self-requested a review November 19, 2024 14:07
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