Slide objects should have a method that returns an iterator over "chunks" so that the image can be processed chunk-wise instead of loading the entire thing into memory.
Abstract method should be implemented in BaseSlide, but each slide type (e.g. HESlide, MultiparametricSlide) may have to be implement differently based on backend (e.g. openslide or bioformats)
Pseudocode:
slide = HESlide("/path/to/image.svs")
for chunk in slide.generate_chunks(level=0, size=1024, ...):
# operate on each 1024x1024 chunk
preprocess(chunk)
Slide objects should have a method that returns an iterator over "chunks" so that the image can be processed chunk-wise instead of loading the entire thing into memory. Abstract method should be implemented in
BaseSlide
, but each slide type (e.g.HESlide
,MultiparametricSlide
) may have to be implement differently based on backend (e.g. openslide or bioformats)Pseudocode: