PartSeg.common_backend package¶
Module contents¶
This module contains non gui Qt based components
Submodules¶
PartSeg.common_backend.abstract_class module¶
- class PartSeg.common_backend.abstract_class.QtMeta[source]¶
Bases:
ObjectType,ABCMetaClass to solve metaclass conflict for multiple inheritance:
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclass of all its bases>>> class A: ... pass ... >>> class Test(QObject, A, metaclass=QtMeta): ... pass
PartSeg.common_backend.base_argparser module¶
PartSeg.common_backend.base_settings module¶
PartSeg.common_backend.except_hook module¶
PartSeg.common_backend.load_backup module¶
PartSeg.common_backend.partially_const_dict module¶
- class PartSeg.common_backend.partially_const_dict.PartiallyConstDict(editable_items)[source]¶
Base class for creating dict to mixin predefined and user defined variables.
- item_added(object) = <PySide2.QtCore.Signal object>¶
Signal with item added to dict
- item_removed(object) = <PySide2.QtCore.Signal object>¶
Signal with item remove from dict
PartSeg.common_backend.progress_thread module¶
- class PartSeg.common_backend.progress_thread.ExecuteFunctionThread(fun, args=None, kwargs=None)[source]¶
Bases:
ProgressTreadGeneric Thread to execute
- staticMetaObject = <PySide2.QtCore.QMetaObject object>¶
- class PartSeg.common_backend.progress_thread.ProgressTread[source]¶
Bases:
QThread- error_signal(Exception) = <PySide2.QtCore.Signal object>¶
- range_changed(int, int) = <PySide2.QtCore.Signal object>¶
- staticMetaObject = <PySide2.QtCore.QMetaObject object>¶
- step_changed(int) = <PySide2.QtCore.Signal object>¶
PartSeg.common_backend.segmentation_thread module¶
- class PartSeg.common_backend.segmentation_thread.SegmentationThread(algorithm)[source]¶
Bases:
QThreadMethod to run calculation task in separated Thread. This allows to not freeze main window. To get info if calculation is done connect to
finished.- exception_occurred(Exception) = <PySide2.QtCore.Signal object>¶
Signal emitted when some exception occur during calculation.
- execution_done(ROIExtractionResult) = <PySide2.QtCore.Signal object>¶
Signal contains result of segmentation algorithm. Emitted if calculation ends without exception and
SegmentationAlgorithm.calculation_run()return not None result.
- finished_task()[source]¶
Called on calculation finished. Check if cache is not empty. In such case start calculation again with new parameters.
- progress_signal(str, int) = <PySide2.QtCore.Signal object>¶
Signal with information about progress. This is proxy for
SegmentationAlgorithm.calculation_run()report_fun parameter`
- set_image(image)[source]¶
check if calculation is running. If yes then cache parameters until it finish, otherwise call
SegmentationAlgorithm.set_image():type image: :param image: image to be set
- set_mask(mask)[source]¶
check if calculation is running. If yes then cache parameters until it finish, otherwise call
SegmentationAlgorithm.set_mask():type mask: :param mask: mask to be set