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

Implement DICOM metadata redaction #174

Merged
merged 9 commits into from
Jan 16, 2024
Merged

Implement DICOM metadata redaction #174

merged 9 commits into from
Jan 16, 2024

Conversation

naglepuff
Copy link
Collaborator

@naglepuff naglepuff commented Dec 5, 2023

Here is the initial set of changes to support redacting DICOM images.

As a start, only metadata redaction is supported and only redaction of single .dcm files is supported.

(TODO before ready for full review/merge):

  • Add functional test
  • Clean up code (prints, misc. comments, etc

@naglepuff naglepuff requested a review from manthey December 11, 2023 23:08
@naglepuff naglepuff marked this pull request as ready for review December 11, 2023 23:08
dicom_dataset: Dataset,
) -> Generator[tuple[DataElement, Dataset], None, None]:
for element in dicom_dataset:
if element.VR == "SQ":
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we use the valuerep.VR.SQ enum rather than "SQ"?

Copy link
Contributor

@manthey manthey left a comment

Choose a reason for hiding this comment

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

I made one recommendation, but this works for me. We can add more rules based on other sample files in a separate PR.

@naglepuff naglepuff merged commit 57253b0 into main Jan 16, 2024
4 checks passed
@naglepuff naglepuff deleted the 160-redact-dicom branch January 16, 2024 15:04
@naglepuff naglepuff linked an issue Mar 11, 2024 that may be closed by this pull request
@naglepuff naglepuff mentioned this pull request Mar 11, 2024
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.

Redact DICOM metadata
2 participants