Reducing the Memory Footprint
Currently, SNAP requires 6 bytes per voxel: two for greyscale image, two for segmentation and two for the undo buffer. For very large images, this is a problem, even on 64bit machines with lots of memory. So we propose to cut this memory usage.
Undo buffer
This is easy to reduce. Right now we store a copy of the image before the last update in order to compute the diff following the update. We should be able to only store the region containing the last update in memory. That would reduce memory usage dramatically.
Segmentation Buffer
It's feasible to grow the segmentation buffer on demand. This would require some creative coding but would not be unreasonable. It's not clear how valuable this is in the long run, though, since people use SNAP to segment images.