Skip to content

Commit

Permalink
Handle Datasets made from BytesIO (#265)
Browse files Browse the repository at this point in the history
* Handle Datasets made from BytesIO
* fix import order
* Update version.py
* Update CHANGELOG.md
  • Loading branch information
barrettMCW authored Sep 5, 2024
1 parent 5a3a8fe commit ebae1c6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
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

0 comments on commit ebae1c6

Please sign in to comment.