Login  Register

Re: How do I disable the automatic generation of Hyperstacks?

Posted by Mark Longair-2 on Jun 20, 2008; 11:16am
URL: http://imagej.273.s1.nabble.com/How-do-I-disable-the-automatic-generation-of-Hyperstacks-tp3695817p3695822.html

aRnim <[hidden email]> wrote:
[..]
> I think most of us ImageJ-users love ImageJ for the direct
> access to their data, now with the hyperstacks there was an an
> unwanted layer introduced into the data access. I think this
> was a step in the wrong direction. Am I alone with this
> perception?
[..]

I like the interface for viewing multiple channels in a
hyperstack now that I'm used to it, but I think the introduction
of this new type of image has caused a great deal of confusion
to the users that I know, and potentially creates a lot of work
for people who write plugins.  I hope it will be helpful if I
describe some of the problems that I've seen people have, since
there seems to have been very little discussion of this on the
list so far.

 - Confusion over the terminology - the terms "hyperstack" seems
   to be clearly defined in the documentation as an image (a
   single ImagePlus object?) with 4 or 5 dimensions.  "composite
   image" isn't clear to me, though, since it seems to be
   sometimes used synomymously with "hyperstack" and many people
   seem to use the term (presumably incorrectly?) to mean a
   COLOR_RGB image.

 - If a user loads a file for a multi-channel image and for the
   first time gets a hyperstack rather than multiple images, the
   first thing they're likely to want to do is to turn it back
   into the form the they are used to, as Arnim described.  It's
   not obvious how to do this, however, since the "Hyperstack to
   Stack" command suprisingly produces a single stack with
   slices of the original two channels interleaved.  ("RGB
   Split" has the right effect here, as the documentation
   explains and Wayne mentioned, but since what people see
   doesn't look like an RGB image to them, it's likely to take
   some trial and error to discover this.)

 - Paths through the user interface that used to work for people
   no longer do.  For example, many people are accustomed to
   using "RGB Merge" to produce an RGB image from multiple image
   stacks, each representing a channel.  If they do this now
   then there is a new option ("Create Composite Image") which
   is selected by default.  This option causes the error:

     java.lang.IllegalArgumentException: Argument out of range: 1
     at ij.ImageStack.getProcessor(ImageStack.java:232)
     at ij.plugin.RGBStackMerge.createComposite(RGBStackMerge.java:142)
     at ij.plugin.RGBStackMerge.mergeStacks(RGBStackMerge.java:102)
     ...

   Furthermore, one of the source images will have been affected
   so that subsequently running "RGB Merge" without that option
   selected will fail until the source images are reloaded.

   If the user's source image is a hyperstack rather than
   multiple images (and they persist even though they can't
   select different images for different channels) then the same
   error occurs.  If they don't have the "Create Composite
   Image" option selected then the results are a composite image
   of double the depth with interleaved slices from both
   channels - again, suprising behaviour.

 - The "Channels" dialog is essential for working with
   hyperstacks, but takes people some time to discover.  Perhaps
   either this could be launched from a button alongside the new
   channel slider or be given a more suggestive name in the
   menus?  e.g. if were renamed "Channel Display Options" and
   moved to the top of the hyperstacks menu?  (Also the "More"
   popup menu is essentially redundant since, if I understand
   correctly, only one of "Make Composite" and "Convert to RGB"
   will do anything for any given image, and "Open HeLa Cells"
   doesn't need to be there.)

 - It's not clear what plugin writers have to do in order to
   update their code to properly support hyperstacks.
   (Obviously there are a huge number of plugins that will need
   to be updated in this way.)  It would make life slightly
   easier if there were were a method in ij.CompositeImage that
   returned an array of one ImagePlus object per channel to
   create a simple way to apply your old code to CompositeImage
   objects without running into the "interleaved slices"
   problem.  I've attached a patch against ImageJ 1.41e that
   adds this method, and a new source tree with the patch
   applied can be found here:

      http://longair.net/ij141e-src-with-split-channels.zip

The "RGB Merge" issue is clearly just a bug, but I think it's
worth mentioning in the same context since it affects the user
experience of hyperstacks.

regards,
mark

P.S. For people having problems with this kind of thing, the
documentation here is helpful on the subject hyperstacks:

   http://rsb.info.nih.gov/ij/docs/menus/image.html#hyperstacks


split-channels.patch (2K) Download Attachment