I am using libvips to get pyramids of .ndpi images.
through this answer and searching the documentation I found this command
vips extract_area myimage.ndpi[level=0] mypyramid.dz 0 0 10000 10000
Which extracts a crop starting at 0 0 and size 10000 10000 to a dzi file.
The level
parameter is the magnification, 0 is the highest.
The problem is that the ndpi has the following images inside:
- myimage_macro.tif
- myimage_map.tif
- myimage_x0.15625_z0.tif
- myimage_x0.625_z0.tif
- myimage_x10_z0.tif
- myimage_x2.5_z0.tif
- myimage_x40_z0.tif
And vips is taking myimage_macro.tif
while I need myimage_x40_z0.tif
There should be a parameter like level to choose which from the images inside the OpenSlide (ndpi) I want.
Some people ask. Why not extracting the tif and then running vips?
Well, because vips tells me this:
openslide2vips: opening slide: No such value: directory 0, tag 278
Which means that using ndpisplit to extract the tif is somehow not saving the metadata to allow vips to recognize the image
So I am in a bit of a pesky situation. I have enormous images and I need to extract a slightly less enourmous piece and then have its pyramid.
Please help me, right now I am basically coding it all my self and it works but it is EXTREMELY slow.