dbdicom 0.2.5__py3-none-any.whl → 0.3.0__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.

Files changed (52) hide show
  1. dbdicom/__init__.py +1 -28
  2. dbdicom/api.py +267 -0
  3. dbdicom/const.py +144 -0
  4. dbdicom/dataset.py +752 -0
  5. dbdicom/dbd.py +719 -0
  6. dbdicom/external/__pycache__/__init__.cpython-311.pyc +0 -0
  7. dbdicom/external/dcm4che/__pycache__/__init__.cpython-311.pyc +0 -0
  8. dbdicom/external/dcm4che/bin/__pycache__/__init__.cpython-311.pyc +0 -0
  9. dbdicom/register.py +527 -0
  10. dbdicom/{ds/types → sop_classes}/ct_image.py +2 -16
  11. dbdicom/{ds/types → sop_classes}/enhanced_mr_image.py +153 -26
  12. dbdicom/{ds/types → sop_classes}/mr_image.py +185 -140
  13. dbdicom/sop_classes/parametric_map.py +307 -0
  14. dbdicom/sop_classes/secondary_capture.py +140 -0
  15. dbdicom/sop_classes/segmentation.py +311 -0
  16. dbdicom/{ds/types → sop_classes}/ultrasound_multiframe_image.py +1 -15
  17. dbdicom/{ds/types → sop_classes}/xray_angiographic_image.py +2 -17
  18. dbdicom/utils/arrays.py +36 -0
  19. dbdicom/utils/files.py +0 -20
  20. dbdicom/utils/image.py +10 -629
  21. dbdicom-0.3.0.dist-info/METADATA +28 -0
  22. dbdicom-0.3.0.dist-info/RECORD +53 -0
  23. {dbdicom-0.2.5.dist-info → dbdicom-0.3.0.dist-info}/WHEEL +1 -1
  24. dbdicom/create.py +0 -457
  25. dbdicom/dro.py +0 -174
  26. dbdicom/ds/__init__.py +0 -10
  27. dbdicom/ds/create.py +0 -63
  28. dbdicom/ds/dataset.py +0 -869
  29. dbdicom/ds/dictionaries.py +0 -620
  30. dbdicom/ds/types/parametric_map.py +0 -226
  31. dbdicom/extensions/__init__.py +0 -9
  32. dbdicom/extensions/dipy.py +0 -448
  33. dbdicom/extensions/elastix.py +0 -503
  34. dbdicom/extensions/matplotlib.py +0 -107
  35. dbdicom/extensions/numpy.py +0 -271
  36. dbdicom/extensions/scipy.py +0 -1512
  37. dbdicom/extensions/skimage.py +0 -1030
  38. dbdicom/extensions/sklearn.py +0 -243
  39. dbdicom/extensions/vreg.py +0 -1390
  40. dbdicom/manager.py +0 -2132
  41. dbdicom/message.py +0 -119
  42. dbdicom/pipelines.py +0 -66
  43. dbdicom/record.py +0 -1893
  44. dbdicom/types/database.py +0 -107
  45. dbdicom/types/instance.py +0 -231
  46. dbdicom/types/patient.py +0 -40
  47. dbdicom/types/series.py +0 -2874
  48. dbdicom/types/study.py +0 -58
  49. dbdicom-0.2.5.dist-info/METADATA +0 -71
  50. dbdicom-0.2.5.dist-info/RECORD +0 -66
  51. {dbdicom-0.2.5.dist-info → dbdicom-0.3.0.dist-info/licenses}/LICENSE +0 -0
  52. {dbdicom-0.2.5.dist-info → dbdicom-0.3.0.dist-info}/top_level.txt +0 -0
