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

Handle Datasets made from BytesIO #265

Merged
merged 4 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and **Merged pull requests**. Critical items to know are:
Referenced versions in headers are tagged on Github, in parentheses are for pypi.

## [vxx](https://github.com/pydicom/deid/tree/master) (master)
- Support pydicom.Dataset objects created from BytesIO [#265](https://github.com/pydicom/deid/pull/265) (0.3.24)
- Exception with missing filters for non-string VR [#256](https://github.com/pydicom/deid/issues/256) (0.3.23)
- Allow filter tag names to be 0x-prefix hex numbers so private tags can be referenced in recipes [#253](https://github.com/pydicom/deid/issues/253) (0.3.22)
- Fix incorrect coordinate definition for GE CT [#249](https://github.com/pydicom/deid/issues/249)
Expand Down
2 changes: 2 additions & 0 deletions deid/dicom/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import os
import re
from copy import deepcopy
from io import BytesIO

from pydicom import read_file
from pydicom.dataelem import DataElement
Expand Down Expand Up @@ -102,6 +103,7 @@ def load(self, dicom_file, force=True):

# Set class variables that might be helpful later
df = self.dicom.get("filename")
df = None if isinstance(df, BytesIO) else df
self.dicom_file = None if not df else os.path.abspath(df)
self.dicom_name = None if not df else os.path.basename(self.dicom_file)

Expand Down
2 changes: 1 addition & 1 deletion deid/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
__copyright__ = "Copyright 2016-2023, Vanessa Sochat"
__license__ = "MIT"

__version__ = "0.3.23"
__version__ = "0.3.24"
AUTHOR = "Vanessa Sochat"
AUTHOR_EMAIL = "[email protected]"
NAME = "deid"
Expand Down
Loading