Changeset 3371


Ignore:
Timestamp:
11/14/07 17:46:19 (12 years ago)
Author:
melissa
Message:

Check pixel type before doing user-specified merge; don't pass merge_option to Colorizer if we are using the non-windowless plugin.

Location:
trunk/loci/plugins
Files:
2 edited

Legend:

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

    r3365 r3371  
    181181        if (mergeOption != null) { 
    182182          if (mergeOption.indexOf("2 channels") != -1) { 
    183             newImp = makeRGB(newImp, stack, 2); 
     183            if (imp.getType() == ImagePlus.GRAY8) { 
     184              newImp = makeRGB(newImp, stack, 2); 
     185            } 
     186            else { 
     187              newImp = new CustomImage(imp, stackOrder, nSlices, 
     188                nTimes * planes1, 2, true); 
     189            } 
    184190          } 
    185191          else if (mergeOption.indexOf("3 channels") != -1) { 
    186             newImp = makeRGB(newImp, stack, 3); 
     192            if (imp.getType() == ImagePlus.GRAY8) { 
     193              newImp = makeRGB(newImp, stack, 3); 
     194            } 
     195            else { 
     196              newImp = new CustomImage(imp, stackOrder, nSlices, 
     197                nTimes * planes2, 3, true); 
     198            } 
    187199          } 
    188200          else if (mergeOption.indexOf("4 channels") != -1) { 
  • trunk/loci/plugins/Importer.java

    r3365 r3371  
    644644    if (!concatenate && mergeChannels) imp.show(); 
    645645 
    646     if (mergeChannels) { 
     646    if (mergeChannels && options.isWindowless()) { 
    647647      IJ.runPlugIn("loci.plugins.Colorizer", "stack_order=" + stackOrder + 
    648648        " merge=true merge_option=[" + options.getMergeOption() + "]"); 
     649    } 
     650    else if (mergeChannels) { 
     651      IJ.runPlugIn("loci.plugins.Colorizer", "stack_order=" + stackOrder + 
     652        " merge=true "); 
    649653    } 
    650654 
Note: See TracChangeset for help on using the changeset viewer.