Files
MayoStainHelper/core/camera/base_camera.py

23 lines
481 B
Python

from abc import ABC, abstractmethod
from PySide6.QtCore import Signal
class BaseCamera(ABC):
def __init__(self) -> None:
self.error_msg = None
@abstractmethod
def connect(self) -> bool:
raise NotImplementedError
@abstractmethod
def disconnect(self) -> None:
raise NotImplementedError
@abstractmethod
def get_frame(self):
raise NotImplementedError
def get_error_msg(self):
return str(self.error_msg)