Create a stack folder and copy the middle image to image_dir
This commit is contained in:
parent
0b7a817674
commit
ade713b6d0
2 changed files with 46 additions and 8 deletions
|
|
@ -45,6 +45,7 @@ ZStackDep = direct_thing_client_dependency(ZStackThing, "/z_stack/")
|
|||
IMAGE_REGEX = re.compile(r"-?[0-9]+_-?[0-9]+\.jpeg$")
|
||||
|
||||
|
||||
|
||||
def unpack_autofocus(scan_data):
|
||||
"""Extract z, sharpness data from a move_and_measure call
|
||||
|
||||
|
|
@ -589,7 +590,16 @@ class SmartScanThing(Thing):
|
|||
current_pos_xyz, imaged=True, focused=focused
|
||||
)
|
||||
|
||||
self._z_stack.smart_stack(images_dir = self._ongoing_scan_images_dir)
|
||||
site_folder = os.path.join(
|
||||
self._ongoing_scan_images_dir,
|
||||
"stacks",
|
||||
f"{new_pos_xyz[0]}_{new_pos_xyz[1]}",
|
||||
)
|
||||
os.makedirs(site_folder, exist_ok=True)
|
||||
self._z_stack.smart_stack(
|
||||
images_dir=self._ongoing_scan_images_dir,
|
||||
stack_dir=site_folder,
|
||||
)
|
||||
|
||||
# increment capure counter as thread has completed
|
||||
self._scan_images_taken += 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue