dbdicom 0.3.12__py3-none-any.whl → 0.3.13__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dbdicom might be problematic. Click here for more details.
- dbdicom/dataset.py +2 -2
- dbdicom/dbd.py +1 -3
- dbdicom/register.py +3 -0
- {dbdicom-0.3.12.dist-info → dbdicom-0.3.13.dist-info}/METADATA +1 -1
- {dbdicom-0.3.12.dist-info → dbdicom-0.3.13.dist-info}/RECORD +8 -8
- {dbdicom-0.3.12.dist-info → dbdicom-0.3.13.dist-info}/WHEEL +0 -0
- {dbdicom-0.3.12.dist-info → dbdicom-0.3.13.dist-info}/licenses/LICENSE +0 -0
- {dbdicom-0.3.12.dist-info → dbdicom-0.3.13.dist-info}/top_level.txt +0 -0
dbdicom/dataset.py
CHANGED
|
@@ -85,8 +85,8 @@ def write(ds, file, status=None):
|
|
|
85
85
|
dir = os.path.dirname(file)
|
|
86
86
|
if not os.path.exists(dir):
|
|
87
87
|
os.makedirs(dir)
|
|
88
|
-
ds.save_as(file, write_like_original=False) # deprecated
|
|
89
|
-
|
|
88
|
+
# ds.save_as(file, write_like_original=False) # deprecated
|
|
89
|
+
pydicom.dcmwrite(file, ds, enforce_file_format=True)
|
|
90
90
|
|
|
91
91
|
|
|
92
92
|
def codify(source_file, save_file, **kwargs):
|
dbdicom/dbd.py
CHANGED
|
@@ -70,8 +70,6 @@ class DataBaseDicom():
|
|
|
70
70
|
# self._split_series()
|
|
71
71
|
return self
|
|
72
72
|
|
|
73
|
-
|
|
74
|
-
|
|
75
73
|
def delete(self, entity, not_exists_ok=False):
|
|
76
74
|
"""Delete a DICOM entity from the database
|
|
77
75
|
|
|
@@ -729,7 +727,7 @@ class DataBaseDicom():
|
|
|
729
727
|
else:
|
|
730
728
|
to_entity[-1] = (to_entity[-1] + '_copy', 0)
|
|
731
729
|
while to_entity in self.series():
|
|
732
|
-
to_entity[-1][1]
|
|
730
|
+
to_entity[-1] = (to_entity[-1][0], to_entity[-1][1] + 1)
|
|
733
731
|
if len(to_entity) != 4:
|
|
734
732
|
raise ValueError(
|
|
735
733
|
f"Cannot copy series {from_entity} to series {to_entity}. "
|
dbdicom/register.py
CHANGED
|
@@ -79,6 +79,7 @@ def index(dbtree, entity):
|
|
|
79
79
|
for sr in sorted(st['series'], key=lambda sr: sr['SeriesNumber']):
|
|
80
80
|
idx += list(sr['instances'].values())
|
|
81
81
|
return idx
|
|
82
|
+
raise ValueError(f'Patient {patient_id} not found')
|
|
82
83
|
elif len(entity)==3:
|
|
83
84
|
study_uid = uid(dbtree, entity)
|
|
84
85
|
idx = []
|
|
@@ -88,6 +89,7 @@ def index(dbtree, entity):
|
|
|
88
89
|
for sr in sorted(st['series'], key=lambda sr: sr['SeriesNumber']):
|
|
89
90
|
idx += list(sr['instances'].values())
|
|
90
91
|
return idx
|
|
92
|
+
raise ValueError(f'Study {study_uid} not found')
|
|
91
93
|
elif len(entity)==4:
|
|
92
94
|
series_uid = uid(dbtree, entity)
|
|
93
95
|
for pt in sorted(dbtree, key=lambda pt: pt['PatientID']):
|
|
@@ -95,6 +97,7 @@ def index(dbtree, entity):
|
|
|
95
97
|
for sr in sorted(st['series'], key=lambda sr: sr['SeriesNumber']):
|
|
96
98
|
if sr['SeriesInstanceUID'] == series_uid:
|
|
97
99
|
return list(sr['instances'].values())
|
|
100
|
+
raise ValueError(f'Series {series_uid} not found')
|
|
98
101
|
|
|
99
102
|
def remove(dbtree, entity):
|
|
100
103
|
if len(entity)==2:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dbdicom
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.13
|
|
4
4
|
Summary: A pythonic interface for reading and writing DICOM databases
|
|
5
5
|
Author-email: Steven Sourbron <s.sourbron@sheffield.ac.uk>, Ebony Gunwhy <e.gunwhy@sheffield.ac.uk>
|
|
6
6
|
Project-URL: Homepage, https://openmiblab.github.io/dbdicom/
|
|
@@ -2,9 +2,9 @@ dbdicom/__init__.py,sha256=dW5aezonmMc_41Dp1PuYmXQlr307RkyJxsJuetkpWso,87
|
|
|
2
2
|
dbdicom/api.py,sha256=CeEhKgwZiCSm-eIwyiJgPdyQGGpuLCTuR7B19dvo6Zs,15713
|
|
3
3
|
dbdicom/const.py,sha256=BqBiRRjeiSqDr1W6YvaayD8WKCjG4Cny2NT0GeLM6bI,4269
|
|
4
4
|
dbdicom/database.py,sha256=mkYQAAf9fETzUhSQflQFp7RQUBdPlSlDty9nn6KY1jQ,4771
|
|
5
|
-
dbdicom/dataset.py,sha256=
|
|
6
|
-
dbdicom/dbd.py,sha256=
|
|
7
|
-
dbdicom/register.py,sha256=
|
|
5
|
+
dbdicom/dataset.py,sha256=cZFiZr-EySFwFHzchZkDzcKF8ooC5qOa0Dmlwkt1CCA,14876
|
|
6
|
+
dbdicom/dbd.py,sha256=iEw1phzkQHhDpXG9hdpyy91z691HVCMimmmvbrppB9M,45846
|
|
7
|
+
dbdicom/register.py,sha256=pnfFgD-Mki4A7MCoYX6_hBRh3ZNRW5yXILeZRr4lZuc,15123
|
|
8
8
|
dbdicom/external/__init__.py,sha256=XNQqfspyf6vFGedXlRKZsUB8k8E-0W19Uamwn8Aioxo,316
|
|
9
9
|
dbdicom/external/__pycache__/__init__.cpython-311.pyc,sha256=pXAQ35ixd92fm6YcuHgzR1t6RcASQ-cHhU1wOA5b8sw,542
|
|
10
10
|
dbdicom/external/dcm4che/README.md,sha256=0aAGRs36W3_0s5LzWHRGf_tqariS_JP4iJggaxnD4Xw,8987
|
|
@@ -47,8 +47,8 @@ dbdicom/utils/dcm4che.py,sha256=Vxq8NYWWK3BuqJkzhBQ89oMqzJlnxqTxgsgTo_Frznc,2317
|
|
|
47
47
|
dbdicom/utils/files.py,sha256=qhWNJqeWnRjDNbERpC6Mz962_TW9mFdvd2lnBbK3xt4,2259
|
|
48
48
|
dbdicom/utils/image.py,sha256=zRM1O0bxPp-qpf3Iv_GRS1omKaMN1SgSkAwufWLJ0Fk,3863
|
|
49
49
|
dbdicom/utils/pydicom_dataset.py,sha256=XM3EERsCWPlEaUzVaFQSbPNiNbEGwxIbf-sUKKf_YxA,12755
|
|
50
|
-
dbdicom-0.3.
|
|
51
|
-
dbdicom-0.3.
|
|
52
|
-
dbdicom-0.3.
|
|
53
|
-
dbdicom-0.3.
|
|
54
|
-
dbdicom-0.3.
|
|
50
|
+
dbdicom-0.3.13.dist-info/licenses/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
|
51
|
+
dbdicom-0.3.13.dist-info/METADATA,sha256=kn-mtLWEdakDT6hvBka_YNJNyBxFzKJxyP73_xg5gpg,1031
|
|
52
|
+
dbdicom-0.3.13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
53
|
+
dbdicom-0.3.13.dist-info/top_level.txt,sha256=nJWxXg4YjD6QblfmhrzTMXcr8FSKNc0Yk-CAIDUsYkQ,8
|
|
54
|
+
dbdicom-0.3.13.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|