# Path: pylinac/core/image_generator/layers.py
# class Layer(ABC):
#     """Abstract base for layers"""
# 
#     @abstractmethod
#     def apply(
#         self, image: np.ndarray, pixel_size: float, mag_factor: float
#     ) -> np.ndarray:
#         """Apply the layer. Takes a 2D array and pixel size value in and returns a modified array."""
#         pass


from abc import ABC
from typing import Tuple
from pydicom.dataset import Dataset, FileMetaDataset
from pylinac.core.image_generator.layers import Layer
import numpy as np




class Simulator(ABC):
    """Abstract class for an image simulator"""
    pixel_size: float
    shape: Tuple[int, int]

    def __init__(self, sid: float = 1500):
        """

        Parameters
        ----------
        sid
            Source to image distance in mm.
        """
        self.image = np.zeros(self.shape, np.uint16)
        self.sid = sid
        self.mag_factor = sid / 1000


# Path: pylinac/core/image_generator/layers.py
# class Layer(ABC):
#     """Abstract base for layers"""
# 
#     @abstractmethod
#     def apply(
#         self, image: np.ndarray, pixel_size: float, mag_factor: float
#     ) -> np.ndarray:
#         """Apply the layer. Takes a 2D array and pixel size value in and returns a modified array."""
#         pass


# Path: pylinac/core/image_generator/simulators.py
from abc import ABC
from typing import Tuple
from pydicom.dataset import Dataset, FileMetaDataset
from pylinac.core.image_generator.layers import Layer
import numpy as np





class Simulator(ABC):
    """Abstract class for an image simulator"""
    pixel_size: float
    shape: Tuple[int, int]

    def __init__(self, sid: float = 1500):
        """

        Parameters
        ----------
        sid
            Source to image distance in mm.
        """
        self.image = np.zeros(self.shape, np.uint16)
        self.sid = sid
        self.mag_factor = sid / 1000


    def add_layer(self, layer: Layer) -> None: