Hi,
I'm currently working on a computer that has only a few free GB on its hard drive. I'm downsizing large images (16000x16000 px, 2.5 GB) and noticed that the free space on the HD seemed to drop by around the same amount (2.5 GB) when resizing an image. I guess it has to do with the undo buffer, because I found this in the IJ changelog : 1.45a 6 February 2011 The Edit>Undo command is, in most cases, undoable. Added the "Keep multiple undo buffers" option to the Edit>Options>Memory dialog box. and 1.44f, 22 August 2010 Thanks to Michael Schmid, Image>Adjust>Size and Image>Scale have "Average when downsizing" options and Image>Adjust>Size supports Undo. Is there any way to disable the undo buffer so that it doesn't write very large amounts of data to the HD (in general this seems to slows things a lot, when it's not just crashing because of my lack of free space)? As of IJ 1.46h on OSX (Fiji distro), I don't find the "Keep multiple undo buffers" option to the Edit>Options>Memory dialog box. Thanks for your help, Christophe |
On Mar 4, 2012, at 4:49 AM, Christophe Leterrier wrote:
> Hi, > > I'm currently working on a computer that has only a few free GB on its > hard drive. I'm downsizing large images (16000x16000 px, 2.5 GB) and > noticed that the free space on the HD seemed to drop by around the > same amount (2.5 GB) when resizing an image. I guess it has to do with > the undo buffer, because I found this in the IJ changelog : Try disabling the "Average when downsizing" option and not using Bicubic interpolation. Both of these options require extra memory. Using "Average when downsizing" and Bicubic interpolation, memory usage (as shown my Plugins>Utilities>Monitor Memory) peaks at 2936MB when resizing a 16000x16000 RGB image (977MB) to 4000x4000. With "Average when downsizing" disabled and Bilinear interpolation, memory usage peaks at only 1044MB. Or use the Averaging Reducer plugin at http://rsbweb.nih.gov/ij/plugins/reducer.html to downsize using binning. It downsizes without using extra memory. Image undo buffers are in memory so they should not require disk space. Perhaps the OS your are using is allocating disk space as a backing store to the memory used by ImageJ. -wayne > 1.45a 6 February 2011 > The Edit>Undo command is, in most cases, undoable. > Added the "Keep multiple undo buffers" option to the > Edit>Options>Memory dialog box. > > and > > 1.44f, 22 August 2010 > Thanks to Michael Schmid, Image>Adjust>Size and Image>Scale have > "Average when downsizing" options and Image>Adjust>Size supports Undo. > > Is there any way to disable the undo buffer so that it doesn't write > very large amounts of data to the HD (in general this seems to slows > things a lot, when it's not just crashing because of my lack of free > space)? As of IJ 1.46h on OSX (Fiji distro), I don't find the "Keep > multiple undo buffers" option to the Edit>Options>Memory dialog box. > > Thanks for your help, > > Christophe |
In reply to this post by lechristophe
Hi Christophe,
a few thoughts on this: ImageJ does not use the disk for undo buffers. Your operating system may swap parts of the memory used by ImageJ or other programs onto the harddisk if there is not enough space in RAM. So, the best strategy would be to have no other programs than ImageJ open while handling large images (or buy more RAM). The "Keep multiple undo buffers" option only makes a difference if you have several images open at the same time. If it is unchecked (which is the default), selecting an image different from the current one deletes the undo buffer of the image that goes to the background. I don't know why this option is not present in Fiji. The only workaround (without accessing it an a plugin) I see is opening your IJ_Prefs.txt file with a text editor (while ImageJ is NOT running), locate the line starting with prefs.options= and checking whether the number there is larger than 2^30 = 1073741824. If it is, the "Keep multiple undo buffers" is enabled, and you can replace it by the same number minus 1073741824 to disable that option. Under Mac OS X, IJ_Prefs.txt is under the users Library/Preferences; under Windows in the ImageJ Program directory. There is a Prefs setting, 'disableUndo', accessible from plugins, which reduces the amount of memory needed for operations that do not require an Undo Buffer for operation, such as the Process>Math operations and the Rank Filters (mean, minimum, maximum, median). I don't think that it would help when resizing images, because the original image must be present in memory anyhow until the smaller image has been created. An 8-bit image, 16k * 16k has 256 MB size; an RGB image 16k * 16 k has 1 GB. If you have 2.5 GB, do you have a stack? In ImageJ, there is no undo on stacks anyhow, so Undo is not an issue. Hope this helps, Michael ________________________________________________________________________ On Sun, March 4, 2012 10:49, Christophe Leterrier wrote: > Hi, > > I'm currently working on a computer that has only a few free GB on its > hard drive. I'm downsizing large images (16000x16000 px, 2.5 GB) and > noticed that the free space on the HD seemed to drop by around the > same amount (2.5 GB) when resizing an image. I guess it has to do with > the undo buffer, because I found this in the IJ changelog : > > 1.45a 6 February 2011 > The Edit>Undo command is, in most cases, undoable. > Added the "Keep multiple undo buffers" option to the > Edit>Options>Memory dialog box. > > and > > 1.44f, 22 August 2010 > Thanks to Michael Schmid, Image>Adjust>Size and Image>Scale have > "Average when downsizing" options and Image>Adjust>Size supports Undo. > > Is there any way to disable the undo buffer so that it doesn't write > very large amounts of data to the HD (in general this seems to slows > things a lot, when it's not just crashing because of my lack of free > space)? As of IJ 1.46h on OSX (Fiji distro), I don't find the "Keep > multiple undo buffers" option to the Edit>Options>Memory dialog box. > > Thanks for your help, > > Christophe > |
In reply to this post by Rasband, Wayne (NIH/NIMH) [E]
Thank you Wayne ! I guess the problem I had is a swapping issue. The binning reducer looks like what I'm looking for.
Cheers, Christophe Le 4 mars 2012 à 18:00, "Rasband, Wayne (NIH/NIMH) [E]" <[hidden email]> a écrit : > On Mar 4, 2012, at 4:49 AM, Christophe Leterrier wrote: > >> Hi, >> >> I'm currently working on a computer that has only a few free GB on its >> hard drive. I'm downsizing large images (16000x16000 px, 2.5 GB) and >> noticed that the free space on the HD seemed to drop by around the >> same amount (2.5 GB) when resizing an image. I guess it has to do with >> the undo buffer, because I found this in the IJ changelog : > > Try disabling the "Average when downsizing" option and not using Bicubic interpolation. Both of these options require extra memory. Using "Average when downsizing" and Bicubic interpolation, memory usage (as shown my Plugins>Utilities>Monitor Memory) peaks at 2936MB when resizing a 16000x16000 RGB image (977MB) to 4000x4000. With "Average when downsizing" disabled and Bilinear interpolation, memory usage peaks at only 1044MB. > > Or use the Averaging Reducer plugin at > > http://rsbweb.nih.gov/ij/plugins/reducer.html > > to downsize using binning. It downsizes without using extra memory. > > Image undo buffers are in memory so they should not require disk space. Perhaps the OS your are using is allocating disk space as a backing store to the memory used by ImageJ. > > -wayne > > >> 1.45a 6 February 2011 >> The Edit>Undo command is, in most cases, undoable. >> Added the "Keep multiple undo buffers" option to the >> Edit>Options>Memory dialog box. >> >> and >> >> 1.44f, 22 August 2010 >> Thanks to Michael Schmid, Image>Adjust>Size and Image>Scale have >> "Average when downsizing" options and Image>Adjust>Size supports Undo. >> >> Is there any way to disable the undo buffer so that it doesn't write >> very large amounts of data to the HD (in general this seems to slows >> things a lot, when it's not just crashing because of my lack of free >> space)? As of IJ 1.46h on OSX (Fiji distro), I don't find the "Keep >> multiple undo buffers" option to the Edit>Options>Memory dialog box. >> >> Thanks for your help, >> >> Christophe |
Free forum by Nabble | Edit this page |