Qupath 0.1.2 not opening tif file

Hi everyone,

I am trying to open a tif file on qupath but I keep getting this error:

INFO: Selected style: Modena Light INFO: Performing update check... INFO: Starting QuPath with parameters: [] ERROR: Openslide: Property not available: openslide.mpp-x ERROR: Openslide: Property not available: openslide.mpp-y ERROR: Openslide: Property not available: openslide.objective-power INFO: Test reading thumbnail with openslide: passed (BufferedImage@39b8f97d: type = 1 DirectColorModel: rmask=ff0000 gmask=ff00 bmask=ff amask=0 IntegerInterleavedRaster: width = 149 height = 200 #Bands = 3 xOff = 0 yOff = 0 dataOffset[0] 0) ERROR: java.lang.OutOfMemoryError: Java heap space ERROR: QuPath exception at java.awt.image.DataBufferInt.(DataBufferInt.java:75) at java.awt.image.Raster.createPackedRaster(Raster.java:467) at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1032) at java.awt.image.BufferedImage.(BufferedImage.java:324) at qupath.lib.images.servers.OpenslideImageServer.readBufferedImage(OpenslideImageServer.java:214) at qupath.lib.images.servers.OpenslideImageServer.readBufferedImage(OpenslideImageServer.java:1) at qupath.lib.images.stores.AbstractImageRegionStore.getThumbnail(AbstractImageRegionStore.java:354) at qupath.lib.gui.QuPathGUI.createNewImageData(QuPathGUI.java:2269) at qupath.lib.gui.QuPathGUI.createNewImageData(QuPathGUI.java:2258) at qupath.lib.gui.QuPathGUI.openImage(QuPathGUI.java:2236) at qupath.lib.gui.QuPathGUI.openImage(QuPathGUI.java:2152) at qupath.lib.gui.commands.OpenCommand.run(OpenCommand.java:51) at qupath.lib.gui.QuPathGUI.lambda$createCommandAction$46(QuPathGUI.java:3122) at qupath.lib.gui.QuPathGUI$$Lambda$89/906019746.accept(Unknown Source) at org.controlsfx.control.action.Action.handle(Action.java:419) at org.controlsfx.control.action.Action.handle(Action.java:64) at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191) at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58) at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114) at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74) at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49) at javafx.event.Event.fireEvent(Event.java:198) at javafx.scene.control.MenuItem.fire(MenuItem.java:462) at com.sun.javafx.scene.control.skin.ContextMenuContent$MenuItemContainer.doSelect(ContextMenuContent.java:1405) at com.sun.javafx.scene.control.skin.ContextMenuContent$MenuItemContainer.lambda$createChildren$343(ContextMenuContent.java:1358) at com.sun.javafx.scene.control.skin.ContextMenuContent$MenuItemContainer$$Lambda$683/456326166.handle(Unknown Source) at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218) at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238) at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)

Any insight on the given errors would be great. Thank you!

I suspect you need to increase the amount of memory available to QuPath within the Help->Setup options menu, or you need a computer with additional memory.

I suspect your image isn’t pyramidal (with multiple resolution levels), but rather just a single, very large 2D image. So the entire image needs to be read into memory that that doesn’t work.

Can you share the file, or say more about where it came from, e.g. a whole slide scanner, or somewhere else?
Do you know is it an RGB image (normal for brightfield, e.g. H&E) or not (e.g. fluorescence)?

Hi Pete,

Sorry for the late response but I allocated more memory for qupath and it did open however I don’t know whether or not that means my image is actually pyramidal. The file itself comes from a program that should convert images to pyramidal structured tifs. Also it is a brightfield image.

Try running this script:

print getCurrentImageData().getServer().getPreferredDownsamples()

If it prints [1] then it’s not pyramidal.

(Note that QuPath now shows you the downsamples for the pyramidal levels under the ‘Image’ tab, but v0.1.2 doesn’t)

Hi Pete,

I ran the script and it seems that the image I am trying to work with is in fact not pyramidal. For future reference, what should the output of the script be if the image is pyramidal?

More numbers than just 1, it would be [1, 4, 16] or something like that. Your numbers may vary.

1 Like