|
13 | 13 | try: |
14 | 14 | import PySpin # can be downloaded from |
15 | 15 | # https://www.teledynevisionsolutions.com/products/spinnaker-sdk/ |
16 | | - import numpy as np |
17 | 16 | USE_PYSPIN = True |
18 | 17 | except ImportError: |
19 | 18 | USE_PYSPIN = False |
|
25 | 24 | logger = logging.getLogger("pylabrobot.plate_reading.biotek") |
26 | 25 |
|
27 | 26 |
|
| 27 | + |
| 28 | +SPINNAKER_COLOR_PROCESSING_ALGORITHM_HQ_LINEAR = PySpin.SPINNAKER_COLOR_PROCESSING_ALGORITHM_HQ_LINEAR if USE_PYSPIN else -1 |
| 29 | +PixelFormat_Mono8 = PySpin.PixelFormat_Mono8 if USE_PYSPIN else -1 |
| 30 | + |
| 31 | + |
| 32 | + |
28 | 33 | class Cytation5Backend(ImageReaderBackend): |
29 | 34 | """Backend for biotek cytation 5 image reader. |
30 | 35 |
|
@@ -583,8 +588,8 @@ async def set_imaging_mode(self, mode: ImagingMode) -> bool: |
583 | 588 |
|
584 | 589 | async def _acquire_image( |
585 | 590 | self, |
586 | | - color_processing_algorithm: int = PySpin.SPINNAKER_COLOR_PROCESSING_ALGORITHM_HQ_LINEAR, |
587 | | - pixel_format: int = PySpin.PixelFormat_Mono8, |
| 591 | + color_processing_algorithm: int = SPINNAKER_COLOR_PROCESSING_ALGORITHM_HQ_LINEAR, |
| 592 | + pixel_format: int = PixelFormat_Mono8, |
588 | 593 | ) -> List[List[float]]: |
589 | 594 | nodemap = self.cam.GetNodeMap() |
590 | 595 |
|
@@ -631,8 +636,8 @@ async def capture( |
631 | 636 | exposure_time: Exposure, |
632 | 637 | focal_height: FocalHeight, |
633 | 638 | gain: Gain, |
634 | | - color_processing_algorithm: int = PySpin.SPINNAKER_COLOR_PROCESSING_ALGORITHM_HQ_LINEAR, |
635 | | - pixel_format: int = PySpin.PixelFormat_Mono8, |
| 639 | + color_processing_algorithm: int = SPINNAKER_COLOR_PROCESSING_ALGORITHM_HQ_LINEAR, |
| 640 | + pixel_format: int = PixelFormat_Mono8, |
636 | 641 | ) -> List[List[float]]: |
637 | 642 | """Capture image using the microscope |
638 | 643 |
|
|
0 commit comments