navigate.model.features.volume_search.VolumeSearch
- class navigate.model.features.volume_search.VolumeSearch(model, target_resolution='Nanoscale', target_zoom='N/A', flipx=False, flipy=False, overlap=0.1, debug=False)
Bases:
object
VolumeSearch.
Find the outer boundary of a tissue, moving the stage through z. Assumes there is no tissue out-of-frame in the x,y-directions.
Construct a list of stage positions that will tile the entire tissue boundary in x,y,z at target_resolution, target_zoom. Current resolution and zoom is self.model.active_microscope_name and self.model.configuration[“experiment”][“MicroscopeState”][“zoom”].
- __init__(model, target_resolution='Nanoscale', target_zoom='N/A', flipx=False, flipy=False, overlap=0.1, debug=False)
Initialize VolumeSearch
- Parameters:
model (navigate.model.model.Model) – Navigate Model
target_resolution (str) – Name of microscope to use for tiled imaging of tissue
target_zoom (str) – Resolution of microscope (target_resolution) to use for tiled imaging of tissue
flipx (bool) – Flip the direction in which new tiles are added.
flipy (bool) – Flip the direction in which new tiles are added.
overlap (float) – Value between 0 and 1 indicating percent overlap of tiles.
debug (bool) – If True, save debug images to disk.
Methods
__init__
(model[, target_resolution, ...])Initialize VolumeSearch
cleanup
()Cleanup function
data_func
(frame_ids)Data function.
End data function.
Initialize data function
Initialize signal function
Signal end function.
Signal function.
signal_response_func
(*args)Signal response function.
Attributes
Navigate Model
Name of microscope to use for tiled imaging of tissue
Resolution of microscope (target_resolution) to use for tiled imaging
Number of z-steps to take
Size of z-step
Current z-position
Size of focus step
Current focus position
Current z-index
Current z-index
1 if flipx is False, -1 if flipx is True
1 if flipy is False, -1 if flipy is True
Percent overlap of tiles
Queue for communicating whether tissue was found
1 if moving up, -1 if moving down
True if tissue was found
Boundary of tissue
Boundary of tissue
True if the search is complete
Feature configuration
True if debug mode is enabled
Debug image
- cleanup()
Cleanup function
- data_func(frame_ids)
Data function.
Find the tissue boundary in the current frame.
- Parameters:
frame_ids (list) – List of frame ids to process.
- Returns:
True if the data function should be called again.
- Return type:
bool
- end_data_func()
End data function.
Map the tissue boundary to stage positions.
- Returns:
True if the search is complete.
- Return type:
bool
- init_data_func()
Initialize data function
- pre_signal_func()
Initialize signal function
- signal_end()
Signal end function.
Check if the search is complete.
- Returns:
True if the search is complete.
- Return type:
bool
- signal_func()
Signal function.
Move the stage to the next z-position.
- Returns:
True if the signal function should be called again.
- Return type:
bool
- signal_response_func(*args)
Signal response function.
Check if tissue was found. If not, move the stage to the next z-position.
- Returns:
True if the signal function should be called again.
- Return type:
bool
- config_table
Feature configuration
- Type:
dict
- curr_z_index
Current z-index
- Type:
int
- debug
True if debug mode is enabled
- Type:
bool
- direction
1 if moving up, -1 if moving down
- Type:
int
- end_flag
True if the search is complete
- Type:
bool
- f_offset
Current z-index
- Type:
int
- f_pos
Current focus position
- Type:
float
- f_step_size
Size of focus step
- Type:
float
- first_boundary
Boundary of tissue
- Type:
dict
- has_tissue
True if tissue was found
- Type:
bool
- has_tissue_queue
Queue for communicating whether tissue was found
- Type:
Queue
- model
Navigate Model
- overlap
Percent overlap of tiles
- Type:
float
- pre_boundary
Boundary of tissue
- Type:
dict
- sinx
1 if flipx is False, -1 if flipx is True
- Type:
int
- siny
1 if flipy is False, -1 if flipy is True
- Type:
int
- target_resolution
Name of microscope to use for tiled imaging of tissue
- Type:
str
- target_zoom
Resolution of microscope (target_resolution) to use for tiled imaging
- Type:
str
- volumes_selected
Debug image
- Type:
np.ndarray
- z_pos
Current z-position
- Type:
float
- z_step_size
Size of z-step
- Type:
float
- z_steps
Number of z-steps to take
- Type:
int