Login  Register

Virtual Hypervolumes

Posted by Jeff Brandenburg on Aug 08, 2005; 7:29pm
URL: http://imagej.273.s1.nabble.com/Virtual-Hypervolumes-tp3705071.html

Our group is working with some time series of fairly large image
volumes (512^3x16-bit, 512MB).  In the near future, we may be working
with time series of 1024^3x16-bit data.  Obviously, we like to use
virtual stacks. :-)

I found that it's very easy to change Patrick Pirrotte & Jerome
Mutterer's HyperVolume Browser plugin to use a virtual stack.  As
distributed, the plug-in copies the current stack, and opens a new
window on the copy:

     void initFrame(){

         int w = imp1.getWidth();
         int h = imp1.getHeight();
         ImageStack stack2 = new ImageStack(w,h);
         for (int i=1; i<=stackSize; i++) {
             IJ.showStatus(i+"/"+stackSize);
             stack2.addSlice(null,stack1.getProcessor(i));
             IJ.showProgress((double)i/stackSize);
         }
         ImageProcessor ip;
         imp2 = new ImagePlus(imp1.getTitle(), stack2);
         CustomCanvas cc = new CustomCanvas(imp2);
         new CustomWindow(imp2, cc);
     }

Of course, this doesn't work very well when the original stack is too
large to fit into memory.  But when I modify initFrame as follows:

     void initFrame(){
         imp1.hide();       // Let's not have two windows open on one
stack.
         imp1.setSlice(1);  // Otherwise things get confusing.
         CustomCanvas cc = new CustomCanvas(imp1);
         new CustomWindow(imp1, cc);
     }

... I get a HyperVolume Browser window on the original stack, even if
the original stack is virtual.  I haven't exercised it exhaustively to
see whether I've broken anything, but it does let us browse a virtual
hypervolume, which is what we needed.  (Kudos to the original authors
for writing code that's simple enough to allow, and robust enough to
withstand, my ham-handed hacking!)

If there's enough interest in this, I'd be happy to post a modified
version of the plugin; I could even add a checkbox in the opening
dialog to let you select whether you'd rather copy or close the
original stack window, or just automatically do the stack-jacking
behavior if the original stack is virtual.

I'd love to do the same thing for Image5D, but that looks like a much
bigger job!  Joachim, is this something you'd be interested in
supporting?  Those 5D stacks get awfully big, awfully quickly...!
--
        -jeffB (Jeff Brandenburg, Duke Center for In-Vivo Microscopy)