Skip to content

Commit

Permalink
Fixing DICOM dataset issues (#80)
Browse files Browse the repository at this point in the history
* Fixing DICOM dataset issues

- fix #78
- fix #79

* Update ncreatescu.py to add one more space before comment 

to satisfy the linter

* Update upsdb.py to add one more space before comment

to satisfy the linter

* Update ncreatescu.py to eliminate trailing white space

to satisfy flake8 linter

---------

Co-authored-by: sjswerdloff <[email protected]>
  • Loading branch information
dwikler and sjswerdloff authored Oct 17, 2024
1 parent 665165a commit 6c1ddd0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tdwii_plus_examples/ncreatescu.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def main(args=None):
for fpath in lfiles:
APP_LOGGER.info(f"Sending file: {fpath}")
try:
ds = dcmread(fpath)
ds = dcmread(fpath, force=True) # set force flag to allow raw DICOM files
status = assoc.send_n_create(
ds,
UnifiedProcedureStepPush,
Expand Down
5 changes: 4 additions & 1 deletion tdwii_plus_examples/upsdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,10 @@ def search(model, identifier, session):
for elem in identifier:
kw = elem.keyword
if kw != "QueryRetrieveLevel" and kw not in _ATTRIBUTES:
delattr(identifier, kw)
if elem.tag.element == 0: # deletion by name fails for group length elements
del identifier[elem.tag]
else:
delattr(identifier, kw)

if model in _C_GET or model in _C_MOVE:
# Part 4, C.2.2.1.2: remove required keys from C-GET/C-MOVE
Expand Down

0 comments on commit 6c1ddd0

Please sign in to comment.