I have a (5GB) stacked .ndpi image. I want to extract tiles from each pyramidal image using the same technique as read_region of openslide.
I know that openslide package only open (first) one plane and I also didn’t find any code which can twitch openslide code to handle stacked image. As there is one function in openslide which is called as read_region and with the help of it we can save each dimension image file in the desired tile size.
I also know that bioformat support stacked .ndpi image. And I tried it bypassing;
img2 = bioformats.load_image(input_any2, z=0, t=0)
javabridge.jutil.JavaException: Image plane too large. Only 2GB of data can be extracted at one time. You can work around the problem by opening the plane in tiles
As error seems pretty clear, I have to open the plane in tiles. How can I do that?
I also pass this below code but the error is still the same.
stack = reader.read(c=None, z=str(z), t=0, series=0, index=None, rescale=False, wants_max_intensity=False, channel_names=None)
Error: same as above
*Image size is 186496 36608
Can anyone help me how can I open it in tiles and how do I can save this image in tiles similarly as openslide read_region function does in python environment?.
Some guidance would be very appreciated