Removed stitching path as kwarg for scanning
This commit is contained in:
parent
576161e543
commit
44f2435ea4
4 changed files with 7 additions and 22 deletions
|
|
@ -7,12 +7,7 @@
|
||||||
"/camera_stage_mapping/": "openflexure_microscope_server.things.camera_stage_mapping:CameraStageMapper",
|
"/camera_stage_mapping/": "openflexure_microscope_server.things.camera_stage_mapping:CameraStageMapper",
|
||||||
"/system_control/": "openflexure_microscope_server.things.system_control:SystemControlThing",
|
"/system_control/": "openflexure_microscope_server.things.system_control:SystemControlThing",
|
||||||
"/settings/": "openflexure_microscope_server.things.settings_manager:SettingsManager",
|
"/settings/": "openflexure_microscope_server.things.settings_manager:SettingsManager",
|
||||||
"/smart_scan/": {
|
"/smart_scan/": "openflexure_microscope_server.things.smart_scan:SmartScanThing",
|
||||||
"class": "openflexure_microscope_server.things.smart_scan:SmartScanThing",
|
|
||||||
"kwargs": {
|
|
||||||
"path_to_openflexure_stitch": "openflexure-stitch"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/background_detect/": "openflexure_microscope_server.things.background_detect:BackgroundDetectThing",
|
"/background_detect/": "openflexure_microscope_server.things.background_detect:BackgroundDetectThing",
|
||||||
"/capture/": "openflexure_microscope_server.things.capture:CaptureThing"
|
"/capture/": "openflexure_microscope_server.things.capture:CaptureThing"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,7 @@
|
||||||
"/camera_stage_mapping/": "openflexure_microscope_server.things.camera_stage_mapping:CameraStageMapper",
|
"/camera_stage_mapping/": "openflexure_microscope_server.things.camera_stage_mapping:CameraStageMapper",
|
||||||
"/system_control/": "openflexure_microscope_server.things.system_control:SystemControlThing",
|
"/system_control/": "openflexure_microscope_server.things.system_control:SystemControlThing",
|
||||||
"/settings/": "openflexure_microscope_server.things.settings_manager:SettingsManager",
|
"/settings/": "openflexure_microscope_server.things.settings_manager:SettingsManager",
|
||||||
"/smart_scan/": {
|
"/smart_scan/": "openflexure_microscope_server.things.smart_scan:SmartScanThing",
|
||||||
"class": "openflexure_microscope_server.things.smart_scan:SmartScanThing",
|
|
||||||
"kwargs": {
|
|
||||||
"path_to_openflexure_stitch": "openflexure-stitch"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/background_detect/": "openflexure_microscope_server.things.smart_scan:BackgroundDetectThing",
|
"/background_detect/": "openflexure_microscope_server.things.smart_scan:BackgroundDetectThing",
|
||||||
"/api_test/": "openflexure_microscope_server.things.test:APITestThing"
|
"/api_test/": "openflexure_microscope_server.things.test:APITestThing"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -7,12 +7,7 @@
|
||||||
"/camera_stage_mapping/": "openflexure_microscope_server.things.camera_stage_mapping:CameraStageMapper",
|
"/camera_stage_mapping/": "openflexure_microscope_server.things.camera_stage_mapping:CameraStageMapper",
|
||||||
"/system_control/": "openflexure_microscope_server.things.system_control:SystemControlThing",
|
"/system_control/": "openflexure_microscope_server.things.system_control:SystemControlThing",
|
||||||
"/settings/": "openflexure_microscope_server.things.settings_manager:SettingsManager",
|
"/settings/": "openflexure_microscope_server.things.settings_manager:SettingsManager",
|
||||||
"/smart_scan/": {
|
"/smart_scan/": "openflexure_microscope_server.things.smart_scan:SmartScanThing",
|
||||||
"class": "openflexure_microscope_server.things.smart_scan:SmartScanThing",
|
|
||||||
"kwargs": {
|
|
||||||
"path_to_openflexure_stitch": "openflexure-stitch"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/background_detect/": "openflexure_microscope_server.things.smart_scan:BackgroundDetectThing",
|
"/background_detect/": "openflexure_microscope_server.things.smart_scan:BackgroundDetectThing",
|
||||||
"/api_test/": "openflexure_microscope_server.things.test:APITestThing"
|
"/api_test/": "openflexure_microscope_server.things.test:APITestThing"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,7 @@ JPEGBlob = blob_type("image/jpeg")
|
||||||
ZipBlob = blob_type("application/zip")
|
ZipBlob = blob_type("application/zip")
|
||||||
IMG_DIR_NAME = "images"
|
IMG_DIR_NAME = "images"
|
||||||
SCAN_DATA_FILENAME = "scan_data.json"
|
SCAN_DATA_FILENAME = "scan_data.json"
|
||||||
|
STITCHING_CMD = "openflexure-stitch"
|
||||||
|
|
||||||
SCAN_ZERO_PAD_DIGITS = 4
|
SCAN_ZERO_PAD_DIGITS = 4
|
||||||
|
|
||||||
|
|
@ -112,8 +113,7 @@ def _scan_running(method):
|
||||||
|
|
||||||
|
|
||||||
class SmartScanThing(Thing):
|
class SmartScanThing(Thing):
|
||||||
def __init__(self, path_to_openflexure_stitch: str):
|
def __init__(self):
|
||||||
self._stitching_script = path_to_openflexure_stitch
|
|
||||||
self._preview_stitch_popen = None
|
self._preview_stitch_popen = None
|
||||||
self._preview_stitch_popen_lock = threading.Lock()
|
self._preview_stitch_popen_lock = threading.Lock()
|
||||||
self._scan_lock = threading.Lock()
|
self._scan_lock = threading.Lock()
|
||||||
|
|
@ -958,7 +958,7 @@ class SmartScanThing(Thing):
|
||||||
with self._preview_stitch_popen_lock:
|
with self._preview_stitch_popen_lock:
|
||||||
self._preview_stitch_popen = Popen(
|
self._preview_stitch_popen = Popen(
|
||||||
[
|
[
|
||||||
self._stitching_script,
|
STITCHING_CMD,
|
||||||
"--stitching_mode",
|
"--stitching_mode",
|
||||||
"only_stage_stitch",
|
"only_stage_stitch",
|
||||||
"--minimum_overlap",
|
"--minimum_overlap",
|
||||||
|
|
@ -1072,7 +1072,7 @@ class SmartScanThing(Thing):
|
||||||
self.run_subprocess(
|
self.run_subprocess(
|
||||||
logger,
|
logger,
|
||||||
[
|
[
|
||||||
self._stitching_script,
|
STITCHING_CMD,
|
||||||
"--stitching_mode",
|
"--stitching_mode",
|
||||||
"all",
|
"all",
|
||||||
f"{tiff_arg}",
|
f"{tiff_arg}",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue