navigate.model.features.remove_empty_tiles.DetectTissueInStackAndReturn
- class navigate.model.features.remove_empty_tiles.DetectTissueInStackAndReturn(model, planes=1, percentage=0.75, detect_func=None)
Bases:
DetectTissueInStack
- __init__(model, planes=1, percentage=0.75, detect_func=None)
Initialize the DetectTissueInStackAndReturn class.
Parameters:
- modelobject
The model object representing the microscope.
- planesint, optional
The number of Z planes to capture in the stack. Default is 1.
- percentagefloat, optional
The minimum percentage of tissue required to consider a frame as having tissue. Default is 0.75 (75%).
- detect_funcfunction, optional
The custom tissue detection function to use. If not specified, the default detect_tissue function will be used.
Methods
__init__
(model[, planes, percentage, ...])Initialize the DetectTissueInStackAndReturn class.
Data processing function to end the data phase.
Signal processing function to end the signal phase.
in_func_data
(frame_ids)Data processing function to analyze image frames for tissue presence.
Signal processing function to move the microscope stage.
Initialization function for data processing.
Initialization function for signal processing.
Return the result if there is an tissue
Attributes
- end_func_data()
Data processing function to end the data phase.
- This method is called to determine whether the data phase should end. It checks
if the specified number of frames have been received.
Returns:
- bool
True if the data phase should end, False otherwise.
- end_func_signal()
Signal processing function to end the signal phase.
This method is called to determine whether the signal phase should end. It checks if the specified number of Z planes have been scanned.
Returns:
- bool
True if the signal phase should end, False otherwise.
- in_func_data(frame_ids)
Data processing function to analyze image frames for tissue presence.
This method is called during the data processing phase to analyze image frames for tissue presence. It checks if any of the received frames contain sufficient tissue.
Parameters:
- frame_idslist
A list of frame IDs to analyze.
Returns:
- bool
True if tissue is detected, False otherwise.
- in_func_signal()
Signal processing function to move the microscope stage.
- This method is called during the signal processing phase to move the microscope
stage to the specified Z and F positions. It increments the Z and F positions for each scan.
- pre_func_data()
Initialization function for data processing.
This method is called at the beginning of the data processing phase and initializes variables for tracking received frames and tissue detection.
Returns:
None
- pre_func_signal()
Initialization function for signal processing.
This method is called at the beginning of the signal processing phase and initializes the necessary parameters for moving the microscope stage.
- signal_response_func()
Return the result if there is an tissue
- detect_func
The tissue detection function used to analyze image frames.
- Type:
function
- model
The model object representing the microscope.
- Type:
navigate.model.Model
- planes
The number of Z planes to capture in the stack.
- Type:
int