dbdicom 0.2.0__py3-none-any.whl → 0.3.16__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.
- dbdicom/__init__.py +3 -25
- dbdicom/api.py +496 -0
- dbdicom/const.py +144 -0
- dbdicom/database.py +133 -0
- dbdicom/dataset.py +471 -0
- dbdicom/dbd.py +1290 -0
- dbdicom/external/__pycache__/__init__.cpython-311.pyc +0 -0
- dbdicom/external/dcm4che/__pycache__/__init__.cpython-311.pyc +0 -0
- dbdicom/external/dcm4che/bin/__pycache__/__init__.cpython-311.pyc +0 -0
- dbdicom/external/dcm4che/bin/emf2sf +57 -57
- dbdicom/register.py +402 -0
- dbdicom/{ds/types → sop_classes}/ct_image.py +2 -16
- dbdicom/{ds/types → sop_classes}/enhanced_mr_image.py +206 -160
- dbdicom/sop_classes/mr_image.py +338 -0
- dbdicom/sop_classes/parametric_map.py +381 -0
- dbdicom/sop_classes/secondary_capture.py +140 -0
- dbdicom/sop_classes/segmentation.py +311 -0
- dbdicom/{ds/types → sop_classes}/ultrasound_multiframe_image.py +1 -15
- dbdicom/{ds/types → sop_classes}/xray_angiographic_image.py +2 -17
- dbdicom/utils/arrays.py +142 -0
- dbdicom/utils/files.py +0 -20
- dbdicom/utils/image.py +43 -466
- dbdicom/utils/pydicom_dataset.py +386 -0
- dbdicom-0.3.16.dist-info/METADATA +26 -0
- dbdicom-0.3.16.dist-info/RECORD +54 -0
- {dbdicom-0.2.0.dist-info → dbdicom-0.3.16.dist-info}/WHEEL +1 -1
- dbdicom/create.py +0 -450
- dbdicom/ds/__init__.py +0 -10
- dbdicom/ds/create.py +0 -63
- dbdicom/ds/dataset.py +0 -841
- dbdicom/ds/dictionaries.py +0 -620
- dbdicom/ds/types/mr_image.py +0 -267
- dbdicom/ds/types/parametric_map.py +0 -226
- dbdicom/external/__pycache__/__init__.cpython-310.pyc +0 -0
- dbdicom/external/__pycache__/__init__.cpython-37.pyc +0 -0
- dbdicom/external/dcm4che/__pycache__/__init__.cpython-310.pyc +0 -0
- dbdicom/external/dcm4che/__pycache__/__init__.cpython-37.pyc +0 -0
- dbdicom/external/dcm4che/bin/__pycache__/__init__.cpython-310.pyc +0 -0
- dbdicom/external/dcm4che/bin/__pycache__/__init__.cpython-37.pyc +0 -0
- dbdicom/external/dcm4che/lib/linux-x86/libclib_jiio.so +0 -0
- dbdicom/external/dcm4che/lib/linux-x86-64/libclib_jiio.so +0 -0
- dbdicom/external/dcm4che/lib/linux-x86-64/libopencv_java.so +0 -0
- dbdicom/external/dcm4che/lib/solaris-sparc/libclib_jiio.so +0 -0
- dbdicom/external/dcm4che/lib/solaris-sparc/libclib_jiio_vis.so +0 -0
- dbdicom/external/dcm4che/lib/solaris-sparc/libclib_jiio_vis2.so +0 -0
- dbdicom/external/dcm4che/lib/solaris-sparcv9/libclib_jiio.so +0 -0
- dbdicom/external/dcm4che/lib/solaris-sparcv9/libclib_jiio_vis.so +0 -0
- dbdicom/external/dcm4che/lib/solaris-sparcv9/libclib_jiio_vis2.so +0 -0
- dbdicom/external/dcm4che/lib/solaris-x86/libclib_jiio.so +0 -0
- dbdicom/external/dcm4che/lib/solaris-x86-64/libclib_jiio.so +0 -0
- dbdicom/manager.py +0 -2077
- dbdicom/message.py +0 -119
- dbdicom/record.py +0 -1526
- dbdicom/types/database.py +0 -107
- dbdicom/types/instance.py +0 -184
- dbdicom/types/patient.py +0 -40
- dbdicom/types/series.py +0 -816
- dbdicom/types/study.py +0 -58
- dbdicom/utils/variables.py +0 -155
- dbdicom/utils/vreg.py +0 -2626
- dbdicom/wrappers/__init__.py +0 -7
- dbdicom/wrappers/dipy.py +0 -462
- dbdicom/wrappers/elastix.py +0 -855
- dbdicom/wrappers/numpy.py +0 -119
- dbdicom/wrappers/scipy.py +0 -1413
- dbdicom/wrappers/skimage.py +0 -1030
- dbdicom/wrappers/sklearn.py +0 -151
- dbdicom/wrappers/vreg.py +0 -273
- dbdicom-0.2.0.dist-info/METADATA +0 -276
- dbdicom-0.2.0.dist-info/RECORD +0 -81
- {dbdicom-0.2.0.dist-info → dbdicom-0.3.16.dist-info/licenses}/LICENSE +0 -0
- {dbdicom-0.2.0.dist-info → dbdicom-0.3.16.dist-info}/top_level.txt +0 -0
dbdicom/message.py
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
|
|
3
|
-
class StatusBar():
|
|
4
|
-
"""
|
|
5
|
-
Class with the same interface as StatusBar for use outside weasel.
|
|
6
|
-
"""
|
|
7
|
-
|
|
8
|
-
def __init__(self):
|
|
9
|
-
self._message = ''
|
|
10
|
-
self.muted = False # Needs adding in wezel status as well.
|
|
11
|
-
|
|
12
|
-
def mute(self):
|
|
13
|
-
self.muted = True
|
|
14
|
-
def unmute(self):
|
|
15
|
-
self.muted = False
|
|
16
|
-
|
|
17
|
-
def hide(self):
|
|
18
|
-
pass
|
|
19
|
-
|
|
20
|
-
def message(self, message):
|
|
21
|
-
self._message = message
|
|
22
|
-
if not self.muted:
|
|
23
|
-
print(message)
|
|
24
|
-
|
|
25
|
-
def progress(self, value, maximum, message=None):
|
|
26
|
-
if message is not None:
|
|
27
|
-
self._message = message
|
|
28
|
-
if not self.muted:
|
|
29
|
-
perc = str(round(100*value/maximum))
|
|
30
|
-
print(self._message + ' [' + perc + ' %]')
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class Dialog():
|
|
34
|
-
"""Class with the same interface as widgets.Dialog for commandline operation"""
|
|
35
|
-
|
|
36
|
-
def information(self, message="Message in the box", title=""):
|
|
37
|
-
"""
|
|
38
|
-
Information message.
|
|
39
|
-
"""
|
|
40
|
-
print("INFORMATION")
|
|
41
|
-
if title != "": print(title)
|
|
42
|
-
print(message)
|
|
43
|
-
|
|
44
|
-
def warning(self, message="Message in the box", title=""):
|
|
45
|
-
"""
|
|
46
|
-
Warning message.
|
|
47
|
-
"""
|
|
48
|
-
print("WARNING!")
|
|
49
|
-
if title != "": print(title)
|
|
50
|
-
print(message)
|
|
51
|
-
|
|
52
|
-
def error(self, message="Message in the box", title=""):
|
|
53
|
-
"""
|
|
54
|
-
Error message.
|
|
55
|
-
"""
|
|
56
|
-
print("ERROR!")
|
|
57
|
-
if title != "": print(title)
|
|
58
|
-
print(message)
|
|
59
|
-
|
|
60
|
-
def directory(self, message='Please provide a folder', datafolder=None):
|
|
61
|
-
"""
|
|
62
|
-
Select a directory.
|
|
63
|
-
"""
|
|
64
|
-
print(message)
|
|
65
|
-
path = input()
|
|
66
|
-
while not os.path.exists(path):
|
|
67
|
-
reply = self.question(
|
|
68
|
-
title = 'Error!',
|
|
69
|
-
message = path + ' does not exist. Select another?')
|
|
70
|
-
if reply == "Yes":
|
|
71
|
-
print(message)
|
|
72
|
-
path = input()
|
|
73
|
-
elif reply == 'No':
|
|
74
|
-
return None
|
|
75
|
-
return path
|
|
76
|
-
|
|
77
|
-
def question(self, message="Do you wish to proceed?", title="Question", cancel=False):
|
|
78
|
-
"""
|
|
79
|
-
Displays a question window in the User Interface.
|
|
80
|
-
|
|
81
|
-
The user has to click either "OK" or "Cancel" in order to continue using the interface.
|
|
82
|
-
Returns False if reply is "Cancel" and True if reply is "OK".
|
|
83
|
-
"""
|
|
84
|
-
if cancel:
|
|
85
|
-
instructions = "y = yes, n = no, c = cancel"
|
|
86
|
-
options = ['y', 'n', 'c']
|
|
87
|
-
else:
|
|
88
|
-
instructions = "y = yes, n = no, c = cancel"
|
|
89
|
-
options = ['y', 'n']
|
|
90
|
-
print(title)
|
|
91
|
-
print(message)
|
|
92
|
-
print(instructions)
|
|
93
|
-
answer = input()
|
|
94
|
-
while answer not in options:
|
|
95
|
-
print("Sorry, I can't interpret that answer")
|
|
96
|
-
print(message)
|
|
97
|
-
print(instructions)
|
|
98
|
-
answer = input()
|
|
99
|
-
if answer == 'y': return "Yes"
|
|
100
|
-
if answer == 'n': return "No"
|
|
101
|
-
if answer == 'c': return "Cancel"
|
|
102
|
-
|
|
103
|
-
def file_to_open(self, title='Open file..', initial_folder=None, extension="All files (*.*)", datafolder=None):
|
|
104
|
-
"""
|
|
105
|
-
Select a file to read.
|
|
106
|
-
"""
|
|
107
|
-
pass
|
|
108
|
-
|
|
109
|
-
def file_to_save(self, title='Save as ...', directory=None, filter="All files (*.*)", datafolder=None):
|
|
110
|
-
"""
|
|
111
|
-
Select a filename to save.
|
|
112
|
-
"""
|
|
113
|
-
pass
|
|
114
|
-
|
|
115
|
-
def input(self, *fields, title="User input window"):
|
|
116
|
-
"""
|
|
117
|
-
Collect user input of various types.
|
|
118
|
-
"""
|
|
119
|
-
pass
|