Closed AdvancedImagingUTSW closed 2 months ago
@dpshepherd @SJShep
According to @annie-xd-wang, this feature sequence will get you most of the way there. It does not check for the presence of tissue, but does everything else.
[{"name": PrepareNextChannel,},({"name": MoveToNextPositionInMultiPositionTable,"args": (None,None,None,),},{"name": CalculateFocusRange,},{"name": ZStackAcquisition,"args": (True,True,"z-stack",),},{"name": WaitToContinue,},{"name": LoopByCount,"args": ("experiment.MicroscopeState.multiposition_count",),},),]
This one ties it all together. The first popup window shows the overall logic, but does not include what happens within the DetectTissueAndReturn
feature.
If you click on DetectTissueAndReturn
, it will show the logic within it. Here, it is set to look at 2 planes, which is the same as the first and last z-positions. You can add your own function to do the segmentation. If it is None
it is just an Otsu, but this is done on a per-image basis without knowledge of brightness history. It is thus not the best thing possible.
For Percentage
, 1 = 100%. This is the threshold amount of the image that needs to be occupied by tissue in order to return True. If True, it then runs the CalculateFocusRange
, acquires a ZStackAcquisition
, and then WaitToContinue
which enables large stage movements without camera timeouts.
Thank you @annie-xd-wang @AdvancedImagingUTSW, I will try implementing on our end and let you know how it goes.
@SJShep & @dpshepherd - Any luck?
Pending update, used as an opportunity to place the example in the documentation here. If anything is not exactly correct, we will have to update it accordingly.
Request from @SJShep.
What would it take for us to create a feature sequence where we perform an autofocus measurement for every position in the multi-position table? We would...
F_Start
positionF_End
position.To make it even better, we could evaluate if the tissue is present or not before running the autofocus routine...
F_Start
positionF_End
position.