mosamatic2 2.0.9__py3-none-any.whl → 2.0.10__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 CHANGED
@@ -7,6 +7,7 @@ from mosamatic2.commands import (
7
7
  dicom2nifti,
8
8
  selectslicefromscans,
9
9
  createdicomsummary,
10
+ defaultpipeline,
10
11
  )
11
12
  from mosamatic2.core.utils import show_doc_command
12
13
 
@@ -35,4 +36,5 @@ main.add_command(createpngsfromsegmentations.createpngsfromsegmentations)
35
36
  main.add_command(dicom2nifti.dicom2nifti)
36
37
  main.add_command(selectslicefromscans.selectslicefromscans)
37
38
  main.add_command(createdicomsummary.createdicomsummary)
39
+ main.add_command(defaultpipeline.defaultpipeline)
38
40
  main.add_command(show_doc_command(main)) # Special command to show long description for command
@@ -0,0 +1,70 @@
1
+ import click
2
+
3
+ from mosamatic2.core.pipelines import DefaultPipeline
4
+
5
+
6
+ @click.command(help='Runs default L3 analysis pipeline')
7
+ @click.option(
8
+ '--images',
9
+ required=True,
10
+ type=click.Path(exists=True),
11
+ help='Directory with L3 images',
12
+ )
13
+ @click.option(
14
+ '--model_files',
15
+ required=True,
16
+ type=click.Path(),
17
+ help='Input directory with AI model files'
18
+ )
19
+ @click.option(
20
+ '--output',
21
+ required=True,
22
+ type=click.Path(),
23
+ help='Output directory'
24
+ )
25
+ @click.option(
26
+ '--overwrite',
27
+ type=click.BOOL,
28
+ default=False,
29
+ help='Overwrite [true|false]'
30
+ )
31
+ def defaultpipeline(images, model_files, output, overwrite):
32
+ """
33
+ Runs default L3 analysis pipeline
34
+
35
+ Parameters
36
+ ----------
37
+ --images : str
38
+ Directory with L3 images
39
+
40
+ --model_files : str
41
+ Directory with AI model files. This directory can ONLY contain the following
42
+ files:
43
+
44
+ (1) contour_model-1.0.zip
45
+ (2) model-1.0.zip
46
+ (3) params-1.0.json
47
+
48
+ These files can be downloaded from:
49
+ https://mosamatic.rbeesoft.nl/wordpress/mosamatic/installation/
50
+
51
+ --output : str
52
+ Path to output directory
53
+
54
+ --overwrite : bool
55
+ Overwrite contents output directory [true|false]
56
+ """
57
+ pipeline = DefaultPipeline(
58
+ inputs={'images': images, 'model_files': model_files},
59
+ params={
60
+ 'target_size': 512,
61
+ 'model_type': 'tensorflow',
62
+ 'model_version': 1.0,
63
+ 'file_type': 'npy',
64
+ 'fig_width': 10,
65
+ 'fig_height': 10,
66
+ },
67
+ output=output,
68
+ overwrite=overwrite,
69
+ )
70
+ pipeline.run()
@@ -97,7 +97,12 @@ class SelectSliceFromScansTask(Task):
97
97
  for step in range(nr_steps):
98
98
  scan_dir = scan_dirs[step]
99
99
  scan_name = os.path.split(scan_dir)[1]
100
- self.extract_masks(scan_dir)
100
+ try:
101
+ self.extract_masks(scan_dir)
102
+ except Exception as e:
103
+ LOG.warning(f'Could not extract masks from {scan_dir} [{str(e)}]')
104
+ self.set_progress(step, nr_steps)
105
+ continue
101
106
  file_path = self.find_slice(scan_dir, vertebra)
102
107
  if file_path is not None:
103
108
  extension = '' if file_path.endswith('.dcm') else '.dcm'
@@ -1 +1 @@
1
- 2.0.9
1
+ 2.0.10
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: mosamatic2
3
- Version: 2.0.9
3
+ Version: 2.0.10
4
4
  Summary:
