Skip to content

Add possibility to clean PyDicom objects#223

Merged
vsoch merged 2 commits intopydicom:masterfrom
RobinFrcd:master
Sep 27, 2022
Merged

Add possibility to clean PyDicom objects#223
vsoch merged 2 commits intopydicom:masterfrom
RobinFrcd:master

Conversation

@RobinFrcd
Copy link
Contributor

@RobinFrcd RobinFrcd commented Sep 27, 2022

Description

The point of this PR is to add the possibility to work on PyDicom objects directly, in order to speed up the process. It indeed avoids reading the dicom file from disk twice.

Extracting the clean_pixel_data function out of the DicomCleaner class also helps when we want to process multiple images in multiple processes without having to instance multiple DicomCleaner times (which is slow because it needs to load the recipe from disk).

Checklist

  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • My code follows the style guidelines of this project

Copy link
Member

@vsoch vsoch left a comment

Choose a reason for hiding this comment

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

I'll need to do a more thorough review after work - I'm open to the idea you've suggested here.

Copy link
Member

@vsoch vsoch left a comment

Choose a reason for hiding this comment

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

Nice work! Let's get tests running. If all is good, the last remaining thing to do is bump the version in deid/version.py, and then write a line in the CHANGELOG.md for it.

@RobinFrcd
Copy link
Contributor Author

@vsoch I think we're good 👍

@vsoch
Copy link
Member

vsoch commented Sep 27, 2022

I do too! I'm in the middle of a work day so likely I'll do one final look, merge and release this evening. Stay tuned!

@vsoch vsoch merged commit b1556a7 into pydicom:master Sep 27, 2022
@vsoch
Copy link
Member

vsoch commented Sep 27, 2022

Snuck it in :) https://pypi.org/project/deid/0.2.34/ Thank you @RobinFrcd !

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