class documentation
class Slide(ABC):
Known subclasses: polygeist.slidecore.slide.AperioSlide, polygeist.slidecore.slide.SyntheticSlide
Slide abstract base class to allow consistent access to real and synthetic data.
| Method | __init__ |
Instantiate the Slide object (load from a file). |
| Method | get |
Return the slice at the given resolution. |
| Instance Variable | calibration |
Undocumented |
| Instance Variable | window |
Undocumented |
| Method | _calc |
Calculate final image size based on the size of the pixels |
| Instance Variable | _px |
Undocumented |
@abstractmethod
def get_slide_with_pixel_resolution_in_microns(self, microns=0.504):
def get_slide_with_pixel_resolution_in_microns(self, microns=0.504):
Return the slice at the given resolution.
| Parameters | |
| microns | Resolution (float) |
| Returns | |
| The resampled block from the slice (np.array) | |
def _calc_size(self, x, y, microns):
Calculate final image size based on the size of the pixels
| Parameters | |
x:int | Original size x (int) |
y:int | Original size y (int) |
microns:float | Size of pixels |
| Returns | |
| Scaled dimensions (int, int) | |