5
5
  Author: Ralph Brecheisen
6
6
  Author-email: r.brecheisen@maastrichtuniversity.nl
@@ -29,8 +29,8 @@ Requires-Dist: tensorflow-intel (==2.15.0) ; platform_system == "Windows"
29
29
  Requires-Dist: tensorflow-io-gcs-filesystem (==0.31.0) ; platform_system == "Windows"
30
30
  Requires-Dist: tensorflow-io-gcs-filesystem (>=0.31.0) ; platform_system == "Darwin" and platform_machine == "arm64"
31
31
  Requires-Dist: tensorflow-macos (==2.15.0) ; platform_system == "Darwin" and platform_machine == "arm64"
32
- Requires-Dist: torch (>=2.8.0)
33
- Requires-Dist: torchvision (>=0.23.0)
32
+ Requires-Dist: torch (==2.5.1)
33
+ Requires-Dist: torchvision (>=0.20.1)
34
34
  Requires-Dist: totalsegmentator (>=2.11.0)
35
35
  Requires-Dist: vtk (>=9.5.1)
36
36
  Description-Content-Type: text/markdown
@@ -1,11 +1,12 @@
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=kqLdLCZCA7-xxgOOWohsCCrD6Jz3MamslmCl-41R2rA,1371
4
+ mosamatic2/cli.py,sha256=EhGBs8AZjgZBBDFkWBNRuKd9o37Zo116DlKHHFBhoBo,1444
5
5
  mosamatic2/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  mosamatic2/commands/calculatescores.py,sha256=Lb8Q8L2yq7Tt6VBJ6_lltRuldrev_pac6fcgF-xzZyE,1984
7
7
  mosamatic2/commands/createdicomsummary.py,sha256=qbVgWGIJPBL8vTBcAxfThloQ_q15OfQy5ohMprzZL4E,1955
8
8
  mosamatic2/commands/createpngsfromsegmentations.py,sha256=uUAQJVTqOkBCfENzi21RBNYvf6_nuesx1MeR3j_-7dM,1682
9
+ mosamatic2/commands/defaultpipeline.py,sha256=-kQRSXbEDimAdy_kT1qMxRlZWUoXdu3PkWf70PCIS5Y,1734
9
10
  mosamatic2/commands/dicom2nifti.py,sha256=4hMvglxdOid7p7P_Jc-Tudsf93JRMlYaQsEQctLq2d4,1015
10
11
  mosamatic2/commands/rescaledicomimages.py,sha256=25QdCzB5s0sRwkTb3o5zco2bIwy6LttNf7i97kGBDYQ,1280
11
12
  mosamatic2/commands/segmentmusclefatl3tensorflow.py,sha256=CdScmA_EQicaN4GY5bBUOYwfhDPqy9om2sxY3WrtmM0,1424
@@ -43,7 +44,7 @@ mosamatic2/core/tasks/segmentmusclefatl3tensorflowtask/__init__.py,sha256=47DEQp
43
44
  mosamatic2/core/tasks/segmentmusclefatl3tensorflowtask/paramloader.py,sha256=VxTCOYK_1VRAG83P-ulm0LPvqXI-0iT5BCr0Rdr7MWg,900
44
45
  mosamatic2/core/tasks/segmentmusclefatl3tensorflowtask/segmentmusclefatl3tensorflowtask.py,sha256=E3GHzGtl-v_qIdLjSy3cbDnf8vfWK6Bax3RAZcKCqXg,5149
45
46
  mosamatic2/core/tasks/selectslicefromscanstask/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
