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

Add configuration for DESPIAD project #572

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from
Draft

Conversation

p-j-smith
Copy link
Contributor

@p-j-smith p-j-smith commented Dec 12, 2024

Description

Closes #571
Closes #530

  • add project config for DESPIAD
  • add tag operation files for CT and PET
  • use base, CT, then PET tag operation files for anonymisation
  • ensure all resources sharing a StudyInstanceUID in Orthanc Raw are exported (they may exist as separate resources in Orthanc Raw if they have different StudyIDs, but are combined into a single resource in Orthanc Anon as the StudyID tag is deleted) This has already been fixed in Improve anon logging and anonymise all matching studies at once #582

Type of change

Please delete options accordingly to the description.

  • 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

Suggested Checklist

  • I have performed a self-review of my own code.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have passed on my local host device. (see further details at the CONTRIBUTING document)
  • Make sure your branch is up-to-date with main branch. See CONTRIBUTING for a general example to syncronise your branch with the main branch.
  • I have requested review to this PR.
  • I have addressed and marked as resolved all the review comments in my PR.
  • Finally, I have selected squash and merge

this is because resources sharing the same StudyInstanceUID in Orthanc Raw will be combined into a single resource in Orthanc Anon.
Previously, we would try to export each resource after anonymisation, but this meant other resources sharing the same StudyInstanceUID were not exported.
Copy link

codecov bot commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 77.77778% with 6 lines in your changes missing coverage. Please review.

Project coverage is 78.76%. Comparing base (ae4df7a) to head (4cd4c7e).

Files with missing lines Patch % Lines
pixl_dcmd/src/pixl_dcmd/main.py 64.28% 5 Missing ⚠️
..._core/src/core/project_config/pixl_config_model.py 92.30% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (ae4df7a) and HEAD (4cd4c7e). Click for more details.

HEAD has 4 uploads less than BASE
Flag BASE (ae4df7a) HEAD (4cd4c7e)
8 4
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #572      +/-   ##
==========================================
- Coverage   87.28%   78.76%   -8.53%     
==========================================
  Files          76       59      -17     
  Lines        3390     2802     -588     
==========================================
- Hits         2959     2207     -752     
- Misses        431      595     +164     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

project:
name: "despiad"
modalities:
- "CT"
Copy link
Contributor

Choose a reason for hiding this comment

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

with CT AFAIK there's some extra fun parts which have burned in data. I think to avoid this we may want to have:

  • Minimum instances in a series. At the project level can configure minimum instances in series so that we can filter out a single screenshot that may well still have the CT modality
  • Series filter at a manufacturer level in the project conifg. This is because certain series numbers can always have burned in data - Worth asking John Watts about an example of this
  • Related, but to have an allowed manufacturer regex list in the config. So that you filter out manufacturers which you don't know you can handle - in case there's more burned in data

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh fun! Yeah they sound like good ideas. Have you ever used something like deid or presidio to remove burned in data?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've add these three new options to the project config. The only one I'm not sure about is the series number filter at the manufacturer level. Currently, I've added it at the project level, but do you mean we should be able to specify that the filter is only applied to DICOM from a specified manufacturer? Would something like this make sense:

manufacturer_filters:
  - <manufacturer>:
    - series_number: [<series number(s) to filter>]

Copy link
Contributor

Choose a reason for hiding this comment

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

oh fun! Yeah they sound like good ideas. Have you ever used something like deid or presidio to remove burned in data?

oh whoops I missed this. Nah haven't tried using them but that could be useful for areas that we know we want to redact specifically. Would be concerned about running them wholesale on all images

Copy link
Contributor

@stefpiatek stefpiatek Jan 9, 2025

Choose a reason for hiding this comment

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

Yeah I think have the allowed manufacturers in the filter perhaps. so like this maybe?

manufacturer_filters:
  - regex: ^siemens # defaults to blank, so all manufacturers would be skipped.
    exclude_series_numbers: [<series number(s) to filter>] # defaults to empty list
  - regex: ^philips
    exclude_series_numbers: [<series number(s) to filter>]

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.

Add config for DESPIAD PIXL pipeline for CT data
2 participants