dbdicom/types/study.py DELETED
@@ -1,58 +0,0 @@
1
- # Importing annotations to handle or sign in import type hints
2
- from __future__ import annotations
3
-
4
- import os
5
- import numpy as np
6
- from dbdicom.record import Record
7
-
8
- class Study(Record):
9
-
10
- name = 'StudyInstanceUID'
11
-
12
- def remove(self):
13
- self.manager.delete_studies([self.uid])
14
-
15
- def new_series(self, **kwargs):
16
- attr = {**kwargs, **self.attributes}
17
- uid, key = self.manager.new_series(parent=self.uid, key=self.key(), **attr)
18
- return self.record('Series', uid, key, **attr)
19
-
20
- def parent(self):
21
- #uid = self.manager.register.at[self.key(), 'PatientID']
22
- key = self.key()
23
- uid = self.manager._at(key, 'PatientID')
24
- return self.record('Patient', uid, key=key)
25
-
26
- def children(self, **kwargs):
27
- return self.series(**kwargs)
28
-
29
- def new_child(self, dataset=None, **kwargs):
30
- attr = {**kwargs, **self.attributes}
31
- return self.new_series(**attr)
32
-
33
- def new_sibling(self, suffix=None, **kwargs):
34
- if suffix is not None:
35
- desc = self.manager._at(self.key(), 'StudyDescription')
36
- kwargs['StudyDescription'] = desc + ' [' + suffix + ']'
37
- return self.parent().new_child(**kwargs)
38
-
39
- def _copy_from(self, record, **kwargs):
40
- attr = {**kwargs, **self.attributes}
41
- uids = self.manager.copy_to_study(record.uid, self.uid, **attr)
42
- if isinstance(uids, list):
43
- return [self.record('Series', uid, **attr) for uid in uids]
44
- else:
45
- return self.record('Series', uids, **attr)
46
-
47
- def zeros(*args, **kwargs): # OBSOLETE - remove
48
- return zeros(*args, **kwargs)
49
-
50
-
51
- def zeros(study, shape, dtype='mri'): # OBSOLETE - remove
52
- series = study.new_series()
53
- array = np.zeros(shape, dtype=np.float32)
54
- if dtype not in ['mri', 'MRImage']:
55
- message = 'dbdicom can only create images of type MRImage at this stage'
56
- raise ValueError(message)
57
- series.set_pixel_array(array)
58
- return series
@@ -1,71 +0,0 @@
1
- Metadata-Version: 2.2
2
- Name: dbdicom
3
- Version: 0.2.5
4
- Summary: A pythonic interface for reading and writing DICOM databases
5
- Author-email: Steven Sourbron <s.sourbron@sheffield.ac.uk>, Ebony Gunwhy <e.gunwhy@sheffield.ac.uk>
6
- Project-URL: Homepage, https://qib-sheffield.github.io/dbdicom/
7
- Keywords: python,medical imaging,DICOM
8
- Classifier: Development Status :: 3 - Alpha
9
- Classifier: Intended Audience :: Developers
10
- Classifier: Intended Audience :: Science/Research
11
- Classifier: Topic :: Scientific/Engineering
12
- Classifier: Environment :: Console
13
- Classifier: Operating System :: OS Independent
14
- Classifier: License :: OSI Approved :: Apache Software License
15
- Classifier: Programming Language :: Python
16
- Classifier: Programming Language :: Python :: 3
17
- Requires-Python: >=3.6
18
- Description-Content-Type: text/markdown
19
- License-File: LICENSE
20
- Requires-Dist: matplotlib
21
- Requires-Dist: nibabel
22
- Requires-Dist: numpy
23
- Requires-Dist: pandas
24
- Requires-Dist: pydicom
25
- Requires-Dist: python-gdcm
26
- Requires-Dist: pylibjpeg-libjpeg
27
- Requires-Dist: importlib-resources
28
- Requires-Dist: scipy
29
- Requires-Dist: imageio
30
- Requires-Dist: vreg
31
- Provides-Extra: extensions
32
- Requires-Dist: scikit-image; extra == "extensions"
33
- Requires-Dist: itk-elastix; extra == "extensions"
34
- Requires-Dist: dipy; extra == "extensions"
35
- Requires-Dist: scikit-learn; extra == "extensions"
36
-
37
- `dbdicom` is a Pythonic interface for reading and writing DICOM databases.
38
-
39
- # Installation
40
-
41
- `pip install dbdicom`
42
-
43
- # Documentation
44
-
45
- For more detail, see the current [dbdicom documentation](https://qib-sheffield.github.io/dbdicom/).
46
-
47
- # Ambition
48
-
49
- The DICOM format is the universally recognised standard for medical imaging,
50
- but working with DICOM data remains a challenging task for data scientists.
51
-
52
- ``dbdicom`` aims to provide an intuitive programming interface for reading and
53
- writing DICOM databases - replacing unfamiliar DICOM-native concepts by
54
- pythonic language and syntax.
55
-
56
- # Disclaimer
57
-
58
- `dbdicom` is developed in public and currently trialled in ongoing
59
- multi-centre clinical studies
60
- [iBEAt](https://bmcnephrol.biomedcentral.com/articles/10.1186/s12882-020-01901-x>)
61
- and [AFiRM](https://www.uhdb.nhs.uk/afirm-study/). However, ``dbdicom`` is
62
- work in progress and **not yet sufficiently stable for wider use**. Current
63
- dissemination activities, such as on the
64
- [ISMRM (Toronto 2023)](https://www.ismrm.org/23m/), are limited in scope and
65
- intended to get early feedback from the community.
66
-
67
-
68
-
69
-
70
-
71
-
@@ -1,66 +0,0 @@
1
- dbdicom/__init__.py,sha256=rXC7OyQufyuAHqkUxxnw-LaQSw_Z1pZu86QNvj5wtrI,503
2
- dbdicom/create.py,sha256=v_hLU-5OtJn38FSUDw7d6B0bCIg1LQB49449aG6Jrhs,16518
3
- dbdicom/dro.py,sha256=onVacXzCqFj6MdKOAAIB8jE-AVcrdbrJHE60sihAuzY,8138
4
- dbdicom/manager.py,sha256=dn09ieznzTThhvcSBsLLwW5kAS6iWRTau-fhSlXyWhQ,83685
5
- dbdicom/message.py,sha256=kHcb-WuK_SzIqX76X55YIqSbTn3OdFC052qDkaKfIC8,3581
6
- dbdicom/pipelines.py,sha256=keBsBEjEipfu9reh3ExhHT2sgRksbL5MuRDHF4OywEI,2280
7
- dbdicom/record.py,sha256=p5WH1f5Bearn5ZHdCT9h11BUfo5O9GuSz1Dk8gH4BLM,66387
8
- dbdicom/ds/__init__.py,sha256=gX_ui37gPc_A9h0ZsBYj1-Uh7QdlmtBGrbcbXuOM8Bk,459
9
- dbdicom/ds/create.py,sha256=_np1bXXH6lfls6JSrPPbgy8X8q6QOj5s83tYUIAaEUk,2132
10
- dbdicom/ds/dataset.py,sha256=T4SeXSz6aPgK9T7kmk8IN1hvuKfSQ-E-_CrhcXKaQ4E,29347
11
- dbdicom/ds/dictionaries.py,sha256=g_9EB5jXBmzxp0GFhYC6lQ-tKwxje03ukV5EAH3E_l0,23717
12
- dbdicom/ds/types/ct_image.py,sha256=2TvEl267TnIkkuJQzPLh9STeSJxKt_ZQi4SEBYmQuiI,3189
13
- dbdicom/ds/types/enhanced_mr_image.py,sha256=lTvLhMpCiDauAov_IW5epCFKKRhgLfy2d0oC2uab0wc,31336
14
- dbdicom/ds/types/mr_image.py,sha256=Eaz_jma1VQ2sh0RBWUnQX-8AgPst859e9LFhvv9Rnzw,9769
15
- dbdicom/ds/types/parametric_map.py,sha256=hc5ms5SarLu3ocitK4aM4dW38rbUxDWVRExFeFmZsVY,11699
16
- dbdicom/ds/types/ultrasound_multiframe_image.py,sha256=9x2G4pRFYXSoxnaAMLF8okusSkWsSzCdGr5jltxD0Wc,3213
17
- dbdicom/ds/types/xray_angiographic_image.py,sha256=KhDDVVsZ3himE1P6qFdi401rYcbWCyGZx7inqg-v8oc,3676
18
- dbdicom/extensions/__init__.py,sha256=ag6Qs2g3g9VHYF1WKsGxMpv_HgbqjfPn_UzjoEaKG-0,115
19
- dbdicom/extensions/dipy.py,sha256=CrSjU14JwNpMP7AIH-CR3wkoQB19MYbS4efOEVczurQ,16806
20
- dbdicom/extensions/elastix.py,sha256=0gNgiC0RAEjLBhovgRtaLy31xxUy6rJWoapm_3tMCQ8,22522
21
- dbdicom/extensions/matplotlib.py,sha256=k9KK-mZW8TpW37PgoFre3yb4ffRCRrPVeQKEGZnQoXw,4218
22
- dbdicom/extensions/numpy.py,sha256=13PPKj-GCAstSb7uQ8_XAZ2borYkDVKhqcAs7KVA6pc,10542
23
- dbdicom/extensions/scipy.py,sha256=xQ3H3puoE9kF1qG5Pvl6gaQD4TdL6-f3V8Cz7z1_L0A,52884
24
- dbdicom/extensions/skimage.py,sha256=hP2get4UTpu0ZSlbAvQmwaKRvGupHLn39L0BctgzZ-0,38563
25
- dbdicom/extensions/sklearn.py,sha256=KxxAlzh8ZI7YBkLS529k9VaAObCCVZT8exvEQThcYCY,9351
26
- dbdicom/extensions/vreg.py,sha256=PbCqTRsLKmbksRYsM_piBrcJL2XV89_jenw85Ozjzwk,67522
27
- dbdicom/external/__init__.py,sha256=XNQqfspyf6vFGedXlRKZsUB8k8E-0W19Uamwn8Aioxo,316
28
- dbdicom/external/dcm4che/README.md,sha256=0aAGRs36W3_0s5LzWHRGf_tqariS_JP4iJggaxnD4Xw,8987
29
- dbdicom/external/dcm4che/__init__.py,sha256=YwpeMCLrxffGOkchsGjgAuB6ia3VX_tx9Y7ru9EWtoY,35
30
- dbdicom/external/dcm4che/bin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
- dbdicom/external/dcm4che/bin/deidentify,sha256=64MNIEpp-CWzFSb6TV0KtyCBvD7XyEsovRjBeyxDqSc,1698
32
- dbdicom/external/dcm4che/bin/deidentify.bat,sha256=kVXUkcy1C4Y3KjC2NJwmmR0pufSJWmaof_LR5CTAxMg,1455
33
- dbdicom/external/dcm4che/bin/emf2sf,sha256=svCzkZ-QhdVTV0NNHOpBiwNBMODVWZHJIFA7cWaN2bM,1622
34
- dbdicom/external/dcm4che/bin/emf2sf.bat,sha256=Vh0ry9KNJX_WXcyCrLSxbJ_6Crot9rjmwi__u2GZqLY,1375
35
- dbdicom/external/dcm4che/etc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
- dbdicom/external/dcm4che/etc/emf2sf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
- dbdicom/external/dcm4che/etc/emf2sf/log4j.properties,sha256=3hHcBFt2oNRjvHtix5bfuEsnKfdv5IYOkbsyoY9g7cM,223
38
- dbdicom/external/dcm4che/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
- dbdicom/external/dcm4che/lib/commons-cli-1.4.jar,sha256=_Tx8lUWpzbIFHR-RVcT3ax5KxaVzBEBKbu21eP-6cyg,53820
40
- dbdicom/external/dcm4che/lib/dcm4che-core-5.23.1.jar,sha256=UEnSQwDE1IHv5kGtK8vkdaQ9OF_cNwOsxB5NSIMkS2s,506505
41
- dbdicom/external/dcm4che/lib/dcm4che-emf-5.23.1.jar,sha256=fcspodANPlRz-3EIx3TEZWU45JDP4RXzLuWbFoQEPMY,13418
42
- dbdicom/external/dcm4che/lib/dcm4che-tool-common-5.23.1.jar,sha256=3SN3NSTf4AIHuUCsk_5E2wXd3MuFvQZIYSSq1PHcgNM,21301
43
- dbdicom/external/dcm4che/lib/dcm4che-tool-emf2sf-5.23.1.jar,sha256=pkpJRD00HQ4sEjaL7_iQ_8lBeQPttHelNAxcT-rMIVQ,7332
44
- dbdicom/external/dcm4che/lib/log4j-1.2.17.jar,sha256=HTFpZEVpdyBScJF1Q2kIKmZRvUl4G2AF3rlOVnU0Bvk,489884
45
- dbdicom/external/dcm4che/lib/slf4j-api-1.7.30.jar,sha256=zboHlk0btAoHYUhcax6ML4_Z6x0ZxTkorA1_lRAQXFc,41472
46
- dbdicom/external/dcm4che/lib/slf4j-log4j12-1.7.30.jar,sha256=TUHgHEDK-KbHSt0rBzBV2KTOHDDlgVQXexPxLXirvns,12211
47
- dbdicom/external/dcm4che/lib/macosx-x86-64/libopencv_java.jnilib,sha256=A2uOWIUQX3KcG850ElpW4lVtn2uyPpJHZq9cPlpJjMY,15137664
48
- dbdicom/external/dcm4che/lib/windows-x86/clib_jiio.dll,sha256=C2dAjNyefOm3POrUxorEF6T-FTztpo0nfGAsUrDyQyg,720896
49
- dbdicom/external/dcm4che/lib/windows-x86/clib_jiio_sse2.dll,sha256=uD9GLN_hPf9mM9APzlp9j6770awKP6xnlaooMrxHpkg,1089536
50
- dbdicom/external/dcm4che/lib/windows-x86/clib_jiio_util.dll,sha256=wi4yyrI1gTRo_bBpj0E097BQBiHZd8IqVifKr6kfkRE,40960
51
- dbdicom/external/dcm4che/lib/windows-x86/opencv_java.dll,sha256=QanyzLy0Cd79-aOVPwOcXwikUYeutne0Au-Um91_B4M,8505856
52
- dbdicom/external/dcm4che/lib/windows-x86-64/opencv_java.dll,sha256=TmjW2SbG4MR3GQ95T8xCVVDLgsdKukgaHBPUvWkfXp8,11039232
53
- dbdicom/types/database.py,sha256=Ur-VE6Uixw4nV6QUY8fnMSUgDvvk54KhiUvbmS3bGuE,3066
54
- dbdicom/types/instance.py,sha256=_j38VQqjaJITQX98WyqBqGXvYcpzRP8TRmpZ7wwu5-E,7655
55
- dbdicom/types/patient.py,sha256=YtBTwJDo8EiquJ2vLcyBW7Pzz7EISKhzvxq2506QSNo,1312
56
- dbdicom/types/series.py,sha256=-GIMoGzgW-SWLZ9VexcB2TjB9pzi953YuzZCBwF1-KI,111898
57
- dbdicom/types/study.py,sha256=iX6gjA905DBvmTEwxSuppp_E7XXkTHvN3ezAnu362Es,2031
58
- dbdicom/utils/dcm4che.py,sha256=Vxq8NYWWK3BuqJkzhBQ89oMqzJlnxqTxgsgTo_Frznc,2317
59
- dbdicom/utils/files.py,sha256=HkAr03EmpcLkfcr6cS13_g-vqbE1acRYmTJP3e5zNas,2844
60
- dbdicom/utils/image.py,sha256=IPTD-4adMy5rf5rgSwfR6ImuBZojMfnp4-zKeuG9zik,26385
61
- dbdicom/utils/variables.py,sha256=vUh5cDnmCft5hoXDYXUvfkg5Cy5WlgMAogU38Y_BKRo,5753
62
- dbdicom-0.2.5.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
63
- dbdicom-0.2.5.dist-info/METADATA,sha256=T932J-bTV2jel3CLEtweTqxtbv3pFErbb8s6UuMVVgA,2509
64
- dbdicom-0.2.5.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
65
- dbdicom-0.2.5.dist-info/top_level.txt,sha256=nJWxXg4YjD6QblfmhrzTMXcr8FSKNc0Yk-CAIDUsYkQ,8
66
- dbdicom-0.2.5.dist-info/RECORD,,