PartSeg 0.15.1__tar.gz → 0.15.2__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.
- {PartSeg-0.15.1 → PartSeg-0.15.2}/MANIFEST.in +1 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/PKG-INFO +22 -4
- {PartSeg-0.15.1 → PartSeg-0.15.2}/changelog.md +18 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/_roi_analysis/batch_window.py +14 -3
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/_roi_analysis/prepare_plan_widget.py +35 -11
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/changelog.py +18 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/custom_load_dialog.py +7 -5
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/searchable_list_widget.py +1 -1
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/version.py +2 -2
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg.egg-info/PKG-INFO +22 -4
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg.egg-info/SOURCES.txt +3 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg.egg-info/requires.txt +1 -1
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/algorithm_describe_base.py +5 -4
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/analysis/batch_processing/batch_backend.py +28 -16
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/analysis/calculation_plan.py +34 -1
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/analysis/load_functions.py +43 -2
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/io_utils.py +27 -3
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/json_hooks.py +15 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/segmentation/restartable_segmentation_algorithms.py +18 -4
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/segmentation/threshold.py +21 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/conftest.py +2 -2
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/roi_analysis/test_batch.py +3 -4
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/test_common_backend.py +3 -3
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/test_roi_analysis_batch.py +58 -3
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegCore/test_io.py +46 -1
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegCore/test_json_hooks.py +8 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegCore/test_segmentation.py +2 -2
- PartSeg-0.15.2/package/tests/test_data/problematic_excel_batch.xlsx +0 -0
- PartSeg-0.15.2/package/tests/test_data/problematic_json_batch.json +928 -0
- PartSeg-0.15.2/package/tests/test_data/range_profile.json +118 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/requirements/constraints_py3.10.txt +21 -21
- {PartSeg-0.15.1 → PartSeg-0.15.2}/requirements/constraints_py3.11.txt +20 -20
- {PartSeg-0.15.1 → PartSeg-0.15.2}/requirements/constraints_py3.8.txt +17 -17
- {PartSeg-0.15.1 → PartSeg-0.15.2}/requirements/constraints_py3.9.txt +21 -21
- {PartSeg-0.15.1 → PartSeg-0.15.2}/setup.cfg +1 -1
- {PartSeg-0.15.1 → PartSeg-0.15.2}/.napari/DESCRIPTION.md +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/.napari/config.yml +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/CITATION.cff +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/License.txt +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/Readme.md +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/__main__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/_launcher/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/_launcher/check_version.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/_launcher/main_window.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/_roi_analysis/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/_roi_analysis/advanced_window.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/_roi_analysis/calculation_pipeline_thread.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/_roi_analysis/export_batch.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/_roi_analysis/image_view.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/_roi_analysis/main_window.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/_roi_analysis/measurement_widget.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/_roi_analysis/partseg_settings.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/_roi_analysis/profile_export.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/_roi_mask/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/_roi_mask/batch_proceed.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/_roi_mask/image_view.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/_roi_mask/main_window.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/_roi_mask/segmentation_info_dialog.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/_roi_mask/simple_measurements.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/_roi_mask/stack_settings.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_backend/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_backend/abstract_class.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_backend/base_argparser.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_backend/base_settings.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_backend/except_hook.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_backend/load_backup.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_backend/partially_const_dict.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_backend/progress_thread.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_backend/python_syntax_highlight.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_backend/segmentation_thread.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/about_dialog.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/advanced_tabs.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/algorithms_description.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/channel_control.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/collapse_checkbox.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/colormap_creator.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/custom_buttons.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/custom_save_dialog.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/equal_column_layout.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/error_report.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/exception_hooks.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/flow_layout.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/icon_selector.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/image_adjustment.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/label_create.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/lock_checkbox.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/main_window.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/mask_widget.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/multiple_file_widget.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/napari_image_view.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/napari_viewer_wrap.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/numpy_qimage.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/qt_console.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/qt_modal.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/qt_util.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/searchable_combo_box.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/select_multiple_files.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/show_directory_dialog.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/stack_image_view.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/stacked_widget_with_selector.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/universal_gui_part.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/common_gui/waiting_dialog.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/launcher_main.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/napari.yaml +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/plugins/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/plugins/itk_snap_save/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/plugins/modeling_save/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/plugins/modeling_save/save_modeling_data.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/plugins/napari_widgets/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/plugins/napari_widgets/_settings.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/plugins/napari_widgets/algorithm_widgets.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/plugins/napari_widgets/colormap_control.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/plugins/napari_widgets/copy_labels.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/plugins/napari_widgets/lables_control.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/plugins/napari_widgets/mask_create_widget.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/plugins/napari_widgets/measurement_widget.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/plugins/napari_widgets/roi_extraction_algorithms.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/plugins/napari_widgets/search_label_widget.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/plugins/napari_widgets/simple_measurement_widget.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/plugins/napari_widgets/utils.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/plugins/old_partseg/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/plugins/old_partseg/old_partseg.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg/state_store.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg.egg-info/dependency_links.txt +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg.egg-info/entry_points.txt +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSeg.egg-info/top_level.txt +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/_old_json_hooks.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/analysis/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/analysis/algorithm_description.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/analysis/analysis_utils.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/analysis/batch_processing/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/analysis/batch_processing/parallel_backend.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/analysis/calculate_pipeline.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/analysis/io_utils.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/analysis/measurement_base.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/analysis/measurement_calculation.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/analysis/save_functions.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/autofit.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/channel_class.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/class_generator.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/color_image/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/color_image/base_colors.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/color_image/color_data.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/convex_fill.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/custom_name_generate.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/image_operations.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/image_transforming/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/image_transforming/image_projection.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/image_transforming/interpolate_image.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/image_transforming/swap_time_stack.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/image_transforming/transform_base.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/mask/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/mask/algorithm_description.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/mask/history_utils.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/mask/io_functions.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/mask_create.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/mask_partition_utils.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/napari_plugins/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/napari_plugins/load_image.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/napari_plugins/load_mask_project.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/napari_plugins/load_masked_image.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/napari_plugins/load_roi_project.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/napari_plugins/loader.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/napari_plugins/save_mask_roi.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/napari_plugins/save_tiff_layer.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/plugins/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/project_info.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/register.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/roi_info.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/segmentation/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/segmentation/algorithm_base.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/segmentation/border_smoothing.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/segmentation/mu_mid_point.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/segmentation/noise_filtering.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/segmentation/segmentation_algorithm.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/segmentation/utils.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/segmentation/watershed.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/sphinx/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/sphinx/auto_parameters.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/universal_const.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/utils.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegImage/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegImage/channel_class.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegImage/image.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegImage/image_reader.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegImage/image_writer.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegImage/tifffile_fixes.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/conftest.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/roi_analysis/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/roi_analysis/test_advanced_window.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/roi_analysis/test_batch_window.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/roi_analysis/test_export_batch.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/roi_analysis/test_image_view.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/roi_analysis/test_main_window.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/roi_analysis/test_profile_export.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/roi_mask/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/roi_mask/test_batch.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/roi_mask/test_main_window.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/test_analysis.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/test_base.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/test_base_widgets.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/test_channel_control.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/test_check_release.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/test_colormap_create.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/test_common_gui.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/test_io.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/test_label_choose.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/test_launcher.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/test_main_windows.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/test_napari_image_view.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/test_napari_widgets.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/test_sentry.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/test_settings.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/test_viewer.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSeg/test_window_import.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegCore/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegCore/segmentation/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegCore/segmentation/test_algorithm_base.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegCore/segmentation/test_segmentation_algorithm.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegCore/segmentation/test_threshold.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegCore/test_algorithm_describe_base.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegCore/test_analysis_batch.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegCore/test_base.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegCore/test_class_generator.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegCore/test_class_register.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegCore/test_image_adjustment.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegCore/test_mask_create.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegCore/test_mask_partition.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegCore/test_measurements.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegCore/test_min_req.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegCore/test_mso.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegCore/test_napari_plugins.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegCore/test_pipeline.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegCore/test_segmentation_proceses.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegCore/test_smooth.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegCore/test_utils.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegImage/__init__.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegImage/test_image.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegImage/test_image_reader.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_PartSegImage/test_image_writer.py +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/calculation_plan_0.9.2.3.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/measurements_profile.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/napari_measurements_profile.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/notebook/neuron_types_measurment.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/notebook/neuron_types_segmentation.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/notebook/segment_data.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.10.4/analysis/batch_plans_save.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.10.4/analysis/segmentation_pipeline_save.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.10.4/analysis/segmentation_profiles_save.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.10.4/analysis/segmentation_settings.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.10.4/analysis/statistic_profiles_save.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.10.4/analysis/view_settings.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.13.1/analysis/batch_plans_save.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.13.1/analysis/segmentation_pipeline_save.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.13.1/analysis/segmentation_profiles_save.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.13.1/analysis/segmentation_settings.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.13.1/analysis/statistic_profiles_save.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.13.1/analysis/view_settings.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.13.1/mask/segmentation_settings.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.13.1/mask/view_settings.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.13.14/analysis/batch_plans_save.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.13.14/analysis/segmentation_pipeline_save.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.13.14/analysis/segmentation_profiles_save.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.13.14/analysis/segmentation_settings.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.13.14/analysis/statistic_profiles_save.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.13.14/analysis/view_settings.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.13.14/mask/segmentation_settings.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.13.14/mask/view_settings.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.13.15/analysis/batch_plans_save.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.13.15/analysis/segmentation_pipeline_save.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.13.15/analysis/segmentation_profiles_save.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.13.15/analysis/segmentation_settings.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.13.15/analysis/statistic_profiles_save.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.13.15/analysis/view_settings.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.13.15/mask/segmentation_settings.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.13.15/mask/view_settings.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.8.6/analysis/batch_plans_save.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.8.6/analysis/segmentation_pipeline_save.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.8.6/analysis/segmentation_profiles_save.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.8.6/analysis/segmentation_settings.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.8.6/analysis/statistic_profiles_save.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/old_saves/0.8.6/analysis/view_settings.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/ome.xsd.xml +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/problematic_profile_dict.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/sample_batch_output.xlsx +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/segment_profile_0.9.2.3.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/view_settings_v0.12.6.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/package/tests/test_data/workflow.json +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/pyproject.toml +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/requirements/dependabot_runtime.txt +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/requirements/requirements_ci.txt +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/requirements/requirements_dev.txt +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/requirements/requirements_test.txt +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/requirements/version_denylist.txt +0 -0
- {PartSeg-0.15.1 → PartSeg-0.15.2}/setup.py +0 -0
|
@@ -5,6 +5,7 @@ include package/tests/test_data/napari_measurements_profile.json
|
|
|
5
5
|
include package/tests/test_data/notebook/*.json
|
|
6
6
|
include package/tests/test_data/old_saves/*/*/*.json
|
|
7
7
|
include package/tests/test_data/sample_batch_output.xlsx
|
|
8
|
+
include package/tests/test_data/problematic_excel_batch.xlsx
|
|
8
9
|
include package/PartSeg/napari.yaml
|
|
9
10
|
include Readme.md
|
|
10
11
|
include changelog.md
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PartSeg
|
|
3
|
-
Version: 0.15.
|
|
3
|
+
Version: 0.15.2
|
|
4
4
|
Summary: PartSeg is python GUI and set of napari plugins for bio imaging analysis especially nucleus analysis,
|
|
5
5
|
Home-page: https://4dnucleome.cent.uw.edu.pl/PartSeg/
|
|
6
6
|
Author: Grzegorz Bokota
|
|
@@ -79,9 +79,9 @@ This application is designed to help biologist with segmentation based on thresh
|
|
|
79
79
|
|
|
80
80
|
- From binaries:
|
|
81
81
|
|
|
82
|
-
- [Windows](https://4dnucleome.cent.uw.edu.pl/PartSeg/Downloads/PartSeg-0.15.
|
|
83
|
-
- [Linux](https://4dnucleome.cent.uw.edu.pl/PartSeg/Downloads/PartSeg-0.15.
|
|
84
|
-
- [MacOS](https://4dnucleome.cent.uw.edu.pl/PartSeg/Downloads/PartSeg-0.15.
|
|
82
|
+
- [Windows](https://4dnucleome.cent.uw.edu.pl/PartSeg/Downloads/PartSeg-0.15.2-windows.zip) (build on Windows 10)
|
|
83
|
+
- [Linux](https://4dnucleome.cent.uw.edu.pl/PartSeg/Downloads/PartSeg-0.15.2-linux.zip) (build on Ubuntu 20.04)
|
|
84
|
+
- [MacOS](https://4dnucleome.cent.uw.edu.pl/PartSeg/Downloads/PartSeg-0.15.2-macos.zip) (build on MacOS 11)
|
|
85
85
|
There are reported problems with permissions systems on macOS. If you have problem with starting application please try to run it from terminal.
|
|
86
86
|
|
|
87
87
|
- With pip:
|
|
@@ -169,6 +169,24 @@ from 3D microscopy images for dummies. BMC Bioinformatics 22, 72 (2021).
|
|
|
169
169
|
|
|
170
170
|
## Changelog
|
|
171
171
|
|
|
172
|
+
### 0.15.2 - 2023-08-28
|
|
173
|
+
|
|
174
|
+
#### Bug Fixes
|
|
175
|
+
|
|
176
|
+
- Fix range threshold selection of algorithms (#1009)
|
|
177
|
+
- When run batch check if file extension is supported by loader (#1016)
|
|
178
|
+
- Do not allow to select and render corrupted batch plans (#1015)
|
|
179
|
+
|
|
180
|
+
#### Testing
|
|
181
|
+
|
|
182
|
+
- \[Automatic\] Constraints upgrades: `imagecodecs`, `ipykernel`, `magicgui`, `psygnal`, `scipy`, `superqt`, `tifffile` (#1011)
|
|
183
|
+
- \[Automatic\] Constraints upgrades: `imageio`, `pyinstaller`, `tifffile` (#1018)
|
|
184
|
+
|
|
185
|
+
#### Ci
|
|
186
|
+
|
|
187
|
+
- Use faster version of black (#1010)
|
|
188
|
+
- \[pre-commit.ci\] pre-commit autoupdate (#1013)
|
|
189
|
+
|
|
172
190
|
### 0.15.1 - 2023-08-09
|
|
173
191
|
|
|
174
192
|
#### Bug Fixes
|
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.15.2 - 2023-08-28
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
- Fix range threshold selection of algorithms (#1009)
|
|
8
|
+
- When run batch check if file extension is supported by loader (#1016)
|
|
9
|
+
- Do not allow to select and render corrupted batch plans (#1015)
|
|
10
|
+
|
|
11
|
+
### Testing
|
|
12
|
+
|
|
13
|
+
- \[Automatic\] Constraints upgrades: `imagecodecs`, `ipykernel`, `magicgui`, `psygnal`, `scipy`, `superqt`, `tifffile` (#1011)
|
|
14
|
+
- \[Automatic\] Constraints upgrades: `imageio`, `pyinstaller`, `tifffile` (#1018)
|
|
15
|
+
|
|
16
|
+
### Ci
|
|
17
|
+
|
|
18
|
+
- Use faster version of black (#1010)
|
|
19
|
+
- \[pre-commit.ci\] pre-commit autoupdate (#1013)
|
|
20
|
+
|
|
3
21
|
## 0.15.1 - 2023-08-09
|
|
4
22
|
|
|
5
23
|
### Bug Fixes
|
|
@@ -43,7 +43,7 @@ from PartSeg.common_gui.searchable_combo_box import SearchComboBox
|
|
|
43
43
|
from PartSeg.common_gui.select_multiple_files import AddFiles
|
|
44
44
|
from PartSeg.common_gui.universal_gui_part import Spacing, right_label
|
|
45
45
|
from PartSegCore.algorithm_describe_base import AlgorithmProperty
|
|
46
|
-
from PartSegCore.analysis.batch_processing.batch_backend import CalculationManager
|
|
46
|
+
from PartSegCore.analysis.batch_processing.batch_backend import CalculationManager, get_data_loader
|
|
47
47
|
from PartSegCore.analysis.calculation_plan import Calculation, CalculationPlan, MaskFile
|
|
48
48
|
from PartSegCore.io_utils import SaveBase
|
|
49
49
|
from PartSegCore.segmentation.algorithm_base import SegmentationLimitException
|
|
@@ -289,7 +289,7 @@ class FileChoose(QWidget):
|
|
|
289
289
|
|
|
290
290
|
def _refresh_batch_list(self):
|
|
291
291
|
current_calc = str(self.calculation_choose.currentText())
|
|
292
|
-
new_list = ["<no calculation>", *sorted(self.settings.batch_plans.
|
|
292
|
+
new_list = ["<no calculation>", *sorted(n for n, p in self.settings.batch_plans.items() if not p.is_bad())]
|
|
293
293
|
try:
|
|
294
294
|
index = new_list.index(current_calc)
|
|
295
295
|
except ValueError:
|
|
@@ -585,8 +585,11 @@ class CalculationPrepare(QDialog):
|
|
|
585
585
|
self.state_list[file_num, mask_num] = 1
|
|
586
586
|
self.verify_data()
|
|
587
587
|
|
|
588
|
-
def showEvent(self, event):
|
|
588
|
+
def showEvent(self, event): # pragma: no cover
|
|
589
589
|
super().showEvent(event)
|
|
590
|
+
self._show_event_setup()
|
|
591
|
+
|
|
592
|
+
def _show_event_setup(self):
|
|
590
593
|
self._check_start_conditions()
|
|
591
594
|
|
|
592
595
|
icon_dkt = {
|
|
@@ -609,6 +612,14 @@ class CalculationPrepare(QDialog):
|
|
|
609
612
|
widget.setIcon(0, icon_dkt[0])
|
|
610
613
|
widget.setToolTip(0, "File do not exists")
|
|
611
614
|
continue
|
|
615
|
+
loader, ext_match = get_data_loader(self.calculation_plan.execution_tree.operation, file_path)
|
|
616
|
+
if not ext_match:
|
|
617
|
+
warn_state[file_num] = 2
|
|
618
|
+
widget.setToolTip(
|
|
619
|
+
0,
|
|
620
|
+
"File extension suggest that format not supported. "
|
|
621
|
+
f"Supported are {', '.join(loader.get_extensions())}",
|
|
622
|
+
)
|
|
612
623
|
for mask_num, mask_mapper in enumerate(self.mask_mapper_list):
|
|
613
624
|
sub_widget = QTreeWidgetItem(widget)
|
|
614
625
|
sub_widget.setText(0, text_dkt[self.state_list[file_num, mask_num]].format(mask_mapper.name))
|
|
@@ -7,6 +7,7 @@ from copy import copy, deepcopy
|
|
|
7
7
|
from enum import Enum
|
|
8
8
|
|
|
9
9
|
from qtpy.QtCore import Qt, Signal
|
|
10
|
+
from qtpy.QtGui import QIcon
|
|
10
11
|
from qtpy.QtWidgets import (
|
|
11
12
|
QAction,
|
|
12
13
|
QCheckBox,
|
|
@@ -64,6 +65,7 @@ from PartSegCore.analysis.measurement_calculation import MeasurementProfile
|
|
|
64
65
|
from PartSegCore.analysis.save_functions import save_dict
|
|
65
66
|
from PartSegCore.io_utils import LoadPlanExcel, LoadPlanJson, SaveBase
|
|
66
67
|
from PartSegCore.universal_const import Units
|
|
68
|
+
from PartSegData import icons_dir
|
|
67
69
|
|
|
68
70
|
group_sheet = (
|
|
69
71
|
"QGroupBox {border: 1px solid gray; border-radius: 9px; margin-top: 0.5em;} "
|
|
@@ -916,8 +918,12 @@ class CreatePlan(QWidget):
|
|
|
916
918
|
else:
|
|
917
919
|
self.information.setText(item.pretty_print(AnalysisAlgorithmSelection))
|
|
918
920
|
|
|
919
|
-
def edit_plan(self):
|
|
920
|
-
plan
|
|
921
|
+
def edit_plan(self, plan: CalculationPlan):
|
|
922
|
+
if plan.is_bad():
|
|
923
|
+
QMessageBox().warning(
|
|
924
|
+
self, "Cannot edit broken plan", f"Cannot edit broken plan. {plan.get_error_source()}"
|
|
925
|
+
)
|
|
926
|
+
return
|
|
921
927
|
self.calculation_plan = copy(plan)
|
|
922
928
|
self.plan.set_plan(self.calculation_plan)
|
|
923
929
|
self.mask_set.clear()
|
|
@@ -934,10 +940,12 @@ class PlanPreview(QTreeWidget):
|
|
|
934
940
|
|
|
935
941
|
def __init__(self, parent=None, calculation_plan=None):
|
|
936
942
|
super().__init__(parent)
|
|
937
|
-
self.calculation_plan =
|
|
943
|
+
self.calculation_plan = None
|
|
938
944
|
self.header().close()
|
|
939
945
|
self.itemSelectionChanged.connect(self.set_path)
|
|
940
946
|
self.setContextMenuPolicy(Qt.CustomContextMenu)
|
|
947
|
+
if calculation_plan is not None:
|
|
948
|
+
self.set_plan(calculation_plan)
|
|
941
949
|
|
|
942
950
|
def restore_path(self, widget, path):
|
|
943
951
|
"""
|
|
@@ -971,6 +979,11 @@ class PlanPreview(QTreeWidget):
|
|
|
971
979
|
self.set_plan(calculation_plan)
|
|
972
980
|
|
|
973
981
|
def set_plan(self, calculation_plan):
|
|
982
|
+
if calculation_plan is not None and calculation_plan.is_bad():
|
|
983
|
+
QMessageBox().warning(
|
|
984
|
+
self, "Cannot preview broken plan", f"Cannot preview broken plan. {calculation_plan.get_error_source()}"
|
|
985
|
+
)
|
|
986
|
+
return
|
|
974
987
|
self.calculation_plan = calculation_plan
|
|
975
988
|
self.setCurrentItem(self.topLevelItem(0))
|
|
976
989
|
self.update_view(True)
|
|
@@ -1065,7 +1078,7 @@ class CalculateInfo(QWidget):
|
|
|
1065
1078
|
:type settings: Settings
|
|
1066
1079
|
"""
|
|
1067
1080
|
|
|
1068
|
-
plan_to_edit_signal = Signal()
|
|
1081
|
+
plan_to_edit_signal = Signal(object)
|
|
1069
1082
|
|
|
1070
1083
|
def __init__(self, settings: PartSettings):
|
|
1071
1084
|
super().__init__()
|
|
@@ -1092,7 +1105,6 @@ class CalculateInfo(QWidget):
|
|
|
1092
1105
|
info_chose_layout.addWidget(self.plan_view)
|
|
1093
1106
|
info_layout.addLayout(info_chose_layout)
|
|
1094
1107
|
self.setLayout(info_layout)
|
|
1095
|
-
self.calculate_plans.addItems(sorted(self.settings.batch_plans.keys()))
|
|
1096
1108
|
self.protect = False
|
|
1097
1109
|
self.plan_to_edit = None
|
|
1098
1110
|
|
|
@@ -1104,6 +1116,7 @@ class CalculateInfo(QWidget):
|
|
|
1104
1116
|
self.import_plans_btn.clicked.connect(self.import_plans)
|
|
1105
1117
|
self.settings.batch_plans_changed.connect(self.update_plan_list)
|
|
1106
1118
|
self.plan_view.customContextMenuRequested.connect(self._context_menu)
|
|
1119
|
+
self.update_plan_list()
|
|
1107
1120
|
|
|
1108
1121
|
def _context_menu(self, point):
|
|
1109
1122
|
item = self.plan_view.itemAt(point)
|
|
@@ -1146,18 +1159,24 @@ class CalculateInfo(QWidget):
|
|
|
1146
1159
|
return None
|
|
1147
1160
|
|
|
1148
1161
|
def update_plan_list(self):
|
|
1149
|
-
new_plan_list = sorted(self.settings.batch_plans.
|
|
1162
|
+
new_plan_list = sorted(self.settings.batch_plans.items(), key=lambda x: x[0])
|
|
1150
1163
|
if self.calculate_plans.currentItem() is not None:
|
|
1151
1164
|
text = str(self.calculate_plans.currentItem().text())
|
|
1152
1165
|
try:
|
|
1153
|
-
index = new_plan_list.index(text)
|
|
1166
|
+
index = [x[0] for x in new_plan_list].index(text)
|
|
1154
1167
|
except ValueError:
|
|
1155
1168
|
index = -1
|
|
1156
1169
|
else:
|
|
1157
1170
|
index = -1
|
|
1158
1171
|
self.protect = True
|
|
1159
1172
|
self.calculate_plans.clear()
|
|
1160
|
-
|
|
1173
|
+
|
|
1174
|
+
for name, plan in new_plan_list:
|
|
1175
|
+
item = QListWidgetItem(name)
|
|
1176
|
+
if plan.is_bad():
|
|
1177
|
+
item.setIcon(QIcon(os.path.join(icons_dir, "task-reject.png")))
|
|
1178
|
+
item.setToolTip(plan.get_error_source())
|
|
1179
|
+
self.calculate_plans.addItem(item)
|
|
1161
1180
|
if index != -1:
|
|
1162
1181
|
self.calculate_plans.setCurrentRow(index)
|
|
1163
1182
|
self.protect = False
|
|
@@ -1190,7 +1209,11 @@ class CalculateInfo(QWidget):
|
|
|
1190
1209
|
res = dial.get_result()
|
|
1191
1210
|
plans, err = res.load_class.load(res.load_location)
|
|
1192
1211
|
if err:
|
|
1193
|
-
|
|
1212
|
+
error_str = "\n".join(err)
|
|
1213
|
+
show_warning("Import error", f"error during importing, part of data were filtered. {error_str}")
|
|
1214
|
+
if not plans:
|
|
1215
|
+
show_warning("Import error", "No plans were imported")
|
|
1216
|
+
return
|
|
1194
1217
|
choose = ImportDialog(plans, self.settings.batch_plans, PlanPreview, CalculationPlan)
|
|
1195
1218
|
if choose.exec_():
|
|
1196
1219
|
for original_name, final_name in choose.get_import_list():
|
|
@@ -1214,7 +1237,7 @@ class CalculateInfo(QWidget):
|
|
|
1214
1237
|
return # pragma: no cover
|
|
1215
1238
|
if text in self.settings.batch_plans:
|
|
1216
1239
|
self.plan_to_edit = self.settings.batch_plans[text]
|
|
1217
|
-
self.plan_to_edit_signal.emit()
|
|
1240
|
+
self.plan_to_edit_signal.emit(self.plan_to_edit)
|
|
1218
1241
|
|
|
1219
1242
|
def plan_preview(self, text):
|
|
1220
1243
|
if self.protect:
|
|
@@ -1223,7 +1246,8 @@ class CalculateInfo(QWidget):
|
|
|
1223
1246
|
if not text.strip():
|
|
1224
1247
|
return
|
|
1225
1248
|
plan = self.settings.batch_plans[text]
|
|
1226
|
-
|
|
1249
|
+
if not plan.is_bad():
|
|
1250
|
+
self.plan_view.set_plan(plan)
|
|
1227
1251
|
|
|
1228
1252
|
|
|
1229
1253
|
class CalculatePlaner(QSplitter):
|
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
changelog = """
|
|
2
2
|
# Changelog
|
|
3
3
|
|
|
4
|
+
## 0.15.2 - 2023-08-28
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
- Fix range threshold selection of algorithms (#1009)
|
|
9
|
+
- When run batch check if file extension is supported by loader (#1016)
|
|
10
|
+
- Do not allow to select and render corrupted batch plans (#1015)
|
|
11
|
+
|
|
12
|
+
### Testing
|
|
13
|
+
|
|
14
|
+
- \[Automatic\] Constraints upgrades: `imagecodecs`, `ipykernel`, `magicgui`, `psygnal`, `scipy`, `superqt`, `tifffile` (#1011)
|
|
15
|
+
- \[Automatic\] Constraints upgrades: `imageio`, `pyinstaller`, `tifffile` (#1018)
|
|
16
|
+
|
|
17
|
+
### Ci
|
|
18
|
+
|
|
19
|
+
- Use faster version of black (#1010)
|
|
20
|
+
- \[pre-commit.ci\] pre-commit autoupdate (#1013)
|
|
21
|
+
|
|
4
22
|
## 0.15.1 - 2023-08-09
|
|
5
23
|
|
|
6
24
|
### Bug Fixes
|
|
@@ -86,9 +86,9 @@ class CustomLoadDialog(LoadRegisterFileDialog):
|
|
|
86
86
|
history: typing.Optional[typing.List[str]] = None,
|
|
87
87
|
):
|
|
88
88
|
super().__init__(load_register, caption, parent)
|
|
89
|
-
self.setOption(QFileDialog.DontUseNativeDialog, True)
|
|
90
|
-
self.setFileMode(QFileDialog.ExistingFile)
|
|
91
|
-
self.setAcceptMode(QFileDialog.AcceptOpen)
|
|
89
|
+
self.setOption(QFileDialog.Option.DontUseNativeDialog, True)
|
|
90
|
+
self.setFileMode(QFileDialog.FileMode.ExistingFile)
|
|
91
|
+
self.setAcceptMode(QFileDialog.AcceptMode.AcceptOpen)
|
|
92
92
|
self.files_list = []
|
|
93
93
|
self.setWindowTitle("Open File")
|
|
94
94
|
if history is not None:
|
|
@@ -96,10 +96,12 @@ class CustomLoadDialog(LoadRegisterFileDialog):
|
|
|
96
96
|
self.setHistory(history)
|
|
97
97
|
|
|
98
98
|
def accept(self):
|
|
99
|
-
selected_files = [
|
|
99
|
+
selected_files = [
|
|
100
|
+
x for x in self.selectedFiles() if self.fileMode == QFileDialog.FileMode.Directory or isfile(x)
|
|
101
|
+
]
|
|
100
102
|
if not selected_files:
|
|
101
103
|
return
|
|
102
|
-
if len(selected_files) == 1 and self.fileMode != QFileDialog.Directory and isdir(selected_files[0]):
|
|
104
|
+
if len(selected_files) == 1 and self.fileMode != QFileDialog.FileMode.Directory and isdir(selected_files[0]):
|
|
103
105
|
super().accept()
|
|
104
106
|
return
|
|
105
107
|
|
|
@@ -6,7 +6,7 @@ class SearchableListWidget(QWidget):
|
|
|
6
6
|
def __init__(self, parent=None):
|
|
7
7
|
super().__init__(parent)
|
|
8
8
|
|
|
9
|
-
self.list_widget = QListWidget()
|
|
9
|
+
self.list_widget = QListWidget(self)
|
|
10
10
|
|
|
11
11
|
self.filter_widget = QLineEdit()
|
|
12
12
|
self.filter_widget.textChanged.connect(self.update_visible)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PartSeg
|
|
3
|
-
Version: 0.15.
|
|
3
|
+
Version: 0.15.2
|
|
4
4
|
Summary: PartSeg is python GUI and set of napari plugins for bio imaging analysis especially nucleus analysis,
|
|
5
5
|
Home-page: https://4dnucleome.cent.uw.edu.pl/PartSeg/
|
|
6
6
|
Author: Grzegorz Bokota
|
|
@@ -79,9 +79,9 @@ This application is designed to help biologist with segmentation based on thresh
|
|
|
79
79
|
|
|
80
80
|
- From binaries:
|
|
81
81
|
|
|
82
|
-
- [Windows](https://4dnucleome.cent.uw.edu.pl/PartSeg/Downloads/PartSeg-0.15.
|
|
83
|
-
- [Linux](https://4dnucleome.cent.uw.edu.pl/PartSeg/Downloads/PartSeg-0.15.
|
|
84
|
-
- [MacOS](https://4dnucleome.cent.uw.edu.pl/PartSeg/Downloads/PartSeg-0.15.
|
|
82
|
+
- [Windows](https://4dnucleome.cent.uw.edu.pl/PartSeg/Downloads/PartSeg-0.15.2-windows.zip) (build on Windows 10)
|
|
83
|
+
- [Linux](https://4dnucleome.cent.uw.edu.pl/PartSeg/Downloads/PartSeg-0.15.2-linux.zip) (build on Ubuntu 20.04)
|
|
84
|
+
- [MacOS](https://4dnucleome.cent.uw.edu.pl/PartSeg/Downloads/PartSeg-0.15.2-macos.zip) (build on MacOS 11)
|
|
85
85
|
There are reported problems with permissions systems on macOS. If you have problem with starting application please try to run it from terminal.
|
|
86
86
|
|
|
87
87
|
- With pip:
|
|
@@ -169,6 +169,24 @@ from 3D microscopy images for dummies. BMC Bioinformatics 22, 72 (2021).
|
|
|
169
169
|
|
|
170
170
|
## Changelog
|
|
171
171
|
|
|
172
|
+
### 0.15.2 - 2023-08-28
|
|
173
|
+
|
|
174
|
+
#### Bug Fixes
|
|
175
|
+
|
|
176
|
+
- Fix range threshold selection of algorithms (#1009)
|
|
177
|
+
- When run batch check if file extension is supported by loader (#1016)
|
|
178
|
+
- Do not allow to select and render corrupted batch plans (#1015)
|
|
179
|
+
|
|
180
|
+
#### Testing
|
|
181
|
+
|
|
182
|
+
- \[Automatic\] Constraints upgrades: `imagecodecs`, `ipykernel`, `magicgui`, `psygnal`, `scipy`, `superqt`, `tifffile` (#1011)
|
|
183
|
+
- \[Automatic\] Constraints upgrades: `imageio`, `pyinstaller`, `tifffile` (#1018)
|
|
184
|
+
|
|
185
|
+
#### Ci
|
|
186
|
+
|
|
187
|
+
- Use faster version of black (#1010)
|
|
188
|
+
- \[pre-commit.ci\] pre-commit autoupdate (#1013)
|
|
189
|
+
|
|
172
190
|
### 0.15.1 - 2023-08-09
|
|
173
191
|
|
|
174
192
|
#### Bug Fixes
|
|
@@ -240,7 +240,10 @@ package/tests/test_data/calculation_plan_0.9.2.3.json
|
|
|
240
240
|
package/tests/test_data/measurements_profile.json
|
|
241
241
|
package/tests/test_data/napari_measurements_profile.json
|
|
242
242
|
package/tests/test_data/ome.xsd.xml
|
|
243
|
+
package/tests/test_data/problematic_excel_batch.xlsx
|
|
244
|
+
package/tests/test_data/problematic_json_batch.json
|
|
243
245
|
package/tests/test_data/problematic_profile_dict.json
|
|
246
|
+
package/tests/test_data/range_profile.json
|
|
244
247
|
package/tests/test_data/sample_batch_output.xlsx
|
|
245
248
|
package/tests/test_data/segment_profile_0.9.2.3.json
|
|
246
249
|
package/tests/test_data/view_settings_v0.12.6.json
|
|
@@ -9,15 +9,13 @@ from functools import wraps
|
|
|
9
9
|
from local_migrator import REGISTER, class_to_str
|
|
10
10
|
from pydantic import BaseModel as PydanticBaseModel
|
|
11
11
|
from pydantic import create_model, validator
|
|
12
|
+
from pydantic.fields import ModelField, UndefinedType
|
|
12
13
|
from pydantic.main import ModelMetaclass
|
|
13
14
|
from typing_extensions import Annotated
|
|
14
15
|
|
|
15
16
|
from PartSegCore.utils import BaseModel
|
|
16
17
|
from PartSegImage import Channel
|
|
17
18
|
|
|
18
|
-
if typing.TYPE_CHECKING:
|
|
19
|
-
from pydantic.fields import ModelField
|
|
20
|
-
|
|
21
19
|
|
|
22
20
|
class AlgorithmDescribeNotFound(Exception):
|
|
23
21
|
"""
|
|
@@ -575,7 +573,10 @@ def _field_to_algorithm_property(name: str, field: "ModelField"):
|
|
|
575
573
|
)
|
|
576
574
|
if issubclass(field.type_, AlgorithmSelection):
|
|
577
575
|
value_type = AlgorithmDescribeBase
|
|
578
|
-
|
|
576
|
+
if isinstance(field.field_info.default, UndefinedType):
|
|
577
|
+
default_value = field.field_info.default_factory().name
|
|
578
|
+
else:
|
|
579
|
+
default_value = field.field_info.default.name
|
|
579
580
|
possible_values = field.type_.__register__
|
|
580
581
|
|
|
581
582
|
return AlgorithmProperty(
|
{PartSeg-0.15.1 → PartSeg-0.15.2}/package/PartSegCore/analysis/batch_processing/batch_backend.py
RENAMED
|
@@ -62,11 +62,10 @@ from PartSegCore.analysis.calculation_plan import (
|
|
|
62
62
|
get_save_path,
|
|
63
63
|
)
|
|
64
64
|
from PartSegCore.analysis.io_utils import ProjectTuple
|
|
65
|
-
from PartSegCore.analysis.load_functions import LoadMaskSegmentation, LoadProject
|
|
65
|
+
from PartSegCore.analysis.load_functions import LoadImageForBatch, LoadMaskSegmentation, LoadProject
|
|
66
66
|
from PartSegCore.analysis.measurement_base import has_mask_components, has_roi_components
|
|
67
67
|
from PartSegCore.analysis.measurement_calculation import MeasurementResult
|
|
68
68
|
from PartSegCore.analysis.save_functions import save_dict
|
|
69
|
-
from PartSegCore.io_utils import WrongFileTypeException
|
|
70
69
|
from PartSegCore.json_hooks import PartSegEncoder
|
|
71
70
|
from PartSegCore.mask_create import calculate_mask
|
|
72
71
|
from PartSegCore.project_info import AdditionalLayerDescription, HistoryElement
|
|
@@ -92,6 +91,25 @@ ErrorInfo = Tuple[Exception, Union[StackSummary, Tuple[Dict, StackSummary]]]
|
|
|
92
91
|
WrappedResult = Tuple[int, List[Union[ErrorInfo, ResponseData]]]
|
|
93
92
|
|
|
94
93
|
|
|
94
|
+
def get_data_loader(
|
|
95
|
+
root_type: RootType, file_path: str
|
|
96
|
+
) -> Tuple[Union[Type[LoadMaskSegmentation], Type[LoadProject], Type[LoadImageForBatch]], bool]:
|
|
97
|
+
"""
|
|
98
|
+
Get data loader for given root type. Return indicator if file extension match to loader.
|
|
99
|
+
|
|
100
|
+
:param RootType root_type: type of loader
|
|
101
|
+
:param str file_path: path to file
|
|
102
|
+
:return: Loader and indicator if file extension match to loader
|
|
103
|
+
"""
|
|
104
|
+
|
|
105
|
+
ext = path.splitext(file_path)[1].lower()
|
|
106
|
+
if root_type == RootType.Mask_project:
|
|
107
|
+
return LoadMaskSegmentation, ext in LoadMaskSegmentation.get_extensions()
|
|
108
|
+
if root_type == RootType.Project:
|
|
109
|
+
return LoadProject, ext in LoadProject.get_extensions()
|
|
110
|
+
return LoadImageForBatch, ext in LoadImageForBatch.get_extensions()
|
|
111
|
+
|
|
112
|
+
|
|
95
113
|
def prepare_error_data(exception: Exception) -> ErrorInfo:
|
|
96
114
|
try:
|
|
97
115
|
from sentry_sdk.serializer import serialize
|
|
@@ -156,21 +174,15 @@ class CalculationProcess:
|
|
|
156
174
|
@staticmethod
|
|
157
175
|
def load_data(operation, calculation: FileCalculation) -> Union[ProjectTuple, List[ProjectTuple]]:
|
|
158
176
|
metadata = {"default_spacing": calculation.voxel_size}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
if load_class.partial() or load_class.number_of_files() != 1:
|
|
163
|
-
continue
|
|
164
|
-
if ext in load_class.get_extensions():
|
|
165
|
-
return load_class.load([calculation.file_path], metadata=metadata)
|
|
166
|
-
raise ValueError("File type not supported")
|
|
167
|
-
if operation == RootType.Project:
|
|
168
|
-
return LoadProject.load([calculation.file_path], metadata=metadata)
|
|
177
|
+
|
|
178
|
+
loader, ext_match = get_data_loader(operation, calculation.file_path)
|
|
179
|
+
|
|
169
180
|
try:
|
|
170
|
-
return
|
|
171
|
-
except
|
|
172
|
-
|
|
173
|
-
|
|
181
|
+
return loader.load([calculation.file_path], metadata=metadata)
|
|
182
|
+
except Exception as e: # pragma: no cover
|
|
183
|
+
if ext_match:
|
|
184
|
+
raise e
|
|
185
|
+
raise ValueError(f"File {calculation.file_path} do not match to {operation}") from e
|
|
174
186
|
|
|
175
187
|
def do_calculation(self, calculation: FileCalculation) -> CalculationResultList:
|
|
176
188
|
"""
|
|
@@ -8,6 +8,7 @@ from abc import abstractmethod
|
|
|
8
8
|
from copy import copy, deepcopy
|
|
9
9
|
from enum import Enum
|
|
10
10
|
|
|
11
|
+
import local_migrator
|
|
11
12
|
from local_migrator import register_class, rename_key
|
|
12
13
|
from pydantic import BaseModel as PydanticBaseModel
|
|
13
14
|
|
|
@@ -289,7 +290,7 @@ class PlanChanges(Enum):
|
|
|
289
290
|
replace_node = 3 #:
|
|
290
291
|
|
|
291
292
|
|
|
292
|
-
@register_class(old_paths=["PartSeg.utils.analysis.calculation_plan.CalculationTree"])
|
|
293
|
+
@register_class(old_paths=["PartSeg.utils.analysis.calculation_plan.CalculationTree"], allow_errors_in_values=True)
|
|
293
294
|
class CalculationTree:
|
|
294
295
|
"""
|
|
295
296
|
Structure for describe calculation structure
|
|
@@ -314,6 +315,31 @@ class CalculationTree:
|
|
|
314
315
|
def as_dict(self):
|
|
315
316
|
return {"operation": self.operation, "children": self.children}
|
|
316
317
|
|
|
318
|
+
def is_bad(self):
|
|
319
|
+
return any(el.is_bad() for el in self.children) or isinstance(self.operation, dict)
|
|
320
|
+
|
|
321
|
+
def get_error_source(self):
|
|
322
|
+
res = []
|
|
323
|
+
for el in self.children:
|
|
324
|
+
res.extend(el.get_error_source())
|
|
325
|
+
if isinstance(self.operation, dict):
|
|
326
|
+
res.extend(self.get_source_error_dict(self.operation))
|
|
327
|
+
return res
|
|
328
|
+
|
|
329
|
+
@classmethod
|
|
330
|
+
def get_source_error_dict(cls, dkt):
|
|
331
|
+
if not isinstance(dkt, dict) or "__error__" not in dkt:
|
|
332
|
+
return []
|
|
333
|
+
if "not found in register" in dkt["__error__"]:
|
|
334
|
+
return [dkt["__error__"]]
|
|
335
|
+
if "__values__" not in dkt:
|
|
336
|
+
return []
|
|
337
|
+
fields = local_migrator.check_for_errors_in_dkt_values(dkt["__values__"])
|
|
338
|
+
res = []
|
|
339
|
+
for field in fields:
|
|
340
|
+
res.extend(cls.get_source_error_dict(dkt["__values__"][field]))
|
|
341
|
+
return res
|
|
342
|
+
|
|
317
343
|
|
|
318
344
|
class NodeType(Enum):
|
|
319
345
|
"""Type of node in calculation"""
|
|
@@ -466,6 +492,7 @@ class FileCalculation:
|
|
|
466
492
|
return f"FileCalculation(file_path={self.file_path}, calculation={self.calculation})"
|
|
467
493
|
|
|
468
494
|
|
|
495
|
+
@register_class(allow_errors_in_values=True)
|
|
469
496
|
class CalculationPlan:
|
|
470
497
|
"""
|
|
471
498
|
Clean description Calculation plan.
|
|
@@ -502,6 +529,12 @@ class CalculationPlan:
|
|
|
502
529
|
self.changes = []
|
|
503
530
|
self.current_node = None
|
|
504
531
|
|
|
532
|
+
def is_bad(self):
|
|
533
|
+
return self.execution_tree.is_bad()
|
|
534
|
+
|
|
535
|
+
def get_error_source(self):
|
|
536
|
+
return ", ".join(self.execution_tree.get_error_source())
|
|
537
|
+
|
|
505
538
|
def as_dict(self):
|
|
506
539
|
return {"tree": self.execution_tree, "name": self.name}
|
|
507
540
|
|
|
@@ -27,8 +27,8 @@ from PartSegCore.io_utils import (
|
|
|
27
27
|
SegmentationType,
|
|
28
28
|
WrongFileTypeException,
|
|
29
29
|
check_segmentation_type,
|
|
30
|
-
load_matadata_part,
|
|
31
30
|
load_metadata_base,
|
|
31
|
+
load_metadata_part,
|
|
32
32
|
open_tar_file,
|
|
33
33
|
proxy_callback,
|
|
34
34
|
tar_to_buff,
|
|
@@ -49,6 +49,7 @@ __all__ = [
|
|
|
49
49
|
"load_metadata",
|
|
50
50
|
"LoadMaskSegmentation",
|
|
51
51
|
"LoadProfileFromJSON",
|
|
52
|
+
"LoadImageForBatch",
|
|
52
53
|
]
|
|
53
54
|
|
|
54
55
|
from PartSegImage.image import Image
|
|
@@ -381,7 +382,7 @@ class LoadProfileFromJSON(LoadBase):
|
|
|
381
382
|
step_changed: typing.Optional[typing.Callable[[int], typing.Any]] = None,
|
|
382
383
|
metadata: typing.Optional[dict] = None,
|
|
383
384
|
) -> typing.Tuple[dict, list]:
|
|
384
|
-
return
|
|
385
|
+
return load_metadata_part(load_locations[0])
|
|
385
386
|
|
|
386
387
|
@classmethod
|
|
387
388
|
def get_name(cls) -> str:
|
|
@@ -418,3 +419,43 @@ load_dict = Register(
|
|
|
418
419
|
LoadPoints,
|
|
419
420
|
class_methods=LoadBase.need_functions,
|
|
420
421
|
)
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
class LoadImageForBatch(LoadBase):
|
|
425
|
+
@classmethod
|
|
426
|
+
def get_short_name(cls):
|
|
427
|
+
return "load_all"
|
|
428
|
+
|
|
429
|
+
@classmethod
|
|
430
|
+
def load(
|
|
431
|
+
cls,
|
|
432
|
+
load_locations: typing.List[typing.Union[str, BytesIO, Path]],
|
|
433
|
+
range_changed: typing.Optional[typing.Callable[[int, int], typing.Any]] = None,
|
|
434
|
+
step_changed: typing.Optional[typing.Callable[[int], typing.Any]] = None,
|
|
435
|
+
metadata: typing.Optional[dict] = None,
|
|
436
|
+
) -> typing.Union[ProjectTuple, typing.List[ProjectTuple]]:
|
|
437
|
+
ext = os.path.splitext(load_locations[0])[1].lower()
|
|
438
|
+
|
|
439
|
+
for loader in load_dict.values():
|
|
440
|
+
if loader.partial() or loader.number_of_files() != 1:
|
|
441
|
+
continue
|
|
442
|
+
if ext in loader.get_extensions():
|
|
443
|
+
res = loader.load([load_locations[0]], metadata=metadata)
|
|
444
|
+
if isinstance(res, list):
|
|
445
|
+
return [cls._clean_project(x) for x in res]
|
|
446
|
+
return cls._clean_project(res)
|
|
447
|
+
raise ValueError(f"Cannot load file {load_locations[0]}")
|
|
448
|
+
|
|
449
|
+
@staticmethod
|
|
450
|
+
def _clean_project(project: ProjectTuple):
|
|
451
|
+
return ProjectTuple(file_path=project.file_path, image=project.image.substitute(mask=None))
|
|
452
|
+
|
|
453
|
+
@classmethod
|
|
454
|
+
def get_name(cls) -> str:
|
|
455
|
+
ext_set = set()
|
|
456
|
+
for loader in load_dict.values():
|
|
457
|
+
if loader.partial() or loader.number_of_files() != 1:
|
|
458
|
+
continue
|
|
459
|
+
ext_set.update(loader.get_extensions())
|
|
460
|
+
|
|
461
|
+
return f"Load generic ({' '.join(f'*{x}' for x in ext_set)})"
|