mosamatic2 2.0.7__py3-none-any.whl → 2.0.8__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 mosamatic2 might be problematic. Click here for more details.
- mosamatic2/cli.py +2 -0
- mosamatic2/commands/createdicomsummary.py +61 -0
- mosamatic2/server.py +16 -0
- mosamatic2/ui/resources/VERSION +1 -1
- {mosamatic2-2.0.7.dist-info → mosamatic2-2.0.8.dist-info}/METADATA +1 -1
- {mosamatic2-2.0.7.dist-info → mosamatic2-2.0.8.dist-info}/RECORD +8 -7
- {mosamatic2-2.0.7.dist-info → mosamatic2-2.0.8.dist-info}/WHEEL +0 -0
- {mosamatic2-2.0.7.dist-info → mosamatic2-2.0.8.dist-info}/entry_points.txt +0 -0
mosamatic2/cli.py
CHANGED
|
@@ -6,6 +6,7 @@ from mosamatic2.commands import (
|
|
|
6
6
|
createpngsfromsegmentations,
|
|
7
7
|
dicom2nifti,
|
|
8
8
|
selectslicefromscans,
|
|
9
|
+
createdicomsummary,
|
|
9
10
|
)
|
|
10
11
|
from mosamatic2.core.utils import show_doc_command
|
|
11
12
|
|
|
@@ -33,4 +34,5 @@ main.add_command(segmentmusclefatl3tensorflow.segmentmusclefatl3tensorflow)
|
|
|
33
34
|
main.add_command(createpngsfromsegmentations.createpngsfromsegmentations)
|
|
34
35
|
main.add_command(dicom2nifti.dicom2nifti)
|
|
35
36
|
main.add_command(selectslicefromscans.selectslicefromscans)
|
|
37
|
+
main.add_command(createdicomsummary.createdicomsummary)
|
|
36
38
|
main.add_command(show_doc_command(main)) # Special command to show long description for command
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import click
|
|
2
|
+
|
|
3
|
+
from mosamatic2.core.tasks import CreateDicomSummaryTask
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@click.command(help='Creates a DICOM summary inside a root directory')
|
|
7
|
+
@click.option(
|
|
8
|
+
'--directory',
|
|
9
|
+
required=True,
|
|
10
|
+
type=click.Path(exists=True),
|
|
11
|
+
help='Root directory with DICOM images (can be multiple scans)',
|
|
12
|
+
)
|
|
13
|
+
@click.option(
|
|
14
|
+
'--output',
|
|
15
|
+
required=True,
|
|
16
|
+
type=click.Path(),
|
|
17
|
+
help='Output directory'
|
|
18
|
+
)
|
|
19
|
+
@click.option(
|
|
20
|
+
'--overwrite',
|
|
21
|
+
type=click.BOOL,
|
|
22
|
+
default=False,
|
|
23
|
+
help='Overwrite [true|false]'
|
|
24
|
+
)
|
|
25
|
+
def createdicomsummary(directory, output, overwrite):
|
|
26
|
+
"""
|
|
27
|
+
Creates a DICOM summary inside a root directory. Each patient should have
|
|
28
|
+
its own directory. Inside each patient's directory, there can be multiple
|
|
29
|
+
scans (called series) and multiple DICOM files per scan. The output of this
|
|
30
|
+
command is a file summary.txt (stored in the output directory) that contains
|
|
31
|
+
the following information:
|
|
32
|
+
|
|
33
|
+
- A list of patient directory names with the number of scans inside each
|
|
34
|
+
patient directory
|
|
35
|
+
- For each patient directory and scan directory the following information:
|
|
36
|
+
- Nr. of DICOM images in the scan
|
|
37
|
+
- Modality (e.g., CT or MRI)
|
|
38
|
+
- Image type (e.g., for Dixon scans can be in-phase, opposite-phase,
|
|
39
|
+
water or fat images)
|
|
40
|
+
- Rows/columns (size of the images)
|
|
41
|
+
- Pixel spacing (size of each pixel in mm^2)
|
|
42
|
+
- Slice thickness: (thickness of each image slice)
|
|
43
|
+
|
|
44
|
+
Parameters
|
|
45
|
+
----------
|
|
46
|
+
--directory : str
|
|
47
|
+
Root directory with patient directories, scans and DICOM images
|
|
48
|
+
|
|
49
|
+
--output : str
|
|
50
|
+
Path to output directory
|
|
51
|
+
|
|
52
|
+
--overwrite : bool
|
|
53
|
+
Overwrite contents output directory [true|false]
|
|
54
|
+
"""
|
|
55
|
+
task = CreateDicomSummaryTask(
|
|
56
|
+
inputs={'directory': directory},
|
|
57
|
+
params=None,
|
|
58
|
+
output=output,
|
|
59
|
+
overwrite=overwrite,
|
|
60
|
+
)
|
|
61
|
+
task.run()
|
mosamatic2/server.py
CHANGED
|
@@ -7,6 +7,7 @@ from mosamatic2.core.tasks import CalculateScoresTask
|
|
|
7
7
|
from mosamatic2.core.tasks import CreatePngsFromSegmentationsTask
|
|
8
8
|
from mosamatic2.core.tasks import Dicom2NiftiTask
|
|
9
9
|
from mosamatic2.core.tasks import SelectSliceFromScansTask
|
|
10
|
+
from mosamatic2.core.tasks import CreateDicomSummaryTask
|
|
10
11
|
|
|
11
12
|
app = Flask(__name__)
|
|
12
13
|
|
|
@@ -122,6 +123,21 @@ def run_selectslicefromscans():
|
|
|
122
123
|
return 'PASSED'
|
|
123
124
|
|
|
124
125
|
|
|
126
|
+
@app.route('/createdicomsummary')
|
|
127
|
+
def run_createdicomsummary():
|
|
128
|
+
directory = request.args.get('directory')
|
|
129
|
+
output = request.args.get('output')
|
|
130
|
+
overwrite = request.args.get('overwrite', default=True, type=bool)
|
|
131
|
+
task = CreateDicomSummaryTask(
|
|
132
|
+
inputs={'directory': directory},
|
|
133
|
+
params=None,
|
|
134
|
+
output=output,
|
|
135
|
+
overwrite=overwrite,
|
|
136
|
+
)
|
|
137
|
+
task.run()
|
|
138
|
+
return 'PASSED'
|
|
139
|
+
|
|
140
|
+
|
|
125
141
|
def main():
|
|
126
142
|
parser = argparse.ArgumentParser()
|
|
127
143
|
parser.add_argument('--port', type=int, default=constants.MOSAMATIC2_SERVER_PORT)
|
mosamatic2/ui/resources/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.0.
|
|
1
|
+
2.0.8
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
models.py,sha256=Kx6oWKt7IpTTxrhBDrX61X-ZX12J7yPkJFuhVDsDHoQ,8807
|
|
2
2
|
mosamatic2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
mosamatic2/app.py,sha256=RIUa5tvMYFcmEII4xZPLZZdx9dXWqBvwkxkl_R97Jkw,860
|
|
4
|
-
mosamatic2/cli.py,sha256=
|
|
4
|
+
mosamatic2/cli.py,sha256=kqLdLCZCA7-xxgOOWohsCCrD6Jz3MamslmCl-41R2rA,1371
|
|
5
5
|
mosamatic2/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
mosamatic2/commands/calculatescores.py,sha256=Lb8Q8L2yq7Tt6VBJ6_lltRuldrev_pac6fcgF-xzZyE,1984
|
|
7
|
+
mosamatic2/commands/createdicomsummary.py,sha256=qbVgWGIJPBL8vTBcAxfThloQ_q15OfQy5ohMprzZL4E,1955
|
|
7
8
|
mosamatic2/commands/createpngsfromsegmentations.py,sha256=uUAQJVTqOkBCfENzi21RBNYvf6_nuesx1MeR3j_-7dM,1682
|
|
8
9
|
mosamatic2/commands/dicom2nifti.py,sha256=4hMvglxdOid7p7P_Jc-Tudsf93JRMlYaQsEQctLq2d4,1015
|
|
9
10
|
mosamatic2/commands/rescaledicomimages.py,sha256=25QdCzB5s0sRwkTb3o5zco2bIwy6LttNf7i97kGBDYQ,1280
|
|
@@ -45,14 +46,14 @@ mosamatic2/core/tasks/selectslicefromscanstask/__init__.py,sha256=47DEQpj8HBSa-_
|
|
|
45
46
|
mosamatic2/core/tasks/selectslicefromscanstask/selectslicefromscanstask.py,sha256=1a_QHcIdS4VB39cNEBniaaDzUx3k8DcR0wCtdr8G1d0,4586
|
|
46
47
|
mosamatic2/core/tasks/task.py,sha256=APPnid6dpSGkPuDqU1vm2RIMR5vkpvbP1CPHUMjympg,1691
|
|
47
48
|
mosamatic2/core/utils.py,sha256=zh44FNOWxNKuZ4FcM7VIfMvdlzOr4AA8_PJ1r-6_83k,10855
|
|
48
|
-
mosamatic2/server.py,sha256
|
|
49
|
+
mosamatic2/server.py,sha256=-cZ9BPsZUXoINKqwhCHN8c59mlvzzDXzTVxsYt9au70,4644
|
|
49
50
|
mosamatic2/ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
50
51
|
mosamatic2/ui/mainwindow.py,sha256=nV9RqqSZVoVbU2opJIk7E3n4GvZWtuDETxmzwzmx4mg,13099
|
|
51
52
|
mosamatic2/ui/resources/icons/mosamatic2.icns,sha256=OfhC-diJTIgaNMOezxKKilGsY7mRkaGdU5dGr0MOjIA,2994125
|
|
52
53
|
mosamatic2/ui/resources/icons/mosamatic2.ico,sha256=ySD3RYluHK3pgS0Eas7eKrVk_AskdLQ4qs_IT-wNhq4,12229
|
|
53
54
|
mosamatic2/ui/resources/icons/spinner.gif,sha256=rvaac6GUZauHSPFSOLWr0RmLfjmtZih2Q8knQ2WP3Po,16240
|
|
54
55
|
mosamatic2/ui/resources/images/body-composition.jpg,sha256=KD-BudbXwThB4lJOZZN-ad5-TZRaaZ5cKTH0Ar1TOZs,21227
|
|
55
|
-
mosamatic2/ui/resources/VERSION,sha256=
|
|
56
|
+
mosamatic2/ui/resources/VERSION,sha256=f8DsaK2OdoYvUiYLs5HB9QOzREusf-ClX8iflIy2nY8,8
|
|
56
57
|
mosamatic2/ui/settings.py,sha256=YEVHYJIfNsqMO3v1pjzgh7Pih9GGoUX7S9s8S-sBNUk,2121
|
|
57
58
|
mosamatic2/ui/utils.py,sha256=6bbPIrh4RJ_yhQKNZrgPbL4XeUEogjIjbk_e5c3QS5g,853
|
|
58
59
|
mosamatic2/ui/widgets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -84,7 +85,7 @@ mosamatic2/ui/widgets/panels/visualizations/slicevisualization/slicevisualizatio
|
|
|
84
85
|
mosamatic2/ui/widgets/panels/visualizations/visualization.py,sha256=JvqTJi7cCGYK1-wrN2oURdCOBoPS2clVUyYglhkoVJg,178
|
|
85
86
|
mosamatic2/ui/widgets/splashscreen.py,sha256=MS-OczOWfwwEQNQd-JWe9_Mh57css0cSQgbu973rwQo,4056
|
|
86
87
|
mosamatic2/ui/worker.py,sha256=v7e3gq7MUudgpB1BJW-P7j5wurzu6-HG5m7I6WHgJp0,699
|
|
87
|
-
mosamatic2-2.0.
|
|
88
|
-
mosamatic2-2.0.
|
|
89
|
-
mosamatic2-2.0.
|
|
90
|
-
mosamatic2-2.0.
|
|
88
|
+
mosamatic2-2.0.8.dist-info/entry_points.txt,sha256=MCUpKkgbej1clgp8EqlLQGs0BIKwGPcBPiVWLfGz9Gw,126
|
|
89
|
+
mosamatic2-2.0.8.dist-info/METADATA,sha256=qTtZHQw_rcBOIVlCFKonPY9B2rygwNLf7-IVM8UJJzw,1467
|
|
90
|
+
mosamatic2-2.0.8.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
91
|
+
mosamatic2-2.0.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|