Changeset 3924


Ignore:
Timestamp:
04/15/08 16:25:31 (12 years ago)
Author:
curtis
Message:

Fix from Wayne Rasband to use CompositeImage if available.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/plugins/Importer.java

    r3866 r3924  
    674674      if (IJ.getVersion().compareTo("1.39l") >= 0) { 
    675675        boolean hyper = options.isViewHyperstack() || options.isViewBrowser(); 
     676        if (nChannels > 1 && imp.getBitDepth() != 24) { 
     677          // open multichannel image as a composite image 
     678          ReflectedUniverse ru = new ReflectedUniverse(); 
     679          try { 
     680            ru.exec("import ij.CompositeImage"); 
     681            ru.setVar("imp", imp); 
     682            imp = (ImagePlus) ru.exec( 
     683              "new CompositeImage(imp, CompositeImage.COLOR)"); 
     684          } 
     685          catch (ReflectException exc) { 
     686            // problem creating composite image; ignore for now 
     687            LogTools.println(exc); 
     688          } 
     689        } 
    676690        imp.setOpenAsHyperStack(hyper); 
    677691      } 
Note: See TracChangeset for help on using the changeset viewer.