dbdicom 0.3.12__tar.gz → 0.3.13__tar.gz
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-0.3.12/src/dbdicom.egg-info → dbdicom-0.3.13}/PKG-INFO +1 -1
- {dbdicom-0.3.12 → dbdicom-0.3.13}/pyproject.toml +1 -1
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/dataset.py +2 -2
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/dbd.py +1 -3
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/register.py +3 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13/src/dbdicom.egg-info}/PKG-INFO +1 -1
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom.egg-info/SOURCES.txt +1 -0
- dbdicom-0.3.13/tests/test_mt.py +39 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/LICENSE +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/MANIFEST.in +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/README.rst +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/setup.cfg +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/__init__.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/api.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/const.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/database.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/__init__.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/__pycache__/__init__.cpython-311.pyc +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/README.md +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/__init__.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/__pycache__/__init__.cpython-311.pyc +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/bin/__init__.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/bin/__pycache__/__init__.cpython-311.pyc +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/bin/deidentify +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/bin/deidentify.bat +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/bin/emf2sf +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/bin/emf2sf.bat +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/etc/__init__.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/etc/emf2sf/__init__.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/etc/emf2sf/log4j.properties +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/lib/__init__.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/lib/commons-cli-1.4.jar +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/lib/dcm4che-core-5.23.1.jar +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/lib/dcm4che-emf-5.23.1.jar +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/lib/dcm4che-tool-common-5.23.1.jar +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/lib/dcm4che-tool-emf2sf-5.23.1.jar +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/lib/log4j-1.2.17.jar +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/lib/macosx-x86-64/libopencv_java.jnilib +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/lib/slf4j-api-1.7.30.jar +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/lib/slf4j-log4j12-1.7.30.jar +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/lib/windows-x86/clib_jiio.dll +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/lib/windows-x86/clib_jiio_sse2.dll +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/lib/windows-x86/clib_jiio_util.dll +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/lib/windows-x86/opencv_java.dll +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/lib/windows-x86-64/opencv_java.dll +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/sop_classes/ct_image.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/sop_classes/enhanced_mr_image.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/sop_classes/mr_image.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/sop_classes/parametric_map.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/sop_classes/secondary_capture.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/sop_classes/segmentation.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/sop_classes/ultrasound_multiframe_image.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/sop_classes/xray_angiographic_image.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/utils/arrays.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/utils/dcm4che.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/utils/files.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/utils/image.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/utils/pydicom_dataset.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom.egg-info/dependency_links.txt +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom.egg-info/requires.txt +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom.egg-info/top_level.txt +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/tests/test_api.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/tests/test_dcm4che.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/tests/test_sop_classes.py +0 -0
- {dbdicom-0.3.12 → dbdicom-0.3.13}/tests/test_utils.py +0 -0
|
@@ -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/
|
|
@@ -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):
|
|
@@ -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}. "
|
|
@@ -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/
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import shutil
|
|
3
|
+
import numpy as np
|
|
4
|
+
import dbdicom as db
|
|
5
|
+
import vreg
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
tmp = os.path.join(os.getcwd(), 'tests', 'tmp')
|
|
9
|
+
os.makedirs(tmp, exist_ok=True)
|
|
10
|
+
shutil.rmtree(tmp)
|
|
11
|
+
os.makedirs(tmp, exist_ok=True)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def test_write():
|
|
15
|
+
|
|
16
|
+
# Currently works as expected
|
|
17
|
+
values = 100*np.random.rand(256, 256, 16, 2).astype(np.float32)
|
|
18
|
+
dims = ['ScanOptions']
|
|
19
|
+
coords = (['PFP', 'PFP'], )
|
|
20
|
+
vol = vreg.volume(values, dims=dims, coords=coords, orient='coronal')
|
|
21
|
+
series = [tmp, '007', 'dbdicom_test', 'mt1']
|
|
22
|
+
db.write_volume(vol, series)
|
|
23
|
+
|
|
24
|
+
# # Currently does not work
|
|
25
|
+
# values = 100*np.random.rand(256, 256, 16, 2).astype(np.float32)
|
|
26
|
+
# dims = ['ScanOptions']
|
|
27
|
+
# coords = (['PFP', ['PFP', 'MT']], )
|
|
28
|
+
# vol = vreg.volume(values, dims=dims, coords=coords, orient='coronal')
|
|
29
|
+
# series = [tmp, '007', 'dbdicom_test', 'mt2']
|
|
30
|
+
# db.write_volume(vol, series)
|
|
31
|
+
|
|
32
|
+
shutil.rmtree(tmp)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
if __name__ == '__main__':
|
|
36
|
+
|
|
37
|
+
test_write()
|
|
38
|
+
|
|
39
|
+
print('All mt tests have passed!!!')
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/__pycache__/__init__.cpython-311.pyc
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/lib/dcm4che-tool-common-5.23.1.jar
RENAMED
|
File without changes
|
{dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/lib/dcm4che-tool-emf2sf-5.23.1.jar
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/lib/windows-x86/clib_jiio.dll
RENAMED
|
File without changes
|
{dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/lib/windows-x86/clib_jiio_sse2.dll
RENAMED
|
File without changes
|
{dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/lib/windows-x86/clib_jiio_util.dll
RENAMED
|
File without changes
|
{dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/lib/windows-x86/opencv_java.dll
RENAMED
|
File without changes
|
{dbdicom-0.3.12 → dbdicom-0.3.13}/src/dbdicom/external/dcm4che/lib/windows-x86-64/opencv_java.dll
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|