mosamatic2 2.0.14__tar.gz → 2.0.16__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 mosamatic2 might be problematic. Click here for more details.
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/PKG-INFO +1 -1
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/pyproject.toml +1 -1
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/utils.py +4 -0
- mosamatic2-2.0.16/src/mosamatic2/ui/resources/VERSION +1 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/pipelines/boadockerpipelinepanel.py +10 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/pipelines/defaultdockerpipelinepanel.py +13 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/visualizations/slicevisualization/custominteractorstyle.py +18 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/visualizations/slicevisualization/sliceviewer.py +21 -3
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/visualizations/slicevisualization/slicevisualization.py +36 -1
- mosamatic2-2.0.14/src/mosamatic2/ui/resources/VERSION +0 -1
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/README.md +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/models.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/app.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/cli.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/commands/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/commands/boadockerpipeline.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/commands/calculatescores.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/commands/createdicomsummary.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/commands/createpngsfromsegmentations.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/commands/defaultdockerpipeline.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/commands/defaultpipeline.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/commands/dicom2nifti.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/commands/rescaledicomimages.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/commands/segmentmusclefatl3tensorflow.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/commands/selectslicefromscans.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/commands/totalsegmentator.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/constants.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/data/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/data/dicomimage.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/data/dicomimageseries.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/data/dixonseries.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/data/filedata.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/data/multidicomimage.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/data/multiniftiimage.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/data/multinumpyimage.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/data/niftiimage.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/data/numpyimage.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/managers/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/managers/logmanager.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/managers/logmanagerlistener.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/pipelines/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/pipelines/boadockerpipeline/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/pipelines/boadockerpipeline/boadockerpipeline.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/pipelines/defaultdockerpipeline/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/pipelines/defaultdockerpipeline/defaultdockerpipeline.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/pipelines/defaultpipeline/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/pipelines/defaultpipeline/defaultpipeline.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/pipelines/pipeline.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/singleton.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/tasks/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/tasks/calculatescorestask/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/tasks/calculatescorestask/calculatescorestask.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/tasks/createdicomsummarytask/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/tasks/createdicomsummarytask/createdicomsummarytask.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/tasks/createpngsfromsegmentationstask/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/tasks/createpngsfromsegmentationstask/createpngsfromsegmentationstask.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/tasks/dicom2niftitask/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/tasks/dicom2niftitask/dicom2niftitask.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/tasks/rescaledicomimagestask/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/tasks/rescaledicomimagestask/rescaledicomimagestask.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/tasks/segmentmusclefatl3tensorflowtask/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/tasks/segmentmusclefatl3tensorflowtask/paramloader.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/tasks/segmentmusclefatl3tensorflowtask/segmentmusclefatl3tensorflowtask.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/tasks/selectslicefromscanstask/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/tasks/selectslicefromscanstask/selectslicefromscanstask.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/tasks/task.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/tasks/totalsegmentatortask/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/tasks/totalsegmentatortask/totalsegmentatortask.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/server.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/mainwindow.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/resources/icons/mosamatic2.icns +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/resources/icons/mosamatic2.ico +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/resources/icons/spinner.gif +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/resources/images/body-composition.jpg +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/settings.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/utils.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/dialogs/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/dialogs/dialog.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/dialogs/helpdialog.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/defaultpanel.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/logpanel.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/mainpanel.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/pipelines/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/pipelines/defaultpipelinepanel.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/pipelines/pipelinepanel.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/stackedpanel.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/tasks/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/tasks/calculatescorestaskpanel.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/tasks/createdicomsummarytaskpanel.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/tasks/createpngsfromsegmentationstaskpanel.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/tasks/dicom2niftitaskpanel.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/tasks/rescaledicomimagestaskpanel.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/tasks/segmentmusclefatl3tensorflowtaskpanel.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/tasks/selectslicefromscanstaskpanel.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/tasks/taskpanel.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/tasks/totalsegmentatortaskpanel.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/visualizations/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/visualizations/slicevisualization/__init__.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/visualizations/visualization.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/splashscreen.py +0 -0
- {mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/worker.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.0.16
|
|
@@ -16,6 +16,7 @@ from PySide6.QtCore import (
|
|
|
16
16
|
)
|
|
17
17
|
|
|
18
18
|
from mosamatic2.core.managers.logmanager import LogManager
|
|
19
|
+
from mosamatic2.core.utils import is_docker_running, is_path_docker_compatible
|
|
19
20
|
from mosamatic2.ui.widgets.panels.pipelines.pipelinepanel import PipelinePanel
|
|
20
21
|
from mosamatic2.ui.settings import Settings
|
|
21
22
|
from mosamatic2.ui.utils import is_macos
|
|
@@ -127,6 +128,15 @@ class BoaDockerPipelinePanel(PipelinePanel):
|
|
|
127
128
|
self.settings().set('last_directory', directory)
|
|
128
129
|
|
|
129
130
|
def handle_run_pipeline_button(self):
|
|
131
|
+
if not is_docker_running():
|
|
132
|
+
QMessageBox.information(self, 'Error', 'Docker is not running. Please start Docker Desktop first')
|
|
133
|
+
return
|
|
134
|
+
if not is_path_docker_compatible(self.scans_dir_line_edit().text()):
|
|
135
|
+
QMessageBox.information(self, 'Error', 'Path to scans directory contains spaces and is not Docker compatible')
|
|
136
|
+
return
|
|
137
|
+
if not is_path_docker_compatible(self.output_dir_line_edit().text()):
|
|
138
|
+
QMessageBox.information(self, 'Error', 'Path to output directory contains spaces and is not Docker compatible')
|
|
139
|
+
return
|
|
130
140
|
errors = self.check_inputs_and_parameters()
|
|
131
141
|
if len(errors) > 0:
|
|
132
142
|
error_message = 'Following errors were encountered:\n'
|
|
@@ -18,6 +18,7 @@ from PySide6.QtCore import (
|
|
|
18
18
|
)
|
|
19
19
|
|
|
20
20
|
from mosamatic2.core.managers.logmanager import LogManager
|
|
21
|
+
from mosamatic2.core.utils import is_docker_running, is_path_docker_compatible
|
|
21
22
|
from mosamatic2.ui.widgets.panels.pipelines.pipelinepanel import PipelinePanel
|
|
22
23
|
from mosamatic2.ui.settings import Settings
|
|
23
24
|
from mosamatic2.ui.utils import is_macos
|
|
@@ -223,6 +224,18 @@ class DefaultDockerPipelinePanel(PipelinePanel):
|
|
|
223
224
|
self.model_type_combobox().setCurrentText('pytorch')
|
|
224
225
|
|
|
225
226
|
def handle_run_pipeline_button(self):
|
|
227
|
+
if not is_docker_running():
|
|
228
|
+
QMessageBox.information(self, 'Error', 'Docker is not running. Please start Docker Desktop first')
|
|
229
|
+
return
|
|
230
|
+
if not is_path_docker_compatible(self.images_dir_line_edit().text()):
|
|
231
|
+
QMessageBox.information(self, 'Error', 'Path to images directory contains spaces and is not Docker compatible')
|
|
232
|
+
return
|
|
233
|
+
if not is_path_docker_compatible(self.model_files_dir_line_edit().text()):
|
|
234
|
+
QMessageBox.information(self, 'Error', 'Path to model files directory contains spaces and is not Docker compatible')
|
|
235
|
+
return
|
|
236
|
+
if not is_path_docker_compatible(self.output_dir_line_edit().text()):
|
|
237
|
+
QMessageBox.information(self, 'Error', 'Path to output directory contains spaces and is not Docker compatible')
|
|
238
|
+
return
|
|
226
239
|
errors = self.check_inputs_and_parameters()
|
|
227
240
|
if len(errors) > 0:
|
|
228
241
|
error_message = 'Following errors were encountered:\n'
|
|
@@ -14,6 +14,8 @@ class CustomInteractorStyle(vtk.vtkInteractorStyleImage):
|
|
|
14
14
|
self.status_actor = status_actor
|
|
15
15
|
self.slice_obj = slice_obj
|
|
16
16
|
self.orientation = orientation
|
|
17
|
+
self._color_window = 0
|
|
18
|
+
self._color_level = 0
|
|
17
19
|
|
|
18
20
|
xmin, xmax, ymin, ymax, zmin, zmax = image_data.GetExtent()
|
|
19
21
|
if orientation == "axial":
|
|
@@ -29,6 +31,22 @@ class CustomInteractorStyle(vtk.vtkInteractorStyleImage):
|
|
|
29
31
|
self.slice_mapper.SetSliceNumber(self.slice)
|
|
30
32
|
self.update_status_message()
|
|
31
33
|
|
|
34
|
+
def color_window(self):
|
|
35
|
+
return self._color_window
|
|
36
|
+
|
|
37
|
+
def set_color_window(self, color_window):
|
|
38
|
+
self._color_window = color_window
|
|
39
|
+
self.slice_obj.GetProperty().SetColorWindow(self._color_window)
|
|
40
|
+
self.GetInteractor().GetRenderWindow().Render()
|
|
41
|
+
|
|
42
|
+
def color_level(self):
|
|
43
|
+
return self._color_level
|
|
44
|
+
|
|
45
|
+
def set_color_level(self, color_level):
|
|
46
|
+
self._color_level = color_level
|
|
47
|
+
self.slice_obj.GetProperty().SetColorLevel(self._color_level)
|
|
48
|
+
self.GetInteractor().GetRenderWindow().Render()
|
|
49
|
+
|
|
32
50
|
def update_status_message(self):
|
|
33
51
|
window = int(self.slice_obj.GetProperty().GetColorWindow())
|
|
34
52
|
level = int(self.slice_obj.GetProperty().GetColorLevel())
|
|
@@ -11,10 +11,12 @@ IMAGE_SHIFT_SCALE = -1000
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class SliceViewer(QWidget):
|
|
14
|
-
def __init__(self):
|
|
14
|
+
def __init__(self, color_window=COLOR_WINDOW, color_level=COLOR_LEVEL):
|
|
15
15
|
super(SliceViewer, self).__init__()
|
|
16
16
|
self._nifti_file_or_dicom_dir = None
|
|
17
17
|
self._view_orientation = 'axial'
|
|
18
|
+
self._color_window = color_window
|
|
19
|
+
self._color_level = color_level
|
|
18
20
|
self._vtk_widget = QVTKRenderWindowInteractor(self)
|
|
19
21
|
self._render_window = self._vtk_widget.GetRenderWindow()
|
|
20
22
|
self._interactor = self._render_window.GetInteractor()
|
|
@@ -27,6 +29,22 @@ class SliceViewer(QWidget):
|
|
|
27
29
|
self._render_window.AddRenderer(self._default_renderer)
|
|
28
30
|
self._render_window.Render()
|
|
29
31
|
|
|
32
|
+
def color_window(self):
|
|
33
|
+
return self._color_window
|
|
34
|
+
|
|
35
|
+
def set_color_window(self, color_window):
|
|
36
|
+
self._color_window = color_window
|
|
37
|
+
if self._interactor_style:
|
|
38
|
+
self._interactor_style.set_color_window(self._color_window)
|
|
39
|
+
|
|
40
|
+
def color_level(self):
|
|
41
|
+
return self._color_level
|
|
42
|
+
|
|
43
|
+
def set_color_level(self, color_level):
|
|
44
|
+
self._color_level = color_level
|
|
45
|
+
if self._interactor_style:
|
|
46
|
+
self._interactor_style.set_color_level(self._color_level)
|
|
47
|
+
|
|
30
48
|
def nifti_file_or_dicom_dir(self):
|
|
31
49
|
return self._nifti_file_or_dicom_dir
|
|
32
50
|
|
|
@@ -75,8 +93,8 @@ class SliceViewer(QWidget):
|
|
|
75
93
|
slice_mapper.SetOrientationToZ() # axial orientation
|
|
76
94
|
slice_mapper.SetSliceNumber(axial_index)
|
|
77
95
|
slice = vtk.vtkImageSlice()
|
|
78
|
-
slice.GetProperty().SetColorWindow(
|
|
79
|
-
slice.GetProperty().SetColorLevel(
|
|
96
|
+
slice.GetProperty().SetColorWindow(self.color_window())
|
|
97
|
+
slice.GetProperty().SetColorLevel(self.color_level())
|
|
80
98
|
slice.SetMapper(slice_mapper)
|
|
81
99
|
slice_text_actor = self.create_text_actor("", 0.01, 0.01, 12, align_bottom=True, normalized=True)
|
|
82
100
|
usage_text_actor = self.create_text_actor(
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
from PySide6.QtWidgets import (
|
|
2
2
|
QLineEdit,
|
|
3
|
+
QLabel,
|
|
4
|
+
QSpinBox,
|
|
3
5
|
QHBoxLayout,
|
|
4
6
|
QVBoxLayout,
|
|
5
7
|
QFormLayout,
|
|
@@ -24,6 +26,9 @@ class SliceVisualization(Visualization):
|
|
|
24
26
|
self._image_line_edit = None
|
|
25
27
|
self._image_select_button = None
|
|
26
28
|
self._image_dir_select_button = None
|
|
29
|
+
self._color_window_spinbox = None
|
|
30
|
+
self._color_level_spinbox = None
|
|
31
|
+
self._color_window_and_level_reset_button = None
|
|
27
32
|
self._load_image_button = None
|
|
28
33
|
self._slice_viewer = None
|
|
29
34
|
self._form_layout = None
|
|
@@ -47,6 +52,22 @@ class SliceVisualization(Visualization):
|
|
|
47
52
|
self._image_dir_select_button.clicked.connect(self.handle_image_dir_select_button)
|
|
48
53
|
return self._image_dir_select_button
|
|
49
54
|
|
|
55
|
+
def color_window_spinbox(self):
|
|
56
|
+
if not self._color_window_spinbox:
|
|
57
|
+
self._color_window_spinbox = QSpinBox(self, minimum=0, maximum=1024, value=400)
|
|
58
|
+
return self._color_window_spinbox
|
|
59
|
+
|
|
60
|
+
def color_level_spinbox(self):
|
|
61
|
+
if not self._color_level_spinbox:
|
|
62
|
+
self._color_level_spinbox = QSpinBox(self, minimum=0, maximum=100, value=40)
|
|
63
|
+
return self._color_level_spinbox
|
|
64
|
+
|
|
65
|
+
def color_window_and_level_reset_button(self):
|
|
66
|
+
if not self._color_window_and_level_reset_button:
|
|
67
|
+
self._color_window_and_level_reset_button = QPushButton('Reset')
|
|
68
|
+
self._color_window_and_level_reset_button.clicked.connect(self.handle_color_window_and_level_reset_button)
|
|
69
|
+
return self._color_window_and_level_reset_button
|
|
70
|
+
|
|
50
71
|
def load_image_button(self):
|
|
51
72
|
if not self._load_image_button:
|
|
52
73
|
self._load_image_button = QPushButton('Load')
|
|
@@ -55,7 +76,10 @@ class SliceVisualization(Visualization):
|
|
|
55
76
|
|
|
56
77
|
def slice_viewer(self):
|
|
57
78
|
if not self._slice_viewer:
|
|
58
|
-
self._slice_viewer = SliceViewer(
|
|
79
|
+
self._slice_viewer = SliceViewer(
|
|
80
|
+
color_window=self.color_window_spinbox().value(),
|
|
81
|
+
color_level=self.color_level_spinbox().value(),
|
|
82
|
+
)
|
|
59
83
|
return self._slice_viewer
|
|
60
84
|
|
|
61
85
|
def form_layout(self):
|
|
@@ -75,7 +99,14 @@ class SliceVisualization(Visualization):
|
|
|
75
99
|
image_layout.addWidget(self.image_line_edit())
|
|
76
100
|
image_layout.addWidget(self.image_select_button())
|
|
77
101
|
image_layout.addWidget(self.image_dir_select_button())
|
|
102
|
+
color_window_and_level_layout = QHBoxLayout()
|
|
103
|
+
color_window_and_level_layout.addWidget(QLabel('Color window'))
|
|
104
|
+
color_window_and_level_layout.addWidget(self.color_window_spinbox())
|
|
105
|
+
color_window_and_level_layout.addWidget(QLabel('Color level'))
|
|
106
|
+
color_window_and_level_layout.addWidget(self.color_level_spinbox())
|
|
107
|
+
color_window_and_level_layout.addWidget(self.color_window_and_level_reset_button())
|
|
78
108
|
self.form_layout().addRow('NIFTI file or DICOM directory', image_layout)
|
|
109
|
+
self.form_layout().addRow('', color_window_and_level_layout)
|
|
79
110
|
layout = QVBoxLayout()
|
|
80
111
|
layout.addLayout(self.form_layout())
|
|
81
112
|
layout.addWidget(self.load_image_button())
|
|
@@ -97,6 +128,10 @@ class SliceVisualization(Visualization):
|
|
|
97
128
|
self.image_line_edit().setText(dir_path)
|
|
98
129
|
self.settings().set('last_directory', dir_path)
|
|
99
130
|
|
|
131
|
+
def handle_color_window_and_level_reset_button(self):
|
|
132
|
+
self.slice_viewer().set_color_window(self.color_window_spinbox().value())
|
|
133
|
+
self.slice_viewer().set_color_level(self.color_level_spinbox().value())
|
|
134
|
+
|
|
100
135
|
def handle_load_image_button(self):
|
|
101
136
|
self.slice_viewer().set_nifti_file_or_dicom_dir(self.image_line_edit().text())
|
|
102
137
|
# self.slice_viewer().set_view_orientation('axial')
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2.0.14
|
|
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
|
{mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/commands/createpngsfromsegmentations.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/commands/segmentmusclefatl3tensorflow.py
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
|
{mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/pipelines/boadockerpipeline/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/pipelines/defaultpipeline/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/tasks/calculatescorestask/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/tasks/createdicomsummarytask/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/tasks/dicom2niftitask/__init__.py
RENAMED
|
File without changes
|
{mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/tasks/dicom2niftitask/dicom2niftitask.py
RENAMED
|
File without changes
|
{mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/tasks/rescaledicomimagestask/__init__.py
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
|
{mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/core/tasks/totalsegmentatortask/__init__.py
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
|
{mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/resources/images/body-composition.jpg
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
|
{mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/pipelines/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/pipelines/pipelinepanel.py
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
|
{mosamatic2-2.0.14 → mosamatic2-2.0.16}/src/mosamatic2/ui/widgets/panels/visualizations/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|