Best way to scale high resolution images without losing information

Hello everyone,

I have a quick question for those who have experience working with high-resolution biological images. I am currently working on a project that requires me to use skeletonize 3D on a stack of about 2000 8-bit images that are 2560 x 2568 pixels in height and width and I cannot seem to process them without using up all the available RAM on my computer and having to stop the program. The easiest solution to this problem seems to be scaling the images so that they use less RAM. However, I’m not sure of the best way to reduce the size of these images without losing information. The Resize plugin seems to be fairly good at this as it can resize the images to about 1/2 the original size without losing much information at all. However, it still seems like this might be too large to process. Does anyone here have any suggestions? I’m fairly new to fiji and don’t know all the applications that might be available to help with procedures like this one. Any help would be great. If you have any questions that I can clarify, please let me know, thank you!

Sincerely,

Brendyn Miller

You can open your stack as a Virtual stack if that fits your purpose without the need to resize the stack images:

http://imagej.net/docs/guide/146-8.html

Virtual stacks are disk resident (as opposed to RAM[?] resident) and are the only way to load image sequences that do not fit in RAM.

Please note that:

Virtual stacks are read-only, so changes made to the pixel data are not
saved when you switch to a different slice. You can work around this by
using macros (e.g., Process Virtual Stack) or the Process▷Batch▷Virtual Stack…↓ command

So, e.g., you can load and edit a stack slice which then can be saved to disk. Search for ImageJ VirtualStacks and you will find some examples, e.g.:

http://imagej.net/macros/Process_Virtual_Stack.txt

Note: With the ImageJ2 API (Scifio, ImageLib2) there are also other ways available to read in chunks of multidimensional image data, see this discussion:

http://forum.image.sc/t/reading-subregions-of-very-large-images/1048/4

Actually, virtual stacks can be Read+Write in Fiji/ImageJ2. Try turning on SCIFIO in Edit > Options > ImageJ2, or opening directly with File > Open > Image... with Image Mode = Cell:

This might create other issues… :smile: but the intent is to make virtual stacks a thing of the past via automatic disk caching of individual slices.

4 Likes

Great! Thanks for the advice guys, I’ll look into that. Does the virtual stack work for procedures like the partical analyzer from the BoneJ plugin? Just curious, cause I’m looking into running some geometric analyses on the stack once I’ve processed it. Thanks!

Eventually if macros are supported.

Have also a look at the 3D Objects counter plugin.