3.2 years ago by
I tried loading your image but could not reproduce the described behavior. I tried this on a Windows 7 x64 machine with 8GB RAM running R 3.2.5 with the same package versions installed as you are using. Things work fine under 64-bit R, while under 32-bit R I get the same error message as Dan.
How much memory does your machine have? You might be running out of memory, but even then this should result in an error message rather than an unresponsive system.
Once loaded into R, your image data takes up 1.1GB of RAM. This is also the size of the list returned by
readTIFF which is called internally by
readImage. However, before assigning this list to the data slot of the Image object some additional transformations are necessary: conversion into an array and transposition of the spatial dimensions. Unfortunately, these intermediate steps introduce temporary data copies increasing the total memory consumption. I'm not sure whether the memory footprint of
readImage could be significantly improved, but even if, you will most probably run into similar issues as soon as you try to do some computations on the object.
To circumvent the problem, I suggest you either try running your script on a more powerful machine equipped with more memory, or subset the image stack. For example, have a look at RBioFormats (https://github.com/aoles/RBioFormats) which offers functionality to load a subset of frames from multi-frame images.