If you stitch large images, you’ve likely seen the “Image will be Loaded Progressively” message when loading a stitched file which has a size greater then the computer’s available memory.
Why do stitched images have size limits, whereas stack files, or standard ND2 site acquired files don’t? The answer is file paging. Basically, as you view an image from a stack, only that view is opened into memory (usually with a few images ahead of and behind the current image. Therefore the total image size may be 2TB, but the opened image(s) are only sitting in a few hundred kb of active memory. As you play the image sequence, or allow the computer to process the image sequence, each new chunk of images is opened, viewed, and then released during playback. This technique avoids the limits of 32 bit PC’s.
The tough part is, that this is not possible with a large image. In order for the image to be used in processing, the entire filesize needs to be opened at once into the program. This means that if you’ve acquired a 4gb image, you’ll need 4gb of free (not total) memory to view that image. Actually more, as processing software needs room to add layers like a binary, regions and so on.
So, the bottom line these days is that it’s obvious you’ll need a lot of memory working with stitched files, therefore if you are using stitched files you should use a x64 OS, which will allow you memory size of 32Gb and up.
Opening Elements up to more memory:
By default, Elements will only use a predetermined amount of memory. Fortunately the engineers allowed the user to have control of what this memory size is! You can increase the maximum allowable memory size for your program, by using the following code in a macro, or at the command line:
SetMaxMemoryImageSize(1073741824);
The number in the () is the Byte value or one Gigabyte. My computer has 16 GB, but I prefer to limit the filesize as a) I can increase it if needed and b) I’ll avoid approaching the max size of my PC and crash, when running processing operations.
Keep in mind, setting this size beyond your available memory will likely cause Elements to crash! On the other hand, I’ve seen several cases where files were just a little bit larger than the default limit, and increasing the limit allowed the operator to open the large file and process it, without chopping it up!
To make life easier on those who don’t want to code anything, I’ve made a small macro to do this operation. The macro also converts MB into Bytes, so you don’t have to worry about that part.
-Austin
Leave a Reply