class HistoScanWorkflow(RectGridWorkflow[
A workflow optimised for scanning Histopathology samples.
This workflow automatically plans its own path around a sample spiralling out from the centre position, scanning only where it detects sample.
| Method | acquisition |
Perform acquisition routine. This is run at each scan location. |
| Method | all |
Return the workflow and stitching settings. |
| Method | check |
Before starting a scan, check that background and camera-stage-mapping are set. |
| Method | create |
Set up the parameters used for all stacks in a scan. |
| Method | new |
Return a new scan planner object. |
| Method | pre |
Autofocus before starting the scan. |
| Class Variable | display |
Undocumented |
| Class Variable | max |
The maximum distance in steps from the centre of the scan. |
| Class Variable | skip |
Whether to detect and skip empty fields of view. |
| Class Variable | stack |
Distance in steps between images in a z-stack. |
| Class Variable | ui |
Undocumented |
| Instance Variable | stack |
The number of images to save in a stack. |
| Instance Variable | stack |
The minimum number of images to capture in a stack. |
| Property | ready |
Whether this scanworkflow is ready to start. |
| Property | settings |
A list of PropertyControl objects to create the settings in the scan tab. |
| Class Variable | _background |
Undocumented |
Inherited from RectGridWorkflow:
| Class Variable | autofocus |
The z distance to perform an autofocus in steps. |
| Class Variable | overlap |
The fraction that adjacent images should overlap in x and y. |
| Method | _calc |
Use camera stage mapping to calculate x and y displacement from given overlap. |
| Method | _get |
Return a stitching settings model based on current settings. |
| Class Variable | _csm |
Undocumented |
Inherited from ScanWorkflow (via RectGridWorkflow):
| Class Variable | save |
A tuple of the image resolution to capture. |
| Method | _autofocus |
Autofocus and then capture, this can be used as an acquisition routine. |
| Class Variable | _autofocus |
Undocumented |
| Class Variable | _cam |
Undocumented |
| Class Variable | _planner |
Undocumented |
| Class Variable | _settings |
Undocumented |
| Class Variable | _stage |
Undocumented |
HistoScanSettingsModel, xyz_pos: tuple[ int, int, int]) -> tuple[ bool, int | None]:
(source)
¶
Perform acquisition routine. This is run at each scan location.
| Parameters | |
settings:HistoScanSettingsModel | The settings for this scan as a HistoScanSettingsModel |
xyztuple[ | The current position as a tuple or 3 ints. |
| Returns | |
tuple[ | A tuple of whether an image was taken, and the z-position for focus. If failed to find focus, returns for the focus z-position. |
str) -> tuple[ HistoScanSettingsModel, StitchingSettings]:
(source)
¶
Return the workflow and stitching settings.
| Parameters | |
imagesstr | The directory that images are to be written to. |
| Returns | |
tuple[ | A tuple containing the settings model for this workflow and the settings model for stitching. |
Before starting a scan, check that background and camera-stage-mapping are set.
- Raise error if:
- background is to be skipped but is not set
- camera stage mapping is not set
Raise warning if not using background detect that scan will go on until max steps reached
str, autofocus_dz: int, save_resolution: tuple[ int, int]) -> SmartStackParams:
(source)
¶
Set up the parameters used for all stacks in a scan.
| Parameters | |
imagesstr | the folder to save all images |
autofocusint | the range to autofocus over if a stack fails |
savetuple[ | The resolution to save the captures to disk with |
| Returns | |
SmartStackParams | A StackSmartParams object with the required parameters. |
HistoScanSettingsModel, position: Mapping[ str, int]) -> ScanPlanner:
(source)
¶
Return a new scan planner object.
| Parameters | |
settings:HistoScanSettingsModel | The settings for this scan as a HistoScanSettingsModel |
position:Mapping[ | The starting position as a mapping of axes names to int. |
| Returns | |
ScanPlanner | Undocumented |
Autofocus before starting the scan.
| Parameters | |
settings:HistoScanSettingsModel | The settings for this scan as a HistoScanSettingsModel |
Whether to detect and skip empty fields of view.
This uses the settings from the BackgroundDetectThing.
Distance in steps between images in a z-stack.
Suggested values:
- 50 for 60-100x
- 100 for 40x
- 200 for 20x
The minimum number of images to capture in a stack.
This many images are captures and tested for focus, if the focus is not central enough more images may be captured. After new images are captured, this value sets the number of images used for checking if focus is achieved.
Defaults to 9 which balances reliability and speed.