Skip to content

Commit 9b5645e

Browse files
Merge pull request #979 from annie-xd-wang/add-saving-option-to-the-feature-Snap
2 parents 3bb4763 + 46b35f1 commit 9b5645e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/navigate/model/features/common_features.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class Snap:
162162
data capture process, specifically the main data capture function.
163163
"""
164164

165-
def __init__(self, model):
165+
def __init__(self, model, saving_flag=False):
166166
"""Initialize the Snap class.
167167
168168
Parameters:
@@ -173,6 +173,9 @@ def __init__(self, model):
173173
#: MicroscopeModel: The microscope model associated with the data capture.
174174
self.model = model
175175

176+
#: bool: Saving each frames
177+
self.saving_flag = saving_flag
178+
176179
#: dict: A dictionary defining the configuration for the data capture process.
177180
self.config_table = {"data": {"main": self.data_func}}
178181

@@ -192,6 +195,8 @@ def data_func(self, frame_ids):
192195
bool
193196
A boolean value indicating the success of the data capture process.
194197
"""
198+
if self.saving_flag:
199+
self.model.mark_saving_flags(frame_ids)
195200
self.model.logger.info(
196201
f"the camera is:{self.model.active_microscope_name}, {frame_ids}"
197202
)

0 commit comments

Comments
 (0)