Changeset 6326


Ignore:
Timestamp:
05/17/10 01:04:55 (9 years ago)
Author:
curtis
Message:

Initial, naive implementation of color modes.

Location:
trunk/components/loci-plugins/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/loci-plugins/src/loci/plugins/in/ColorDialog.java

    r6324 r6326  
    9595    GenericDialog gd = new GenericDialog("Bio-Formats Custom Colorization"); 
    9696 
    97     // CTR TODO - avoid problem with MAX_SLIDERS in GenericDialog 
     97    // CTR FIXME - avoid problem with MAX_SLIDERS in GenericDialog 
    9898    final ImageProcessorReader reader = process.getReader(); 
    9999    final List<Panel> swatches = new ArrayList<Panel>(); 
  • trunk/components/loci-plugins/src/loci/plugins/in/ImagePlusReader.java

    r6324 r6326  
    2626package loci.plugins.in; 
    2727 
     28import ij.CompositeImage; 
    2829import ij.ImagePlus; 
    2930import ij.ImageStack; 
     
    3334import ij.process.FloatProcessor; 
    3435import ij.process.ImageProcessor; 
     36import ij.process.LUT; 
    3537import ij.process.ShortProcessor; 
    3638 
     
    149151    } 
    150152 
    151     // TODO - colorize 
    152  
    153153    // concatenate compatible images 
    154154    if (options.isConcatenate()) imps = new Concatenator().concatenate(imps); 
     155 
     156    // colorize images, as appropriate 
     157    // CTR FIXME - various problems with color mode 
     158    int mode = -1; 
     159    LUT[] luts = null; 
     160    if (options.isColorModeComposite()) mode = CompositeImage.COMPOSITE; 
     161    else if (options.isColorModeColorized()) mode = CompositeImage.COLOR; 
     162    else if (options.isColorModeGrayscale()) mode = CompositeImage.GRAYSCALE; 
     163    else if (options.isColorModeCustom()) mode = CompositeImage.COLOR; 
     164    if (mode != -1) { 
     165      List<ImagePlus> compositeImps = new ArrayList<ImagePlus>(); 
     166      for (ImagePlus imp : imps) { 
     167        CompositeImage compImage = new CompositeImage(imp, mode); 
     168        if (luts != null) compImage.setLuts(luts); 
     169        compositeImps.add(compImage); 
     170      } 
     171      imps = compositeImps; 
     172    } 
    155173 
    156174    // split dimensions, as appropriate 
     
    428446    //  String mergeOptions = windowless ? options.getMergeOption() : null; 
    429447    //  imp = Colorizer.colorize(imp, true, stackOrder, null, r.getSeries(), mergeOptions, options.isViewHyperstack()); 
    430     //  // CTR TODO finish this 
     448    //  // CTR FIXME finish this 
    431449    //  if (WindowManager.getCurrentImage().getID() != imp.getID()) imp.close(); 
    432450    //} 
  • trunk/components/loci-plugins/src/loci/plugins/in/SeriesDialog.java

    r6280 r6326  
    7878    super(process); 
    7979  } 
    80    
     80 
    8181  // -- ImporterDialog methods -- 
    82    
     82 
    8383  @Override 
    8484  protected boolean needPrompt() { 
    85     // CTR TODO - eliminate weird handling of series string here 
     85    // CTR FIXME - eliminate weird handling of series string here 
    8686    String seriesString = options.getSeries(); 
    8787    if (process.isWindowless()) { 
     
    110110      !options.openAllSeries() && !options.isViewNone(); 
    111111  } 
    112    
     112 
    113113  @Override 
    114114  protected GenericDialog constructDialog() { 
    115     // -- CTR TODO - refactor series-related options into SeriesOptions class 
     115    // -- CTR FIXME - refactor series-related options into SeriesOptions class 
    116116    // has a normalize(IFormatReader) method 
    117117    // call both before and after the dialog here... 
     
    181181    return gd; 
    182182  } 
    183    
     183 
    184184  @Override 
    185185  protected boolean displayDialog(GenericDialog gd) { 
     
    193193    return !gd.wasCanceled(); 
    194194  } 
    195    
     195 
    196196  @Override 
    197197  protected boolean harvestResults(GenericDialog gd) { 
     
    244244      masterPanel.add(p[i]); 
    245245    } 
    246      
     246 
    247247    GridBagLayout gdl = (GridBagLayout) gd.getLayout(); 
    248248    GridBagConstraints gbc = new GridBagConstraints(); 
  • trunk/components/loci-plugins/src/plugins.config

    r6229 r6326  
    55# LOCI Plugins for ImageJ: a collection of ImageJ plugins including the 
    66# Bio-Formats Importer, Bio-Formats Exporter, Bio-Formats Macro Extensions, 
    7 # Data Browser, Stack Colorizer and Stack Slicer. Copyright (C) 2005-@year@ 
     7# Data Browser and Stack Slicer. Copyright (C) 2005-@year@ 
    88# Melissa Linkert, Curtis Rueden and Christopher Peterson. 
    99# 
     
    2424#Plugins>LOCI, "Bio-Formats Master Importer", loci.plugins.LociImporter("") 
    2525 
    26 Plugins>LOCI, "Data Browser", loci.plugins.LociImporter("location=[Local machine] view=[Data Browser] stack_order=[XYCZT] group_files=true use_virtual_stack=true ") 
    2726Plugins>LOCI, "Bio-Formats Importer", loci.plugins.LociImporter("location=[Local machine] windowless=false ") 
    2827Plugins>LOCI, "Bio-Formats Exporter", loci.plugins.LociExporter("") 
     
    3534Plugins>LOCI, "-" 
    3635Plugins>LOCI, "Stack Slicer", loci.plugins.Slicer("") 
    37 Plugins>LOCI, "Stack Colorizer", loci.plugins.colorize.Colorizer("") 
    3836 
    3937Plugins>LOCI, "-" 
Note: See TracChangeset for help on using the changeset viewer.