- mosamatic2/core/tasks/selectslicefromscanstask/selectslicefromscanstask.py,sha256=1a_QHcIdS4VB39cNEBniaaDzUx3k8DcR0wCtdr8G1d0,4586
47
+ mosamatic2/core/tasks/selectslicefromscanstask/selectslicefromscanstask.py,sha256=ST_ZMFyPNtsFsXCv7Yu7fnX2reHwom4D5DDPIkjukz0,4805
47
48
  mosamatic2/core/tasks/task.py,sha256=APPnid6dpSGkPuDqU1vm2RIMR5vkpvbP1CPHUMjympg,1691
48
49
  mosamatic2/core/utils.py,sha256=iib_o_dD4hnqGIgOxLOfvMFOqLZOpt0iT_8Oarkmdjs,11723
49
50
  mosamatic2/server.py,sha256=-cZ9BPsZUXoINKqwhCHN8c59mlvzzDXzTVxsYt9au70,4644
@@ -53,7 +54,7 @@ mosamatic2/ui/resources/icons/mosamatic2.icns,sha256=OfhC-diJTIgaNMOezxKKilGsY7m
53
54
  mosamatic2/ui/resources/icons/mosamatic2.ico,sha256=ySD3RYluHK3pgS0Eas7eKrVk_AskdLQ4qs_IT-wNhq4,12229
54
55
  mosamatic2/ui/resources/icons/spinner.gif,sha256=rvaac6GUZauHSPFSOLWr0RmLfjmtZih2Q8knQ2WP3Po,16240
55
56
  mosamatic2/ui/resources/images/body-composition.jpg,sha256=KD-BudbXwThB4lJOZZN-ad5-TZRaaZ5cKTH0Ar1TOZs,21227
56
- mosamatic2/ui/resources/VERSION,sha256=GK-SWujODPcbTcVr82R22iPUlrjhCG6gyHU--L4NyBQ,8
57
+ mosamatic2/ui/resources/VERSION,sha256=rjrzwwdgM5RnMbKO12uDFNTXB8MXR6EtdrI79fSNyhA,9
57
58
  mosamatic2/ui/settings.py,sha256=YEVHYJIfNsqMO3v1pjzgh7Pih9GGoUX7S9s8S-sBNUk,2121
58
59
  mosamatic2/ui/utils.py,sha256=6bbPIrh4RJ_yhQKNZrgPbL4XeUEogjIjbk_e5c3QS5g,853
59
60
  mosamatic2/ui/widgets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -85,7 +86,7 @@ mosamatic2/ui/widgets/panels/visualizations/slicevisualization/slicevisualizatio
85
86
  mosamatic2/ui/widgets/panels/visualizations/visualization.py,sha256=JvqTJi7cCGYK1-wrN2oURdCOBoPS2clVUyYglhkoVJg,178
86
87
  mosamatic2/ui/widgets/splashscreen.py,sha256=MS-OczOWfwwEQNQd-JWe9_Mh57css0cSQgbu973rwQo,4056
87
88
  mosamatic2/ui/worker.py,sha256=v7e3gq7MUudgpB1BJW-P7j5wurzu6-HG5m7I6WHgJp0,699
88
- mosamatic2-2.0.9.dist-info/entry_points.txt,sha256=MCUpKkgbej1clgp8EqlLQGs0BIKwGPcBPiVWLfGz9Gw,126
89
- mosamatic2-2.0.9.dist-info/METADATA,sha256=ghYgnAGDjhsgKeX6PpcMuQ_Dr2ZkEI4HMXkMXBRpLW8,1489
90
- mosamatic2-2.0.9.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
91
- mosamatic2-2.0.9.dist-info/RECORD,,
89
+ mosamatic2-2.0.10.dist-info/entry_points.txt,sha256=MCUpKkgbej1clgp8EqlLQGs0BIKwGPcBPiVWLfGz9Gw,126
90
+ mosamatic2-2.0.10.dist-info/METADATA,sha256=O7XhZE4AY-lCnfN0GHXxv9GUZDYKYbhBo-5nB-oE_kk,1490
91
+ mosamatic2-2.0.10.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
92
+ mosamatic2-2.0.10.dist-info/RECORD,,