Changeset 7000


Ignore:
Timestamp:
09/28/10 11:12:48 (9 years ago)
Author:
melissa
Message:

Merged remaining ImageJ plugin changes to 4.2.

Location:
branches/4.2/components/loci-plugins
Files:
77 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/4.2/components/loci-plugins

  • branches/4.2/components/loci-plugins/build.properties

    r6678 r7000  
    99component.name           = loci_plugins 
    1010component.jar            = loci_plugins.jar 
    11 component.version        = 4.2.0 
     11component.version        = 5.0-DEV 
    1212component.classpath      = ${artifact.dir}/bio-formats.jar:\ 
    1313                           ${artifact.dir}/loci-common.jar:\ 
     
    2727component.main-class     = loci.plugins.About 
    2828component.runtime-cp     = ${component.classpath} 
     29 
     30component.junit          = true 
  • branches/4.2/components/loci-plugins/build.xml

    r6524 r7000  
    1212  <import file="${root.dir}/ant/java.xml"/> 
    1313  <property file="build.properties"/> 
    14  
    15   <target name="test" depends="jar, compile-tests" 
    16     description="run tests" if="doTests"> 
    17     <!-- overrides default 'test' target in java.xml --> 
    18  
    19     <junit> 
    20       <classpath> 
    21         <pathelement path="${component.classpath}"/> 
    22         <pathelement location="${test-classes.dir}"/> 
    23       </classpath> 
    24       <formatter type="plain" usefile="true"/> 
    25       <test name="loci.plugins.in.ImporterTest"/> 
    26     </junit> 
    27   </target> 
    2814</project> 
  • branches/4.2/components/loci-plugins/src/loci/plugins

  • branches/4.2/components/loci-plugins/src/loci/plugins/About.java

    r6589 r7000  
    3737 * 
    3838 * <dl><dt><b>Source code:</b></dt> 
    39  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/About.java">Trac</a>, 
    40  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/About.java">SVN</a></dd></dl> 
     39 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/About.java">Trac</a>, 
     40 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/About.java">SVN</a></dd></dl> 
    4141 */ 
    4242public final class About implements PlugIn { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/BF.java

    r6589 r7000  
    4141 * 
    4242 * <dl><dt><b>Source code:</b></dt> 
    43  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/BF.java">Trac</a>, 
    44  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/BF.java">SVN</a></dd></dl> 
     43 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/BF.java">Trac</a>, 
     44 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/BF.java">SVN</a></dd></dl> 
    4545 */ 
    4646public final class BF { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/LociExporter.java

    r6589 r7000  
    4141 * 
    4242 * <dl><dt><b>Source code:</b></dt> 
    43  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/LociExporter.java">Trac</a>, 
    44  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/LociExporter.java">SVN</a></dd></dl> 
     43 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/LociExporter.java">Trac</a>, 
     44 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/LociExporter.java">SVN</a></dd></dl> 
    4545 * 
    4646 * @author Melissa Linkert melissa at glencoesoftware.com 
  • branches/4.2/components/loci-plugins/src/loci/plugins/LociImporter.java

    r6589 r7000  
    3939 * 
    4040 * <dl><dt><b>Source code:</b></dt> 
    41  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/LociImporter.java">Trac</a>, 
    42  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/LociImporter.java">SVN</a></dd></dl> 
     41 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/LociImporter.java">Trac</a>, 
     42 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/LociImporter.java">SVN</a></dd></dl> 
    4343 * 
    4444 * @author Curtis Rueden ctrueden at wisc.edu 
  • branches/4.2/components/loci-plugins/src/loci/plugins/Slicer.java

    r6972 r7000  
    4545 * 
    4646 * <dl><dt><b>Source code:</b></dt> 
    47  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/Slicer.java">Trac</a>, 
    48  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/Slicer.java">SVN</a></dd></dl> 
     47 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/Slicer.java">Trac</a>, 
     48 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/Slicer.java">SVN</a></dd></dl> 
    4949 * 
    5050 * @author Melissa Linkert melissa at glencoesoftware.com 
  • branches/4.2/components/loci-plugins/src/loci/plugins/Updater.java

    r6589 r7000  
    4848 * 
    4949 * <dl><dt><b>Source code:</b></dt> 
    50  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/Updater.java">Trac</a>, 
    51  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/Updater.java">SVN</a></dd></dl> 
     50 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/Updater.java">Trac</a>, 
     51 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/Updater.java">SVN</a></dd></dl> 
    5252 * 
    5353 * @author Melissa Linkert melissa at glencoesoftware.com 
  • branches/4.2/components/loci-plugins/src/loci/plugins/config/ConfigWindow.java

    r6669 r7000  
    4040import java.util.Date; 
    4141import java.util.HashMap; 
     42import java.util.Properties; 
    4243 
    4344import javax.imageio.spi.IIORegistry; 
     
    7071 * 
    7172 * <dl><dt><b>Source code:</b></dt> 
    72  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/ConfigWindow.java">Trac</a>, 
    73  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/ConfigWindow.java">SVN</a></dd></dl> 
     73 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/ConfigWindow.java">Trac</a>, 
     74 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/ConfigWindow.java">SVN</a></dd></dl> 
    7475 * 
    7576 * @author Curtis Rueden ctrueden at wisc.edu 
     
    294295    log.println("LOCI Plugins configuration - " + new Date()); 
    295296 
     297    // list system properties 
     298    log.println(); 
     299    log.println("-- System properties --"); 
     300    Properties sysProps = System.getProperties(); 
     301    for (Object name : sysProps.keySet()) { 
     302      log.println(name + " = " + sysProps.getProperty(name.toString())); 
     303    } 
     304 
    296305    // generate list of formats 
    297306    log.println(); 
     
    326335    String qtVersion = null; 
    327336    try { 
    328       Class<?> qtToolsClass = Class.forName("loci.formats.LegacyQTTools"); 
     337      Class<?> qtToolsClass = Class.forName("loci.formats.gui.LegacyQTTools"); 
    329338      Object qtTools = qtToolsClass.newInstance(); 
    330339      Method getQTVersion = qtToolsClass.getMethod("getQTVersion"); 
  • branches/4.2/components/loci-plugins/src/loci/plugins/config/FlexWidgets.java

    r6669 r7000  
    4343 * 
    4444 * <dl><dt><b>Source code:</b></dt> 
    45  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/FlexWidgets.java">Trac</a>, 
    46  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/FlexWidgets.java">SVN</a></dd></dl> 
     45 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/FlexWidgets.java">Trac</a>, 
     46 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/FlexWidgets.java">SVN</a></dd></dl> 
    4747 * 
    4848 * @author Curtis Rueden ctrueden at wisc.edu 
  • branches/4.2/components/loci-plugins/src/loci/plugins/config/FormatEntry.java

    r6669 r7000  
    3434 * 
    3535 * <dl><dt><b>Source code:</b></dt> 
    36  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/FormatEntry.java">Trac</a>, 
    37  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/FormatEntry.java">SVN</a></dd></dl> 
     36 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/FormatEntry.java">Trac</a>, 
     37 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/FormatEntry.java">SVN</a></dd></dl> 
    3838 * 
    3939 * @author Curtis Rueden ctrueden at wisc.edu 
  • branches/4.2/components/loci-plugins/src/loci/plugins/config/IFormatWidgets.java

    r6589 r7000  
    3232 * 
    3333 * <dl><dt><b>Source code:</b></dt> 
    34  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/IFormatWidgets.java">Trac</a>, 
    35  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/IFormatWidgets.java">SVN</a></dd></dl> 
     34 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/IFormatWidgets.java">Trac</a>, 
     35 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/IFormatWidgets.java">SVN</a></dd></dl> 
    3636 * 
    3737 * @author Curtis Rueden ctrueden at wisc.edu 
  • branches/4.2/components/loci-plugins/src/loci/plugins/config/InstallWizard.java

    r6669 r7000  
    4242 * 
    4343 * <dl><dt><b>Source code:</b></dt> 
    44  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/InstallWizard.java">Trac</a>, 
    45  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/InstallWizard.java">SVN</a></dd></dl> 
     44 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/InstallWizard.java">Trac</a>, 
     45 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/InstallWizard.java">SVN</a></dd></dl> 
    4646 * 
    4747 * @author Curtis Rueden ctrueden at wisc.edu 
     
    7676    // capabilities: 
    7777 
    78     // Check for ImageJ 1.40 or newer 
     78    // Check for ImageJ 1.43 or newer 
    7979    // download and install latest ij.jar 
    8080    // don't launch ImageJ updater plugin because it might not exist 
  • branches/4.2/components/loci-plugins/src/loci/plugins/config/LibraryEntry.java

    r6669 r7000  
    3535 * 
    3636 * <dl><dt><b>Source code:</b></dt> 
    37  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/LibraryEntry.java">Trac</a>, 
    38  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/LibraryEntry.java">SVN</a></dd></dl> 
     37 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/LibraryEntry.java">Trac</a>, 
     38 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/LibraryEntry.java">SVN</a></dd></dl> 
    3939 * 
    4040 * @author Curtis Rueden ctrueden at wisc.edu 
  • branches/4.2/components/loci-plugins/src/loci/plugins/config/LociConfig.java

    r6589 r7000  
    3333 * 
    3434 * <dl><dt><b>Source code:</b></dt> 
    35  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/LociConfig.java">Trac</a>, 
    36  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/LociConfig.java">SVN</a></dd></dl> 
     35 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/LociConfig.java">Trac</a>, 
     36 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/LociConfig.java">SVN</a></dd></dl> 
    3737 * 
    3838 * @author Curtis Rueden ctrueden at wisc.edu 
  • branches/4.2/components/loci-plugins/src/loci/plugins/config/LociInstaller.java

    r6589 r7000  
    3434 * 
    3535 * <dl><dt><b>Source code:</b></dt> 
    36  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/LociInstaller.java">Trac</a>, 
    37  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/LociInstaller.java">SVN</a></dd></dl> 
     36 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/LociInstaller.java">Trac</a>, 
     37 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/LociInstaller.java">SVN</a></dd></dl> 
    3838 * 
    3939 * @author Curtis Rueden ctrueden at wisc.edu 
  • branches/4.2/components/loci-plugins/src/loci/plugins/config/ND2Widgets.java

    r6589 r7000  
    4040 * 
    4141 * <dl><dt><b>Source code:</b></dt> 
    42  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/ND2Widgets.java">Trac</a>, 
    43  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/ND2Widgets.java">SVN</a></dd></dl> 
     42 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/ND2Widgets.java">Trac</a>, 
     43 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/ND2Widgets.java">SVN</a></dd></dl> 
    4444 * 
    4545 * @author Curtis Rueden ctrueden at wisc.edu 
  • branches/4.2/components/loci-plugins/src/loci/plugins/config/PictWidgets.java

    r6589 r7000  
    4040 * 
    4141 * <dl><dt><b>Source code:</b></dt> 
    42  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/PictWidgets.java">Trac</a>, 
    43  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/PictWidgets.java">SVN</a></dd></dl> 
     42 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/PictWidgets.java">Trac</a>, 
     43 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/PictWidgets.java">SVN</a></dd></dl> 
    4444 * 
    4545 * @author Curtis Rueden ctrueden at wisc.edu 
  • branches/4.2/components/loci-plugins/src/loci/plugins/config/QTWidgets.java

    r6589 r7000  
    4040 * 
    4141 * <dl><dt><b>Source code:</b></dt> 
    42  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/QTWidgets.java">Trac</a>, 
    43  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/QTWidgets.java">SVN</a></dd></dl> 
     42 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/QTWidgets.java">Trac</a>, 
     43 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/QTWidgets.java">SVN</a></dd></dl> 
    4444 * 
    4545 * @author Curtis Rueden ctrueden at wisc.edu 
  • branches/4.2/components/loci-plugins/src/loci/plugins/config/SDTWidgets.java

    r6589 r7000  
    4040 * 
    4141 * <dl><dt><b>Source code:</b></dt> 
    42  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/SDTWidgets.java">Trac</a>, 
    43  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/SDTWidgets.java">SVN</a></dd></dl> 
     42 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/SDTWidgets.java">Trac</a>, 
     43 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/SDTWidgets.java">SVN</a></dd></dl> 
    4444 * 
    4545 * @author Curtis Rueden ctrueden at wisc.edu 
  • branches/4.2/components/loci-plugins/src/loci/plugins/config/SpringUtilities.java

    r6589 r7000  
    7070 * 
    7171 * <dl><dt><b>Source code:</b></dt> 
    72  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/SpringUtilities.java">Trac</a>, 
    73  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/SpringUtilities.java">SVN</a></dd></dl> 
     72 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/SpringUtilities.java">Trac</a>, 
     73 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/SpringUtilities.java">SVN</a></dd></dl> 
    7474 */ 
    7575public class SpringUtilities { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/config/TextAreaWriter.java

    r6589 r7000  
    3434 * 
    3535 * <dl><dt><b>Source code:</b></dt> 
    36  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/TextAreaWriter.java">Trac</a>, 
    37  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/TextAreaWriter.java">SVN</a></dd></dl> 
     36 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/TextAreaWriter.java">Trac</a>, 
     37 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/TextAreaWriter.java">SVN</a></dd></dl> 
    3838 * 
    3939 * @author Curtis Rueden ctrueden at wisc.edu 
  • branches/4.2/components/loci-plugins/src/loci/plugins/config/TiffDelegateWidgets.java

    r6589 r7000  
    4040 * 
    4141 * <dl><dt><b>Source code:</b></dt> 
    42  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/TiffDelegateWidgets.java">Trac</a>, 
    43  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/TiffDelegateWidgets.java">SVN</a></dd></dl> 
     42 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/config/TiffDelegateWidgets.java">Trac</a>, 
     43 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/config/TiffDelegateWidgets.java">SVN</a></dd></dl> 
    4444 * 
    4545 * @author Curtis Rueden ctrueden at wisc.edu 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/Calibrator.java

    r6997 r7000  
    4040 * 
    4141 * <dl><dt><b>Source code:</b></dt> 
    42  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/Calibrator.java">Trac</a>, 
    43  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/Calibrator.java">SVN</a></dd></dl> 
     42 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/Calibrator.java">Trac</a>, 
     43 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/Calibrator.java">SVN</a></dd></dl> 
    4444 */ 
    4545public class Calibrator { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/ColorDialog.java

    r6589 r7000  
    5151 * 
    5252 * <dl><dt><b>Source code:</b></dt> 
    53  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/ColorDialog.java">Trac</a>, 
    54  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/ColorDialog.java">SVN</a></dd></dl> 
     53 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/ColorDialog.java">Trac</a>, 
     54 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/ColorDialog.java">SVN</a></dd></dl> 
    5555 * 
    5656 * @author Melissa Linkert melissa at glencoesoftware.com 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/Colorizer.java

    r6950 r7000  
    5454 * 
    5555 * <dl><dt><b>Source code:</b></dt> 
    56  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/Colorizer.java">Trac</a>, 
    57  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/Colorizer.java">SVN</a></dd></dl> 
     56 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/Colorizer.java">Trac</a>, 
     57 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/Colorizer.java">SVN</a></dd></dl> 
    5858 * 
    5959 * @author Melissa Linkert melissa at glencoesoftware.com 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/Concatenator.java

    r6669 r7000  
    3636 * 
    3737 * <dl><dt><b>Source code:</b></dt> 
    38  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/Concatenator.java">Trac</a>, 
    39  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/Concatenator.java">SVN</a></dd></dl> 
     38 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/Concatenator.java">Trac</a>, 
     39 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/Concatenator.java">SVN</a></dd></dl> 
    4040 * 
    4141 * @author Curtis Rueden ctrueden at wisc.edu 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/CropDialog.java

    r6669 r7000  
    3636 * 
    3737 * <dl><dt><b>Source code:</b></dt> 
    38  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/CropDialog.java">Trac</a>, 
    39  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/CropDialog.java">SVN</a></dd></dl> 
     38 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/CropDialog.java">Trac</a>, 
     39 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/CropDialog.java">SVN</a></dd></dl> 
    4040 */ 
    4141public class CropDialog extends ImporterDialog { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/DisplayHandler.java

    r6611 r7000  
    5858 * 
    5959 * <dl><dt><b>Source code:</b></dt> 
    60  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/DisplayHandler.java">Trac</a>, 
    61  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/DisplayHandler.java">SVN</a></dd></dl> 
     60 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/DisplayHandler.java">Trac</a>, 
     61 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/DisplayHandler.java">SVN</a></dd></dl> 
    6262 * 
    6363 * @author Curtis Rueden ctrueden at wisc.edu 
     
    161161      ru.setVar("title", imp.getTitle()); 
    162162      ru.setVar("stack", imp.getStack()); 
    163       ru.setVar("sizeC", r.getSizeC()); 
    164       ru.setVar("sizeZ", r.getSizeZ()); 
    165       ru.setVar("sizeT", r.getSizeT()); 
     163      ru.setVar("sizeC", imp.getNChannels()); 
     164      ru.setVar("sizeZ", imp.getNSlices()); 
     165      ru.setVar("sizeT", imp.getNFrames()); 
    166166      ru.exec("i5d = new Image5D(title, stack, sizeC, sizeZ, sizeT)"); 
    167167      ru.setVar("cal", imp.getCalibration()); 
     
    184184    try { 
    185185      Class<?> c = Class.forName("view5d.View5D_"); 
    186       Constructor<?> con = c.getConstructor(new Class[] {String.class}); 
    187       con.newInstance(new Object[] {""}); 
     186      Constructor<?> con = c.getConstructor(); 
     187      con.newInstance(); 
    188188    } 
    189189    catch (ClassNotFoundException e) { exc = e; } 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/FilePatternDialog.java

    r6669 r7000  
    3636 * 
    3737 * <dl><dt><b>Source code:</b></dt> 
    38  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/FilePatternDialog.java">Trac</a>, 
    39  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/FilePatternDialog.java">SVN</a></dd></dl> 
     38 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/FilePatternDialog.java">Trac</a>, 
     39 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/FilePatternDialog.java">SVN</a></dd></dl> 
    4040 */ 
    4141public class FilePatternDialog extends ImporterDialog { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/IdDialog.java

    r6669 r7000  
    3535 * 
    3636 * <dl><dt><b>Source code:</b></dt> 
    37  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/IdDialog.java">Trac</a>, 
    38  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/IdDialog.java">SVN</a></dd></dl> 
     37 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/IdDialog.java">Trac</a>, 
     38 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/IdDialog.java">SVN</a></dd></dl> 
    3939 */ 
    4040public class IdDialog extends ImporterDialog { 
     
    5555  @Override 
    5656  protected boolean needPrompt() { 
    57     return !process.isWindowless() && options.getId() == null; 
     57    return options.getId() == null; 
    5858  } 
    5959 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/ImagePlusReader.java

    r6951 r7000  
    6363 * 
    6464 * <dl><dt><b>Source code:</b></dt> 
    65  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/ImagePlusReader.java">Trac</a>, 
    66  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/ImagePlusReader.java">SVN</a></dd></dl> 
     65 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/ImagePlusReader.java">Trac</a>, 
     66 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/ImagePlusReader.java">SVN</a></dd></dl> 
    6767 */ 
    6868public class ImagePlusReader implements StatusReporter { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/ImportProcess.java

    r6951 r7000  
    2929import java.util.ArrayList; 
    3030import java.util.List; 
     31import java.util.StringTokenizer; 
    3132 
    3233import loci.common.Location; 
     
    7172 * 
    7273 * <dl><dt><b>Source code:</b></dt> 
    73  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/ImportProcess.java">Trac</a>, 
    74  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/ImportProcess.java">SVN</a></dd></dl> 
     74 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/ImportProcess.java">Trac</a>, 
     75 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/ImportProcess.java">SVN</a></dd></dl> 
    7576 */ 
    7677public class ImportProcess implements StatusReporter { 
     
    180181    if (options.isWindowless()) return true; // globally windowless 
    181182    return baseReader != null && LociPrefs.isWindowless(baseReader); 
     183  } 
     184 
     185  public void setSeriesList(String seriesList) { 
     186    final int seriesCount = getSeriesCount(); 
     187    options.clearSeries(); 
     188 
     189    // remove illegal characters 
     190    seriesList = seriesList.replaceAll("[^\\d,\\-]", ""); 
     191 
     192    // parse series list 
     193    StringTokenizer st = new StringTokenizer(seriesList, ","); 
     194    while (st.hasMoreTokens()) { 
     195      final String token = st.nextToken(); 
     196      int dash = token.indexOf("-"); 
     197      if (dash < 0) { 
     198        // single number 
     199        try { 
     200          final int s = Integer.parseInt(token) - 1; 
     201          options.setSeriesOn(s, true); 
     202        } 
     203        catch (NumberFormatException exc) { 
     204          // skip invalid series number 
     205        } 
     206      } 
     207      else { 
     208        // numerical range 
     209        final String firstString = token.substring(0, dash); 
     210        final String lastString = token.substring(dash + 1); 
     211        try { 
     212          final int first = Integer.parseInt(firstString) - 1; 
     213          final int last = Integer.parseInt(lastString) - 1; 
     214          for (int s = first; s <= last; s++) { 
     215            if (s >= seriesCount) break; // skip out of bounds series 
     216            options.setSeriesOn(s, true); 
     217          } 
     218        } 
     219        catch (NumberFormatException exc) { 
     220          // skip invalid numerical range 
     221        } 
     222      } 
     223    } 
    182224  } 
    183225 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/ImportStep.java

    r6589 r7000  
    3232 * 
    3333 * <dl><dt><b>Source code:</b></dt> 
    34  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/ImportStep.java">Trac</a>, 
    35  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/ImportStep.java">SVN</a></dd></dl> 
     34 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/ImportStep.java">Trac</a>, 
     35 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/ImportStep.java">SVN</a></dd></dl> 
    3636 */ 
    3737public enum ImportStep { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/Importer.java

    r6589 r7000  
    4040 * 
    4141 * <dl><dt><b>Source code:</b></dt> 
    42  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/Importer.java">Trac</a>, 
    43  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/Importer.java">SVN</a></dd></dl> 
     42 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/Importer.java">Trac</a>, 
     43 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/Importer.java">SVN</a></dd></dl> 
    4444 * 
    4545 * @author Curtis Rueden ctrueden at wisc.edu 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/ImporterDialog.java

    r6589 r7000  
    3434 * 
    3535 * <dl><dt><b>Source code:</b></dt> 
    36  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/FilePatternDialog.java">Trac</a>, 
    37  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/FilePatternDialog.java">SVN</a></dd></dl> 
     36 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/FilePatternDialog.java">Trac</a>, 
     37 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/FilePatternDialog.java">SVN</a></dd></dl> 
    3838 */ 
    3939public abstract class ImporterDialog extends OptionsDialog { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/ImporterMetadata.java

    r6589 r7000  
    3939 * 
    4040 * <dl><dt><b>Source code:</b></dt> 
    41  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/ImporterMetadata.java">Trac</a>, 
    42  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/ImporterMetadata.java">SVN</a></dd></dl> 
     41 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/ImporterMetadata.java">Trac</a>, 
     42 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/ImporterMetadata.java">SVN</a></dd></dl> 
    4343 */ 
    4444public class ImporterMetadata extends HashMap<String, Object> { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/ImporterOptions.java

    r6669 r7000  
    4444 * 
    4545 * <dl><dt><b>Source code:</b></dt> 
    46  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/ImporterOptions.java">Trac</a>, 
    47  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/ImporterOptions.java">SVN</a></dd></dl> 
     46 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/ImporterOptions.java">Trac</a>, 
     47 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/ImporterOptions.java">SVN</a></dd></dl> 
    4848 */ 
    4949public class ImporterOptions extends OptionsList { 
     
    6565  public static final String KEY_QUIET           = "quiet"; 
    6666  //public static final String KEY_RECORD          = "record"; 
    67   public static final String KEY_SERIES          = "series"; 
    6867  public static final String KEY_SHOW_METADATA   = "showMetadata"; 
    6968  public static final String KEY_SHOW_OME_XML    = "showOMEXML"; 
     
    196195  /** Handles obsolete macro keys, for backward compatibility. */ 
    197196  public void checkObsoleteOptions() { 
    198     String options = Macro.getOptions(); 
     197    final String macroOptions = Macro.getOptions(); 
    199198 
    200199    // NB: It would be nice to remove the Standard ImageJ option someday; 
    201200    // when that happens, the following code provides support for old macros. 
    202201    // check obsolete view options 
    203     //String stackFormat = options == null ? 
    204     //  null : Macro.getValue(options, "view", null); 
     202    //String stackFormat = macroOptions == null ? 
     203    //  null : Macro.getValue(macroOptions, "view", null); 
    205204    //final String viewStandard = "Standard ImageJ"; 
    206205    //if (viewStandard.equals(stackFormat)) { 
    207206    //  // Standard ImageJ -> Hyperstack 
    208     //  options = options.replaceFirst( 
     207    //  macroOptions = macroOptions.replaceFirst( 
    209208    //    "\\[" + viewStandard + "\\]", VIEW_HYPERSTACK); 
    210     //  Macro.setOptions(options); 
     209    //  Macro.setOptions(macroOptions); 
    211210    //  setStackFormat(VIEW_HYPERSTACK); 
    212211    //} 
    213212 
    214213    // check obsolete color options 
    215     boolean mergeChannels = checkKey(options, "merge_channels"); 
    216     boolean rgbColorize = checkKey(options, "rgb_colorize"); 
    217     boolean customColorize = checkKey(options, "custom_colorize"); 
     214    final boolean mergeChannels = checkKey(macroOptions, "merge_channels"); 
     215    final boolean rgbColorize = checkKey(macroOptions, "rgb_colorize"); 
     216    final boolean customColorize = checkKey(macroOptions, "custom_colorize"); 
    218217    if (mergeChannels) setColorMode(COLOR_MODE_COMPOSITE); 
    219218    else if (rgbColorize) setColorMode(COLOR_MODE_COLORIZED); 
     
    307306  //public void setRecord(boolean b) { setValue(KEY_RECORD, b); } 
    308307 
    309   // series 
    310   public String getSeriesInfo() { return getInfo(KEY_SERIES); } 
    311   public String getSeries() { return getValue(KEY_SERIES); } 
    312   public void setSeries(String s) { setValue(KEY_SERIES, s); } 
    313  
    314308  // showMetadata 
    315309  public String getShowMetadataInfo() { return getInfo(KEY_SHOW_METADATA); } 
     
    404398  public void setSeriesOn(int s, boolean value) { 
    405399    set(seriesOn, s, value, false); 
     400  } 
     401  public void clearSeries() { 
     402    seriesOn.clear(); 
    406403  } 
    407404 
     
    486483 
    487484  /** Tests whether the given boolean key is set in the specified options. */ 
    488   private boolean checkKey(String options, String key) { 
     485  protected boolean checkKey(String options, String key) { 
    489486    if (options == null) return false; 
    490487 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/ImporterPrompter.java

    r6669 r7000  
    4444 * 
    4545 * <dl><dt><b>Source code:</b></dt> 
    46  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/ImporterPrompter.java">Trac</a>, 
    47  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/ImporterPrompter.java">SVN</a></dd></dl> 
     46 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/ImporterPrompter.java">Trac</a>, 
     47 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/ImporterPrompter.java">SVN</a></dd></dl> 
    4848 */ 
    4949public class ImporterPrompter implements StatusListener { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/LocationDialog.java

    r6589 r7000  
    3232 * 
    3333 * <dl><dt><b>Source code:</b></dt> 
    34  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/LocationDialog.java">Trac</a>, 
    35  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/LocationDialog.java">SVN</a></dd></dl> 
     34 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/LocationDialog.java">Trac</a>, 
     35 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/LocationDialog.java">SVN</a></dd></dl> 
    3636 */ 
    3737public class LocationDialog extends ImporterDialog { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/MainDialog.java

    r6669 r7000  
    5757 * 
    5858 * <dl><dt><b>Source code:</b></dt> 
    59  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/MainDialog.java">Trac</a>, 
    60  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/MainDialog.java">SVN</a></dd></dl> 
     59 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/MainDialog.java">Trac</a>, 
     60 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/MainDialog.java">SVN</a></dd></dl> 
    6161 */ 
    6262public class MainDialog extends ImporterDialog 
     
    520520 
    521521    // colorModeChoice 
    522     colorModeEnabled = !isStackImage5D && !isStackView5D; 
     522    colorModeEnabled = !isStackImage5D && !isStackView5D && !isStackStandard; 
    523523    if (!colorModeEnabled) colorModeValue = ImporterOptions.COLOR_MODE_DEFAULT; 
    524524 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/MemoryDialog.java

    r6669 r7000  
    3232 * 
    3333 * <dl><dt><b>Source code:</b></dt> 
    34  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/MemoryDialog.java">Trac</a>, 
    35  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/MemoryDialog.java">SVN</a></dd></dl> 
     34 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/MemoryDialog.java">Trac</a>, 
     35 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/MemoryDialog.java">SVN</a></dd></dl> 
    3636 */ 
    3737public class MemoryDialog extends ImporterDialog { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/RangeDialog.java

    r6669 r7000  
    3434 * 
    3535 * <dl><dt><b>Source code:</b></dt> 
    36  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/RangeDialog.java">Trac</a>, 
    37  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/RangeDialog.java">SVN</a></dd></dl> 
     36 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/RangeDialog.java">Trac</a>, 
     37 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/RangeDialog.java">SVN</a></dd></dl> 
    3838 */ 
    3939public class RangeDialog extends ImporterDialog { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/SeriesDialog.java

    r6669 r7000  
    3030import com.jgoodies.forms.layout.FormLayout; 
    3131 
     32import ij.Macro; 
    3233import ij.gui.GenericDialog; 
    3334 
     
    4243import java.awt.event.ActionEvent; 
    4344import java.awt.event.ActionListener; 
    44 import java.util.StringTokenizer; 
    4545 
    4646import javax.swing.Box; 
     
    5454 * 
    5555 * <dl><dt><b>Source code:</b></dt> 
    56  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/SeriesDialog.java">Trac</a>, 
    57  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/SeriesDialog.java">SVN</a></dd></dl> 
     56 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/SeriesDialog.java">Trac</a>, 
     57 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/SeriesDialog.java">SVN</a></dd></dl> 
    5858 */ 
    5959public class SeriesDialog extends ImporterDialog implements ActionListener { 
     
    6363  public static final int MAX_COMPONENTS = 256; 
    6464  public static final int MAX_SERIES_THUMBS = 200; 
     65  public static final int MAX_SERIES_TOGGLES = MAX_SERIES_THUMBS; 
    6566 
    6667  // -- Fields -- 
     
    8182  @Override 
    8283  protected boolean needPrompt() { 
    83     // CTR FIXME - eliminate weird handling of series string here 
    84     String seriesString = options.getSeries(); 
    85     if (process.isWindowless()) { 
    86       if (seriesString != null) { 
    87         if (seriesString.startsWith("[")) { 
    88           seriesString = seriesString.substring(1, seriesString.length() - 2); 
    89         } 
    90  
    91         // default all series to false 
    92         final int seriesCount = process.getSeriesCount(); 
    93         for (int s=0; s<seriesCount; s++) options.setSeriesOn(s, false); 
    94  
    95         // extract enabled series values from series string 
    96         StringTokenizer tokens = new StringTokenizer(seriesString, " "); 
    97         while (tokens.hasMoreTokens()) { 
    98           String token = tokens.nextToken().trim(); 
    99           int n = Integer.parseInt(token); 
    100           if (n < seriesCount) options.setSeriesOn(n, true); 
    101         } 
    102       } 
    103       options.setSeries(seriesString); 
    104       return false; 
    105     } 
    106  
    107     return process.getSeriesCount() > 1 && 
     84    return !process.isWindowless() && process.getSeriesCount() > 1 && 
    10885      !options.openAllSeries() && !options.isViewNone(); 
    10986  } 
     
    11188  @Override 
    11289  protected GenericDialog constructDialog() { 
    113     // -- CTR FIXME - refactor series-related options into SeriesOptions class 
    114     // has a normalize(IFormatReader) method 
    115     // call both before and after the dialog here... 
    116  
    11790    final int seriesCount = process.getSeriesCount(); 
    11891 
     
    139112    GenericDialog gd = new GenericDialog("Bio-Formats Series Options"); 
    140113 
    141     // NB: We need to add the checkboxes in groups, to prevent an 
    142     // exception from being thrown if there are more than 512 series. 
    143     // See also: 
    144     //   https://skyking.microscopy.wisc.edu/trac/java/ticket/408 and 
    145     //   http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5107980 
    146  
    147     final int nGroups = (seriesCount + MAX_COMPONENTS - 1) / MAX_COMPONENTS; 
    148     int nextSeries = 0; 
    149     for (int i=0; i<nGroups; i++) { 
    150       final int nRows = Math.min(MAX_COMPONENTS, seriesCount - nextSeries); 
    151       final String[] labels = new String[nRows]; 
    152       final boolean[] defaultValues = new boolean[nRows]; 
    153       for (int row=0; row<nRows; row++) { 
    154         labels[row] = process.getSeriesLabel(nextSeries); 
    155         defaultValues[row] = options.isSeriesOn(nextSeries); 
    156         nextSeries++; 
    157       } 
    158       gd.addCheckboxGroup(nRows, 1, labels, defaultValues); 
    159     } 
    160  
    161     // extract checkboxes, for "Select All" and "Deselect All" functions 
    162     boxes = WindowTools.getCheckboxes(gd).toArray(new Checkbox[0]); 
    163  
    164     // rebuild dialog so that the thumbnails and checkboxes line up correctly 
    165     rebuildDialog(gd, nGroups); 
     114    // NB: Provide individual checkboxes only when series count is manageable. 
     115    if (seriesCount < MAX_SERIES_TOGGLES) { 
     116      // NB: We need to add the checkboxes in groups, to prevent an 
     117      // exception from being thrown if there are more than 512 series. 
     118      // See also: 
     119      //   http://dev.loci.wisc.edu/trac/java/ticket/408 and 
     120      //   http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5107980 
     121 
     122      final int nGroups = (seriesCount + MAX_COMPONENTS - 1) / MAX_COMPONENTS; 
     123      int nextSeries = 0; 
     124      for (int i=0; i<nGroups; i++) { 
     125        final int nRows = Math.min(MAX_COMPONENTS, seriesCount - nextSeries); 
     126        final String[] labels = new String[nRows]; 
     127        final boolean[] defaultValues = new boolean[nRows]; 
     128        for (int row=0; row<nRows; row++) { 
     129          labels[row] = process.getSeriesLabel(nextSeries); 
     130          defaultValues[row] = options.isSeriesOn(nextSeries); 
     131          nextSeries++; 
     132        } 
     133        gd.addCheckboxGroup(nRows, 1, labels, defaultValues); 
     134      } 
     135 
     136      // extract checkboxes, for "Select All" and "Deselect All" functions 
     137      boxes = WindowTools.getCheckboxes(gd).toArray(new Checkbox[0]); 
     138 
     139      // rebuild dialog so that the thumbnails and checkboxes line up correctly 
     140      rebuildDialog(gd, nGroups); 
     141    } 
     142    else { 
     143      // too many series; display a simple text field for specifying series 
     144      gd.addMessage( 
     145        "Please specify the image series you wish to import.\n" + 
     146        "Use commas to list multiple series. You can also use\n" + 
     147        "a dash to represent a range of series. For example,\n" + 
     148        "to import series 1, 3, 4, 5, 7, 8, 9, 12, 15 & 16,\n" + 
     149        "you could write: 1, 3-5, 7-9, 12, 15-16"); 
     150      gd.addStringField("Series_list: ", "1"); 
     151    } 
    166152 
    167153    return gd; 
     
    183169  protected boolean harvestResults(GenericDialog gd) { 
    184170    final int seriesCount = process.getSeriesCount(); 
    185     String seriesString = "["; 
    186     for (int i=0; i<seriesCount; i++) { 
    187       boolean on = gd.getNextBoolean(); 
    188       options.setSeriesOn(i, on); 
    189       if (on) seriesString += i + " "; 
    190     } 
    191     seriesString += "]"; 
    192     options.setSeries(seriesString); 
     171    options.clearSeries(); 
     172 
     173    // examine series key regardless of number of series 
     174    final String macroOptions = Macro.getOptions(); 
     175    final String macroSeriesList = macroOptions == null ? null : 
     176      Macro.getValue(macroOptions, "series_list", null); 
     177    if (macroSeriesList != null) process.setSeriesList(macroSeriesList); 
     178 
     179    if (seriesCount < MAX_SERIES_TOGGLES) { 
     180      // harvest individual checkbox values 
     181      for (int i=0; i<seriesCount; i++) { 
     182        final boolean on = gd.getNextBoolean(); 
     183        if (on) options.setSeriesOn(i, on); 
     184      } 
     185    } 
     186    else { 
     187      // harvest series string 
     188      final String seriesList = gd.getNextString(); 
     189      process.setSeriesList(seriesList); 
     190    } 
     191 
     192    // examine series_XX keys regardless of number of series 
     193    if (macroOptions != null) { 
     194      for (int i=0; i<seriesCount; i++) { 
     195        final String seriesKey = "series_" + (i + 1); 
     196        final boolean on = options.checkKey(macroOptions, seriesKey); 
     197        if (on) options.setSeriesOn(i, on); 
     198      } 
     199    } 
     200 
    193201    return true; 
    194202  } 
     
    197205 
    198206  public void actionPerformed(ActionEvent e) { 
    199     String cmd = e.getActionCommand(); 
     207    final String cmd = e.getActionCommand(); 
    200208    if ("select".equals(cmd)) { 
    201209      for (int i=0; i<boxes.length; i++) boxes[i].setState(true); 
     
    219227 
    220228  private void rebuildDialog(GenericDialog gd, int buttonRow) { 
    221     // rebuild dialog using FormLayout to organize things more nicely 
     229    // rebuild dialog to organize things more nicely 
    222230 
    223231    final String cols = p == null ? "pref" : "pref, 3dlu, pref"; 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/SwapDialog.java

    r6589 r7000  
    4040 * 
    4141 * <dl><dt><b>Source code:</b></dt> 
    42  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/SwapDialog.java">Trac</a>, 
    43  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/SwapDialog.java">SVN</a></dd></dl> 
     42 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/SwapDialog.java">Trac</a>, 
     43 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/SwapDialog.java">SVN</a></dd></dl> 
    4444 */ 
    4545public class SwapDialog extends ImporterDialog implements ItemListener { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/ThumbLoader.java

    r6669 r7000  
    4747 * 
    4848 * <dl><dt><b>Source code:</b></dt> 
    49  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/ThumbLoader.java">Trac</a>, 
    50  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/ThumbLoader.java">SVN</a></dd></dl> 
     49 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/ThumbLoader.java">Trac</a>, 
     50 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/ThumbLoader.java">SVN</a></dd></dl> 
    5151 */ 
    5252public class ThumbLoader implements Runnable { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/UpgradeDialog.java

    r6971 r7000  
    3535 * 
    3636 * <dl><dt><b>Source code:</b></dt> 
    37  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/UpgradeDialog.java">Trac</a>, 
    38  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/UpgradeDialog.java">SVN</a></dd></dl> 
     37 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/in/UpgradeDialog.java">Trac</a>, 
     38 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/in/UpgradeDialog.java">SVN</a></dd></dl> 
    3939 */ 
    4040public class UpgradeDialog extends ImporterDialog { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/in/importer-options.txt

    r6669 r7000  
    168168#  <br><br>When viewing as a virtual stack with this option enabled,      \ 
    169169#  Bio-Formats will attempt to record the operations you perform. When    \ 
    170 #  you switch to a new image plane, Bio-Formats will \"play back\" those  \ 
     170#  you switch to a new image plane, Bio-Formats will "play back" those    \ 
    171171#  same operations, so that the image plane undergoes the same processing \ 
    172172#  you performed previously. In this way, the image stack should behave   \ 
     
    174174#default = false 
    175175 
    176 [series] 
    177 type = string 
    178 label = series 
    179 default = 0 
    180  
    181176[showMetadata] 
    182177type = boolean 
    183 label = Display_metadata in results window 
    184 info = <b>Display metadata in results window</b> - \ 
     178label = Display_metadata 
     179info = <b>Display metadata</b> - \ 
    185180  Reads metadata that may be contained within the file format and      \ 
    186181  displays it. You can save it as a text file or copy it from the File \ 
    187   and Edit menus specific to the ImageJ Results window. Readability    \ 
    188   depends upon the manner in which metadata is formatted in the data   \ 
    189   source. 
     182  and Edit menus specific to the "Original Metadata" window.           \ 
     183  Readability depends upon the manner in which metadata is formatted   \ 
     184  in the data source. The metadata can also be displayed by pressing   \ 
     185  "i" (Image &gt; Show Info) when the imported image is active. 
    190186default = false 
    191187 
  • branches/4.2/components/loci-plugins/src/loci/plugins/macro/LociFunctions.java

    r6993 r7000  
    5656 * 
    5757 * <dl><dt><b>Source code:</b></dt> 
    58  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/macro/LociFunctions.java">Trac</a>, 
    59  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/macro/LociFunctions.java">SVN</a></dd></dl> 
     58 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/macro/LociFunctions.java">Trac</a>, 
     59 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/macro/LociFunctions.java">SVN</a></dd></dl> 
    6060 * 
    6161 * @author Curtis Rueden ctrueden at wisc.edu 
  • branches/4.2/components/loci-plugins/src/loci/plugins/macro/MacroFunctions.java

    r6589 r7000  
    4545 * 
    4646 * <dl><dt><b>Source code:</b></dt> 
    47  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/macro/MacroFunctions.java">Trac</a>, 
    48  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/macro/MacroFunctions.java">SVN</a></dd></dl> 
     47 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/macro/MacroFunctions.java">Trac</a>, 
     48 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/macro/MacroFunctions.java">SVN</a></dd></dl> 
    4949 * 
    5050 * @author Curtis Rueden ctrueden at wisc.edu 
  • branches/4.2/components/loci-plugins/src/loci/plugins/out/Exporter.java

    r6710 r7000  
    66LOCI Plugins for ImageJ: a collection of ImageJ plugins including the 
    77Bio-Formats Importer, Bio-Formats Exporter, Bio-Formats Macro Extensions, 
    8 Data Browser and Stack Slicer. Copyright (C) 2005-@year@ Melissa Linkert, 
    9 Curtis Rueden and Christopher Peterson. 
     8Data Browser, Stack Colorizer and Stack Slicer. Copyright (C) 2005-@year@ 
     9Melissa Linkert, Curtis Rueden and Christopher Peterson. 
    1010 
    1111This program is free software; you can redistribute it and/or modify 
     
    8181 * 
    8282 * <dl><dt><b>Source code:</b></dt> 
    83  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/out/Exporter.java">Trac</a>, 
    84  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/out/Exporter.java">SVN</a></dd></dl> 
     83 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/out/Exporter.java">Trac</a>, 
     84 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/out/Exporter.java">SVN</a></dd></dl> 
    8585 * 
    8686 * @author Melissa Linkert melissa at glencoesoftware.com 
  • branches/4.2/components/loci-plugins/src/loci/plugins/prefs/BooleanOption.java

    r6589 r7000  
    3535 * 
    3636 * <dl><dt><b>Source code:</b></dt> 
    37  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/prefs/BooleanOption.java">Trac</a>, 
    38  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/prefs/BooleanOption.java">SVN</a></dd></dl> 
     37 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/prefs/BooleanOption.java">Trac</a>, 
     38 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/prefs/BooleanOption.java">SVN</a></dd></dl> 
    3939 */ 
    4040public class BooleanOption extends Option { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/prefs/Option.java

    r6589 r7000  
    3232 * 
    3333 * <dl><dt><b>Source code:</b></dt> 
    34  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/prefs/Option.java">Trac</a>, 
    35  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/prefs/Option.java">SVN</a></dd></dl> 
     34 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/prefs/Option.java">Trac</a>, 
     35 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/prefs/Option.java">SVN</a></dd></dl> 
    3636 */ 
    3737public abstract class Option { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/prefs/OptionsDialog.java

    r6589 r7000  
    3232 * 
    3333 * <dl><dt><b>Source code:</b></dt> 
    34  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/prefs/OptionsDialog.java">Trac</a>, 
    35  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/prefs/OptionsDialog.java">SVN</a></dd></dl> 
     34 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/prefs/OptionsDialog.java">Trac</a>, 
     35 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/prefs/OptionsDialog.java">SVN</a></dd></dl> 
    3636 */ 
    3737public abstract class OptionsDialog { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/prefs/OptionsList.java

    r6589 r7000  
    3838 * 
    3939 * <dl><dt><b>Source code:</b></dt> 
    40  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/prefs/OptionsList.java">Trac</a>, 
    41  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/prefs/OptionsList.java">SVN</a></dd></dl> 
     40 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/prefs/OptionsList.java">Trac</a>, 
     41 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/prefs/OptionsList.java">SVN</a></dd></dl> 
    4242 */ 
    4343public class OptionsList { 
     
    190190  } 
    191191 
     192  // -- Object API methods -- 
     193 
     194  /* @see java.lang.Object#equals(Object) */ 
     195  public boolean equals(Object o) { 
     196    if (o == null || !(o instanceof OptionsList)) return false; 
     197    OptionsList optionsList = (OptionsList) o; 
     198    if (options.size() != optionsList.options.size()) { 
     199      return false; 
     200    } 
     201    for (String key : options.keySet()) { 
     202      Option a = options.get(key); 
     203      Option b = optionsList.options.get(key); 
     204      if ((a != null && b == null) || (a == null && b != null)) { 
     205        return false; 
     206      } 
     207      else if (a == null && b == null) continue; 
     208 
     209      if ((a instanceof BooleanOption) && (b instanceof BooleanOption)) { 
     210        if (((BooleanOption) a).getValue() != ((BooleanOption) b).getValue()) { 
     211          return false; 
     212        } 
     213      } 
     214      else if ((a instanceof StringOption) && (b instanceof StringOption)) { 
     215        String aValue = ((StringOption) a).getValue(); 
     216        String bValue = ((StringOption) b).getValue(); 
     217        if (aValue == null && bValue == null) continue; 
     218        if (aValue == null) { 
     219          return false; 
     220        } 
     221        if (aValue == null || !aValue.equals(bValue)) { 
     222          return false; 
     223        } 
     224      } 
     225      else { 
     226        return false; 
     227      } 
     228    } 
     229    return true; 
     230  } 
     231 
    192232} 
  • branches/4.2/components/loci-plugins/src/loci/plugins/prefs/StringOption.java

    r6589 r7000  
    3737 * 
    3838 * <dl><dt><b>Source code:</b></dt> 
    39  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/prefs/StringOption.java">Trac</a>, 
    40  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/prefs/StringOption.java">SVN</a></dd></dl> 
     39 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/prefs/StringOption.java">Trac</a>, 
     40 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/prefs/StringOption.java">SVN</a></dd></dl> 
    4141 */ 
    4242public class StringOption extends Option { 
     
    139139  /* @see Option#parseOption(String arg) */ 
    140140  public void parseOption(String arg) { 
    141     value = Macro.getValue(arg, key, value); 
    142     if (value == null && label != null) { 
     141    String keyValue = Macro.getValue(arg, key, value); 
     142    if ((value == null || keyValue.equals(value)) && label != null) { 
    143143      value = Macro.getValue(arg, label, value); 
    144144    } 
     145    else value = keyValue; 
    145146  } 
    146147 
  • branches/4.2/components/loci-plugins/src/loci/plugins/shortcut/ShortcutPanel.java

    r6589 r7000  
    5656 * 
    5757 * <dl><dt><b>Source code:</b></dt> 
    58  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/ShortcutPanel.java">Trac</a>, 
    59  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/ShortcutPanel.java">SVN</a></dd></dl> 
     58 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/ShortcutPanel.java">Trac</a>, 
     59 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/ShortcutPanel.java">SVN</a></dd></dl> 
    6060 * 
    6161 * @author Curtis Rueden ctrueden at wisc.edu 
     
    180180  } 
    181181 
    182   public static void runPlugIn(String className, String arg) { 
    183     try { 
    184       IJ.runPlugIn(className, arg); 
    185     } 
    186     catch (Throwable t) { 
    187       WindowTools.reportException(t); 
    188     } 
     182  /** Executes the given plugin, in a separate thread. */ 
     183  public static void runPlugIn(final String className, final String arg) { 
     184    // NB: If we don't run in a separate thread, there are GUI update 
     185    //     problems with the ImageJ status bar and log window. 
     186    new Thread() { 
     187      public void run() { 
     188        try { 
     189          IJ.runPlugIn(className, arg); 
     190        } 
     191        catch (Throwable t) { 
     192          WindowTools.reportException(t); 
     193        } 
     194      } 
     195    }.start(); 
    189196  } 
    190197 
  • branches/4.2/components/loci-plugins/src/loci/plugins/shortcut/ShortcutTransferHandler.java

    r6589 r7000  
    4242 * 
    4343 * <dl><dt><b>Source code:</b></dt> 
    44  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/ShortcutTransferHandler.java">Trac</a>, 
    45  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/ShortcutTransferHandler.java">SVN</a></dd></dl> 
     44 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/ShortcutTransferHandler.java">Trac</a>, 
     45 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/ShortcutTransferHandler.java">SVN</a></dd></dl> 
    4646 * 
    4747 * @author Curtis Rueden ctrueden at wisc.edu 
  • branches/4.2/components/loci-plugins/src/loci/plugins/util/BFVirtualStack.java

    r6669 r7000  
    4848 * 
    4949 * <dl><dt><b>Source code:</b></dt> 
    50  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/BFVirtualStack.java">Trac</a>, 
    51  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/BFVirtualStack.java">SVN</a></dd></dl> 
     50 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/BFVirtualStack.java">Trac</a>, 
     51 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/BFVirtualStack.java">SVN</a></dd></dl> 
    5252 * 
    5353 * @author Melissa Linkert melissa at glencoesoftware.com 
  • branches/4.2/components/loci-plugins/src/loci/plugins/util/BrowserOptionsWindow.java

    r6589 r7000  
    3838 * 
    3939 * <dl><dt><b>Source code:</b></dt> 
    40  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/BrowserOptionsWindow.java">Trac</a>, 
    41  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/BrowserOptionsWindow.java">SVN</a></dd></dl> 
     40 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/BrowserOptionsWindow.java">Trac</a>, 
     41 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/BrowserOptionsWindow.java">SVN</a></dd></dl> 
    4242 */ 
    4343public class BrowserOptionsWindow extends JFrame { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/util/DataBrowser.java

    r6669 r7000  
    6767 * 
    6868 * <dl><dt><b>Source code:</b></dt> 
    69  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/DataBrowser.java">Trac</a>, 
    70  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/DataBrowser.java">SVN</a></dd></dl> 
     69 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/DataBrowser.java">Trac</a>, 
     70 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/DataBrowser.java">SVN</a></dd></dl> 
    7171 */ 
    7272public class DataBrowser extends StackWindow { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/util/IJStatusEchoer.java

    r6589 r7000  
    3535 * 
    3636 * <dl><dt><b>Source code:</b></dt> 
    37  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/IJStatusEchoer.java">Trac</a>, 
    38  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/IJStatusEchoer.java">SVN</a></dd></dl> 
     37 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/IJStatusEchoer.java">Trac</a>, 
     38 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/IJStatusEchoer.java">SVN</a></dd></dl> 
    3939 */ 
    4040public class IJStatusEchoer extends AppenderSkeleton { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/util/ImageProcessorReader.java

    r6951 r7000  
    4747 * 
    4848 * <dl><dt><b>Source code:</b></dt> 
    49  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/ImageProcessorReader.java">Trac</a>, 
    50  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/ImageProcessorReader.java">SVN</a></dd></dl> 
     49 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/ImageProcessorReader.java">Trac</a>, 
     50 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/ImageProcessorReader.java">SVN</a></dd></dl> 
    5151 */ 
    5252public class ImageProcessorReader extends ReaderWrapper { 
     
    227227        // averaging approach taken below. 
    228228 
     229        // TODO: For non-continuous LUTs, this approach does not work well. 
     230        // 
     231        // For an example, try: 
     232        //   'i16&pixelType=uint16&indexed=true&falseColor=true.fake' 
     233        // 
     234        // To fully resolve this issue, we would need to redither the image. 
     235        // 
     236        // At minimum, we should issue a warning to the ImageJ log whenever 
     237        // this convertTo8Bit routine is invoked, so the user is informed. 
     238 
    229239        int valuesPerBin = shortTable[c].length / byteTable[c].length; 
    230240        double average = 0; 
  • branches/4.2/components/loci-plugins/src/loci/plugins/util/ImageProcessorSource.java

    r6589 r7000  
    3939 * 
    4040 * <dl><dt><b>Source code:</b></dt> 
    41  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/ImageProcessorSource.java">Trac</a>, 
    42  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/ImageProcessorSource.java">SVN</a></dd></dl> 
     41 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/ImageProcessorSource.java">Trac</a>, 
     42 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/ImageProcessorSource.java">SVN</a></dd></dl> 
    4343 */ 
    4444public class ImageProcessorSource implements ICacheSource { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/util/LibraryChecker.java

    r6593 r7000  
    3636 * 
    3737 * <dl><dt><b>Source code:</b></dt> 
    38  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/LibraryChecker.java">Trac</a>, 
    39  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/LibraryChecker.java">SVN</a></dd></dl> 
     38 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/LibraryChecker.java">Trac</a>, 
     39 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/LibraryChecker.java">SVN</a></dd></dl> 
    4040 */ 
    4141public final class LibraryChecker { 
     
    5252 
    5353  /** Minimum version of ImageJ necessary for LOCI plugins. */ 
    54   public static final String IMAGEJ_VERSION = "1.42"; 
     54  public static final String IMAGEJ_VERSION = "1.43"; 
    5555 
    5656  /** Message to be displayed if ImageJ is too old for LOCI plugins. */ 
  • branches/4.2/components/loci-plugins/src/loci/plugins/util/LociPrefs.java

    r6589 r7000  
    4141 * 
    4242 * <dl><dt><b>Source code:</b></dt> 
    43  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/LociPrefs.java">Trac</a>, 
    44  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/LociPrefs.java">SVN</a></dd></dl> 
     43 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/LociPrefs.java">Trac</a>, 
     44 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/LociPrefs.java">SVN</a></dd></dl> 
    4545 */ 
    4646public final class LociPrefs { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/util/LuraWave.java

    r6951 r7000  
    3535 * 
    3636 * <dl><dt><b>Source code:</b></dt> 
    37  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/LuraWave.java">Trac</a>, 
    38  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/LuraWave.java">SVN</a></dd></dl> 
     37 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/LuraWave.java">Trac</a>, 
     38 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/LuraWave.java">SVN</a></dd></dl> 
    3939 */ 
    4040public final class LuraWave { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/util/ROIHandler.java

    r6589 r7000  
    3737import java.awt.Rectangle; 
    3838 
    39 import loci.formats.meta.MetadataRetrieve; 
     39import loci.formats.meta.IMetadata; 
    4040import loci.formats.meta.MetadataStore; 
     41import loci.formats.ome.OMEXMLMetadata; 
     42 
     43import ome.xml.model.Ellipse; 
     44import ome.xml.model.Image; 
     45import ome.xml.model.OME; 
     46import ome.xml.model.Point; 
     47import ome.xml.model.Polyline; 
     48import ome.xml.model.Shape; 
     49import ome.xml.model.Union; 
    4150 
    4251// TODO: Stored ROIs are not correctly linked to Image. 
     
    4857 * 
    4958 * <dl><dt><b>Source code:</b></dt> 
    50  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/ROIHandler.java">Trac</a>, 
    51  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/ROIHandler.java">SVN</a></dd></dl> 
     59 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/ROIHandler.java">Trac</a>, 
     60 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/ROIHandler.java">SVN</a></dd></dl> 
    5261 * 
    5362 * @author Melissa Linkert melissa at glencoesoftware.com 
     
    5867 
    5968  /** 
    60    * Look for ROIs in the given MetadataRetrieve; if any are present, apply 
     69   * Look for ROIs in the given OMEXMLMetadata; if any are present, apply 
    6170   * them to the given images and display them in the ROI manager. 
    6271   */ 
    63   public static void openROIs(MetadataRetrieve retrieve, ImagePlus[] images) { 
     72  public static void openROIs(IMetadata retrieve, ImagePlus[] images) { 
     73    if (!(retrieve instanceof OMEXMLMetadata)) return; 
    6474    int nextRoi = 0; 
    6575    RoiManager manager = RoiManager.getInstance(); 
    6676 
     77    OME root = (OME) retrieve.getRoot(); 
     78 
    6779    int imageCount = retrieve.getImageCount(); 
    68     for (int image=0; image<imageCount; image++) { 
    69       // TODO : technically incorrect to apply every ROI to every image; 
    70       // we should use getROIRefCount(image) instead 
    71       int roiCount = retrieve.getROICount(); 
     80    for (int imageNum=0; imageNum<imageCount; imageNum++) { 
     81      Image image = root.getImage(imageNum); 
     82      int roiCount = image.sizeOfLinkedROIList(); 
    7283      if (roiCount > 0 && manager == null) { 
    7384        manager = new RoiManager(); 
    7485      } 
    7586      for (int roiNum=0; roiNum<roiCount; roiNum++) { 
    76         int shapeCount = 1; 
    77         //int shapeCount = retrieve.getShapeCount(image, roiNum); 
     87        Union shapeSet = image.getLinkedROI(roiNum).getUnion(); 
     88        int shapeCount = shapeSet.sizeOfShapeList(); 
    7889 
    7990        for (int shape=0; shape<shapeCount; shape++) { 
    80           // determine the ROI type 
    81           Double ellipse = retrieve.getEllipseX(roiNum, shape); 
    82           Double line = retrieve.getLineX1(roiNum, shape); 
    83           Double point = retrieve.getPointX(roiNum, shape); 
    84           String polyline = retrieve.getPolylinePoints(roiNum, shape); 
    85           Double rectangle = retrieve.getRectangleX(roiNum, shape); 
     91          Shape shapeObject = shapeSet.getShape(shape); 
    8692 
    8793          Roi roi = null; 
    8894 
    89           if (ellipse != null) { 
    90             int cx = retrieve.getEllipseX(roiNum, shape).intValue(); 
    91             int cy = retrieve.getEllipseY(roiNum, shape).intValue(); 
    92             int rx = retrieve.getEllipseRadiusX(roiNum, shape).intValue(); 
    93             int ry = retrieve.getEllipseRadiusY(roiNum, shape).intValue(); 
     95          if (shapeObject instanceof Ellipse) { 
     96            Ellipse ellipse = (Ellipse) shapeObject; 
     97            int cx = ellipse.getX().intValue(); 
     98            int cy = ellipse.getY().intValue(); 
     99            int rx = ellipse.getRadiusX().intValue(); 
     100            int ry = ellipse.getRadiusY().intValue(); 
    94101            roi = new OvalRoi(cx - rx, cy - ry, rx * 2, ry * 2); 
    95102          } 
    96           else if (line != null) { 
    97             int x1 = retrieve.getLineX1(roiNum, shape).intValue(); 
    98             int x2 = retrieve.getLineX2(roiNum, shape).intValue(); 
    99             int y1 = retrieve.getLineY1(roiNum, shape).intValue(); 
    100             int y2 = retrieve.getLineY2(roiNum, shape).intValue(); 
     103          else if (shapeObject instanceof ome.xml.model.Line) { 
     104            ome.xml.model.Line line = (ome.xml.model.Line) shapeObject; 
     105            int x1 = line.getX1().intValue(); 
     106            int x2 = line.getX2().intValue(); 
     107            int y1 = line.getY1().intValue(); 
     108            int y2 = line.getY2().intValue(); 
    101109            roi = new Line(x1, y1, x2, y2); 
    102110          } 
    103           else if (point != null) { 
    104             int x = retrieve.getPointX(roiNum, shape).intValue(); 
    105             int y = retrieve.getPointY(roiNum, shape).intValue(); 
     111          else if (shapeObject instanceof Point) { 
     112            Point point = (Point) shapeObject; 
     113            int x = point.getX().intValue(); 
     114            int y = point.getY().intValue(); 
    106115            roi = new OvalRoi(x, y, 0, 0); 
    107116          } 
    108           else if (polyline != null) { 
    109             String points = retrieve.getPolylinePoints(roiNum, shape); 
     117          else if (shapeObject instanceof Polyline) { 
     118            Polyline polyline = (Polyline) shapeObject; 
     119            String points = polyline.getPoints(); 
    110120            int[][] coordinates = parsePoints(points); 
    111             boolean closed = retrieve.getPolylineClosed(roiNum, shape); 
     121            boolean closed = polyline.getClosed(); 
    112122            roi = new PolygonRoi(coordinates[0], coordinates[1], 
    113123              coordinates[0].length, closed ? Roi.POLYGON : Roi.POLYLINE); 
    114124          } 
    115           else if (rectangle != null) { 
    116             int x = retrieve.getRectangleX(roiNum, shape).intValue(); 
    117             int y = retrieve.getRectangleY(roiNum, shape).intValue(); 
    118             int w = retrieve.getRectangleWidth(roiNum, shape).intValue(); 
    119             int h = retrieve.getRectangleHeight(roiNum, shape).intValue(); 
     125          else if (shapeObject instanceof ome.xml.model.Rectangle) { 
     126            ome.xml.model.Rectangle rectangle = 
     127              (ome.xml.model.Rectangle) shapeObject; 
     128            int x = rectangle.getX().intValue(); 
     129            int y = rectangle.getY().intValue(); 
     130            int w = rectangle.getWidth().intValue(); 
     131            int h = rectangle.getHeight().intValue(); 
    120132            roi = new Roi(x, y, w, h); 
    121133          } 
     
    123135          if (roi != null) { 
    124136            Roi.setColor(Color.WHITE); 
    125             roi.setImage(images[image]); 
    126             manager.add(images[image], roi, nextRoi++); 
     137            roi.setImage(images[imageNum]); 
     138            manager.add(images[imageNum], roi, nextRoi++); 
    127139          } 
    128140        } 
  • branches/4.2/components/loci-plugins/src/loci/plugins/util/RecordedImageProcessor.java

    r6669 r7000  
    5656 * 
    5757 * <dl><dt><b>Source code:</b></dt> 
    58  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/RecordedImageProcessor.java">Trac</a>, 
    59  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/RecordedImageProcessor.java">SVN</a></dd></dl> 
     58 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/RecordedImageProcessor.java">Trac</a>, 
     59 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/RecordedImageProcessor.java">SVN</a></dd></dl> 
    6060 * 
    6161 * @author Melissa Linkert melissa at glencoesoftware.com 
  • branches/4.2/components/loci-plugins/src/loci/plugins/util/SearchableWindow.java

    r6589 r7000  
    5353 * 
    5454 * <dl><dt><b>Source code:</b></dt> 
    55  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/SearchableWindow.java">Trac</a>, 
    56  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/SearchableWindow.java">SVN</a></dd></dl> 
     55 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/SearchableWindow.java">Trac</a>, 
     56 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/SearchableWindow.java">SVN</a></dd></dl> 
    5757 */ 
    5858public class SearchableWindow extends TextWindow { 
  • branches/4.2/components/loci-plugins/src/loci/plugins/util/VirtualImagePlus.java

    r6795 r7000  
    4242 * 
    4343 * <dl><dt><b>Source code:</b></dt> 
    44  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/VirtualImagePlus.java">Trac</a>, 
    45  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/VirtualImagePlus.java">SVN</a></dd></dl> 
     44 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/VirtualImagePlus.java">Trac</a>, 
     45 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/VirtualImagePlus.java">SVN</a></dd></dl> 
    4646 * 
    4747 * @author Melissa Linkert melissa at glencoesoftware.com 
  • branches/4.2/components/loci-plugins/src/loci/plugins/util/VirtualReader.java

    r6589 r7000  
    3535 * 
    3636 * <dl><dt><b>Source code:</b></dt> 
    37  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/VirtualReader.java">Trac</a>, 
    38  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/VirtualReader.java">SVN</a></dd></dl> 
     37 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/VirtualReader.java">Trac</a>, 
     38 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/VirtualReader.java">SVN</a></dd></dl> 
    3939 * 
    4040 * @author Melissa Linkert melissa at glencoesoftware.com 
  • branches/4.2/components/loci-plugins/src/loci/plugins/util/WindowTools.java

    r6589 r7000  
    5656 * 
    5757 * <dl><dt><b>Source code:</b></dt> 
    58  * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/WindowTools.java">Trac</a>, 
    59  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/WindowTools.java">SVN</a></dd></dl> 
     58 * <dd><a href="http://dev.loci.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/WindowTools.java">Trac</a>, 
     59 * <a href="http://dev.loci.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/WindowTools.java">SVN</a></dd></dl> 
    6060 */ 
    6161public final class WindowTools { 
  • branches/4.2/components/loci-plugins/src/plugins.config

    r6341 r7000  
    2222# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
    2323 
     24File>Import, "-" 
     25File>Import, "Bio-Formats", loci.plugins.LociImporter("location=[Local machine] windowless=false ") 
     26File>Import, "Bio-Formats (Remote)", loci.plugins.LociImporter("location=[Internet]") 
     27File>Import, "Bio-Formats (Windowless)", loci.plugins.LociImporter("location=[Local machine] windowless=true ") 
     28 
    2429#Plugins>LOCI, "Bio-Formats Master Importer", loci.plugins.LociImporter("") 
    2530 
  • branches/4.2/components/loci-plugins/test/loci/plugins/in/ImporterTest.java

    r6683 r7000  
    55package loci.plugins.in; 
    66 
     7import org.junit.Test; 
     8 
    79import static org.junit.Assert.assertEquals; 
    8 import static org.junit.Assert.assertFalse; 
    910import static org.junit.Assert.assertNotNull; 
    1011import static org.junit.Assert.assertTrue; 
     12import static org.junit.Assert.assertFalse; 
    1113import static org.junit.Assert.fail; 
     14 
    1215import ij.CompositeImage; 
     16import ij.IJ; 
    1317import ij.ImagePlus; 
    1418import ij.ImageStack; 
     19import ij.WindowManager; 
     20import ij.measure.Calibration; 
    1521import ij.process.ImageProcessor; 
    1622import ij.process.LUT; 
     
    2632import loci.formats.FormatTools; 
    2733import loci.plugins.BF; 
    28  
    29 import org.junit.Test; 
     34import loci.plugins.in.ImporterOptions; 
    3035 
    3136// TODO 
     
    8893//    - improve, comment, and generalize code for increased coverage 
    8994 
    90 /** 
    91  * A class for testing the Bio-Formats Importer behavior. 
    92  * 
    93  * @author Barry DeZonia bdezonia at wisc.edu 
    94  */ 
    9595public class ImporterTest { 
    9696 
     97  private enum Axis {Z,C,T}; 
     98   
     99  private enum ChannelOrder {ZCT, ZTC, CZT, CTZ, TZC, TCZ}; 
     100 
    97101  /** Whether to log debugging messages to stdout. */ 
    98   static final boolean DEBUG = false; 
    99  
    100   /** 
    101    * Whether to run tests with special requirements. 
    102    * This flag is mainly to disable the testDatasetOpenFilesIndividually test 
    103    * on systems without the required Bio-Rad PIC sample data available. 
    104    */ 
    105   static final boolean RUN_SPECIAL_TESTS = false; 
    106  
    107   private enum Axis {Z,C,T}; 
    108  
    109   private enum ChannelOrder {ZCT, ZTC, CZT, CTZ, TZC, TCZ}; 
     102  private static final boolean DEBUG = false; 
    110103 
    111104  private static final boolean[] BOOLEAN_STATES = new boolean[] {false, true}; 
    112  
     105   
     106  private static final int[] PIXEL_TYPES = new int[] { 
     107      FormatTools.FLOAT, FormatTools.DOUBLE, 
     108      FormatTools.UINT8, FormatTools.UINT16, FormatTools.UINT32, 
     109      FormatTools.INT8,  FormatTools.INT16,  FormatTools.INT32 
     110      }; 
     111   
    113112  private static Color[] DEFAULT_COLOR_ORDER = 
    114113    new Color[] {Color.RED, Color.GREEN, Color.BLUE, Color.WHITE, Color.CYAN, Color.MAGENTA, Color.YELLOW}; 
    115  
     114   
    116115  private static Color[] CUSTOM_COLOR_ORDER = 
    117116    new Color[] {Color.BLUE, Color.RED, Color.GREEN, Color.MAGENTA, Color.YELLOW, Color.CYAN, Color.WHITE}; 
     
    122121  private static final boolean FALSE_COLOR = true; 
    123122  private static final boolean REAL_COLOR = false; 
    124  
     123   
    125124  private static final int ONE_SERIES = 1; 
    126125 
     
    133132  private static final int FAKE_SIZE_X = 50; 
    134133  private static final int FAKE_SIZE_Y = 50; 
    135  
     134   
    136135  static { 
    137136    //String template = "test_C%s_TP%s&sizeX=50&sizeY=20&sizeZ=7.fake"; 
    138137    String template = constructFakeFilename("test_C%s_TP%s", FormatTools.UINT8, FAKE_SIZE_X, FAKE_SIZE_Y, FAKE_PLANE_COUNT, 1, 1, 
    139138                        -1, false, -1, false, -1); 
    140  
     139     
    141140    FAKE_FILES = new String[] { 
    142141      String.format(template, "1", "1"), 
     
    162161    } 
    163162  } 
    164  
     163   
    165164  // ** Helper methods ******************************************************************* 
    166165 
     
    190189    if (lutLength > 0) fileName += "&lutLength=" + lutLength; 
    191190    fileName += ".fake"; 
    192  
     191     
    193192    return fileName; 
    194193  } 
     
    214213    return getPixelValue(0,0,imp,z,c,t,indexed,falseColor); 
    215214  } 
    216  
     215   
    217216  /** Image number of the given ImagePlus at z,c,t index */ 
    218   @SuppressWarnings("unused") 
    219217  private int iIndex(ImagePlus imp, int z, int c, int t, boolean indexed, boolean falseColor) 
    220218  { 
    221219    return getPixelValue(10,0,imp,z,c,t,indexed,falseColor); 
    222220  } 
    223  
     221   
    224222  /** Slice number of the given ImagePlus at z,c,t index */ 
    225223  private int zIndex(ImagePlus imp, int z, int c, int t, boolean indexed, boolean falseColor) 
     
    227225    return getPixelValue(20,0,imp,z,c,t,indexed,falseColor); 
    228226  } 
    229  
     227   
    230228  /** Channel number of the given ImagePlus at z,c,t index */ 
    231229  private int cIndex(ImagePlus imp, int z, int c, int t, boolean indexed, boolean falseColor) 
     
    233231    return getPixelValue(30,0,imp,z,c,t,indexed,falseColor); 
    234232  } 
    235  
     233   
    236234  /** Frame number of the given ImagePlus at z,c,t index */ 
    237235  private int tIndex(ImagePlus imp, int z, int c, int t, boolean indexed, boolean falseColor) 
     
    261259    if ((d < 0) || (d > 2)) 
    262260      throw new IllegalArgumentException("axisChar() - index out of bounds [0..2]: "+d); 
    263  
     261     
    264262    return order.charAt(d); 
    265263  } 
    266  
     264   
    267265  /** returns Axis given an order string and an index */ 
    268266  private Axis axis(String order, int d) 
    269267  { 
    270268    char dimChar = axisChar(order,d); 
    271  
     269     
    272270    if (dimChar == 'Z') return Axis.Z; 
    273271    if (dimChar == 'C') return Axis.C; 
     
    286284    throw new IllegalArgumentException("value() - unknown axis: "+axis); 
    287285  } 
    288  
     286   
    289287  /** returns z, c, or t index value given an ImageProcessor and an Axis selector */ 
    290288  private int index(Axis axis, ImageProcessor proc) 
     
    293291    if (axis == Axis.C) return cIndex(proc); 
    294292    if (axis == Axis.T) return tIndex(proc); 
    295  
     293     
    296294    throw new IllegalArgumentException("index() - unknown axis: "+axis); 
    297295  } 
     
    302300    return "XY" + order.toString(); 
    303301  } 
    304  
     302   
    305303  /** returns the number of of elements in a series given from, to, and by values */ 
    306304  private int numInSeries(int from, int to, int by) 
     
    308306    if (by < 1) 
    309307      throw new IllegalArgumentException("numInSeries passed a stepBy value < 1"); 
    310  
     308     
    311309    // could calc this but simple loop suffices for our purposes 
    312310    int count = 0; 
     
    315313    return count; 
    316314  } 
    317  
     315   
    318316  // this next method useful to avoid changes to instance vars of ImagePlus by query functions 
    319317  /** Gets values of private instance variable ints from an ImagePlus */ 
     
    333331    return -1; 
    334332  } 
    335  
     333   
    336334  /** The number of Z slices in an ImagePlus */ 
    337335  private int getSizeZ(ImagePlus imp) { return getField(imp, "nSlices"); } 
     
    343341  private int getEffectiveSizeC(ImagePlus imp) { return getField(imp, "nChannels"); } 
    344342 
     343  // TODO : this code written to pass tests - looks wrong on a number of pixel types 
     344  /** returns the maximum pixel value for a given pixel type */ 
     345  private long maxPixelValue(int pixType) 
     346  { 
     347    if (FormatTools.isFloatingPoint(pixType)) 
     348      return 4294967296L; // expected Float.MAX_VALUE or maybe Double.MAX_VALUE 
     349  
     350    switch (pixType) 
     351    { 
     352      case FormatTools.INT8:    return 255; // expected: Byte.MAX_VALUE  
     353      case FormatTools.INT16:   return 65535;  // expected: Short.MAX_VALUE 
     354      case FormatTools.INT32:   return 4294967296L; // expected INTEGER.MAX_VALUE and also off by 1 from unsigned max  
     355      case FormatTools.UINT8:   return 255;  
     356      case FormatTools.UINT16:  return 65535;  
     357      case FormatTools.UINT32:  return 4294967295L; // off by 1 from unsigned max 
     358                                            // TODO : prev line modified to get autoscale working better. Off by 1 not true. 
     359 
     360      default: 
     361        throw new IllegalArgumentException("maxPixelValue() - unknown pixel type passed in: " + pixType); 
     362    } 
     363  } 
     364   
    345365  /** returns the minimum pixel value for a given pixel type */ 
    346366  private long minPixelValue(int pixType) 
     
    348368    if (FormatTools.isFloatingPoint(pixType)) 
    349369      //return -4294967296L; // -2^32 (and also its not 2^32-1 !!!) 
    350       return 0;  // TODO this allows autoscale testing to work for floating types - makes sense cuz FakeReader only does unsigned float data 
    351  
     370      return 0;  // TODO this allows autoscale testing to work for floating types - makes sense cuz FakeReader only does unsigned float data  
     371  
    352372    switch (pixType) 
    353373    { 
    354       case FormatTools.INT8:    return Byte.MIN_VALUE; 
     374      case FormatTools.INT8:    return Byte.MIN_VALUE;  
    355375      case FormatTools.INT16:   return Short.MIN_VALUE; 
    356       case FormatTools.INT32:   return Integer.MIN_VALUE; 
    357       case FormatTools.UINT8:   return 0; 
    358       case FormatTools.UINT16:  return 0; 
     376      case FormatTools.INT32:   return Integer.MIN_VALUE;  
     377      case FormatTools.UINT8:   return 0;  
     378      case FormatTools.UINT16:  return 0;  
    359379      case FormatTools.UINT32:  return 0; 
    360380 
     
    364384  } 
    365385 
     386  /** returns the expected min value within a FakeFile plane based on pixel type and if autoscale desired */ 
     387  private long expectedMin(int pixType, boolean wantAutoscale) 
     388  { 
     389    long min; 
     390     
     391    if (wantAutoscale || (FormatTools.isFloatingPoint(pixType))) 
     392      min = minPixelValue(pixType); 
     393    else // not autoscaling - get min/max of pixel type 
     394      min = 0; 
     395 
     396    if (pixType == FormatTools.INT16)  // hack : clamp like IJ does 
     397      if (min < 0) 
     398        min = 0; 
     399 
     400    return min; 
     401  } 
     402   
     403  /** returns the expected max value within a FakeFile plane based on pixel type and if autoscale desired */ 
     404  private long expectedMax(int pixType, boolean wantAutoscale, long maxPixVal, long maxIndex) 
     405  {                     // TODO - call Math.max() at point of call. Simplify this method to take a maxVal. 
     406    long max; 
     407     
     408    if (wantAutoscale || (FormatTools.isFloatingPoint(pixType))) 
     409      max = Math.max( maxPixVal, maxIndex); 
     410    else // not autoscaling - get min/max of pixel type 
     411      max = maxPixelValue(pixType); 
     412 
     413    if (pixType == FormatTools.INT16)  // hack : clamp like IJ does 
     414      if (max > 65535) 
     415        max = 65535; 
     416     
     417    return max; 
     418  } 
    366419 
    367420  /** set an ImagePlus' position relative to CZT ordering (matches imp.setPosition()) */ 
     
    372425    imp.setSlice(sliceNumber+1); 
    373426  } 
    374  
     427   
    375428  /** set an ImagePlus' position relative to ZCT ordering (rather than default CZT) */ 
    376429  private void setZctPosition(ImagePlus imp, int z, int c, int t) 
     
    380433    imp.setSlice(sliceNumber+1); 
    381434  } 
    382  
     435   
    383436  // note - the following code relies on setZctPosition() being called previously. Otherwise regular ImagePlus case 
    384437  //   won't work. In general this method not designed for general use but actually just for use by getPixelValue(). 
    385  
     438   
    386439  /** gets the color table from any kind of ImagePlus (composite or not) - not for general use */ 
    387440  private LUT getColorTable(ImagePlus imp, int channel) 
     
    389442    if (imp instanceof CompositeImage) 
    390443      return ((CompositeImage)imp).getChannelLut(channel+1); 
    391  
     444     
    392445    // else a regular ImagePlus 
    393  
     446     
    394447    //if (DEBUG) log("  getting color table from a regular ImagePlus."); 
    395  
     448     
    396449    IndexColorModel icm = (IndexColorModel)imp.getProcessor().getColorModel(); 
    397  
     450     
    398451    // TODO - maybe I can cast from IndexColorModel to LUT here - depends what IJ did. 
    399452    // otherwise make a LUT 
    400  
     453     
    401454    byte[] reds = new byte[256], greens = new byte[256], blues = new byte[256]; 
    402  
     455     
    403456    icm.getReds(reds); 
    404457    icm.getGreens(greens); 
    405458    icm.getBlues(blues); 
    406  
     459     
    407460    return new LUT(reds,greens,blues); 
    408461  } 
    409  
     462   
    410463  /** get the actual pixel value (lookup when data is indexed) of the index of a fake image at a given z,c,t */ 
    411464  private int getPixelValue(int x,int y, ImagePlus imp, int z, int c, int t, boolean indexed, boolean falseColor) 
     
    413466    //TODO - restore - changed for compositeTest debugging setZctPosition(imp,z,c,t); 
    414467    setCztPosition(imp,z,c,t); 
    415  
     468     
    416469    int rawValue = (int) (imp.getProcessor().getPixelValue(x, y)); 
    417  
     470     
    418471    if ((!indexed) || (falseColor)) // TODO - disabling falseColor test here improves 3/1/indexed/falseColor 
    419472      return rawValue; 
    420473 
    421474    // otherwise indexed - lookup pixel value in LUT 
    422  
     475     
    423476    LUT lut = getColorTable(imp,c); 
    424477    int value = lut.getRed(rawValue);  // since r g and b vals should be the same choose one arbitrarily. 
    425478      // OR Use red in case lut len < 3 and zero fills other channels 
    426  
     479     
    427480    //if (DEBUG) log("  did a lut lookup in getPixelValue("+z+","+c+","+t+") = "+value+" (rawValue = "+rawValue+")"); 
    428  
     481     
    429482    return value; 
    430483  } 
    431  
     484  
    432485  /** calculate the effective size C of an image given various params */ 
    433486  private int effectiveC(int sizeC, int rgb, int lutLen, boolean indexed, boolean falseColor) 
    434487  { 
    435488    int effC = sizeC; 
    436  
     489     
    437490    if (indexed)  // this is from Melissa 
    438491    { 
     
    442495        effC *= lutLen; 
    443496    } 
    444  
     497     
    445498    return effC; 
    446499  } 
    447  
     500   
    448501  // ****** helper tests **************************************************************************************** 
    449  
     502   
    450503  /** tests that the correct number of ImagePluses exist */ 
    451504  private void impsCountTest(ImagePlus[] imps, int numExpected) 
     
    454507    assertEquals(numExpected,imps.length); 
    455508  } 
    456  
     509   
    457510  /** tests that the stack of an ImagePlus is of a given size */ 
    458511  private void stackTest(ImagePlus imp, int expectedSize) 
     
    461514    assertEquals(expectedSize,imp.getStack().getSize()); 
    462515  } 
    463  
     516   
    464517  /** tests that the dimensions of an ImagePlus match passed in x,y,z,c,t values */ 
    465518  private void xyzctTest(ImagePlus imp, int x, int y, int z, int c, int t) 
     
    472525    assertEquals(t,getSizeT(imp)); 
    473526  } 
    474  
     527   
    475528  /** tests that the first and last entries of a lut match expected values */ 
    476529  private void lutTest(CompositeImage ci, int channel, int minR, int minG, int minB, int maxR, int maxG, int maxB) 
     
    478531    // channel is 0-based 
    479532    LUT lut = ci.getChannelLut(channel+1);  // IJ is 1-based 
    480  
     533     
    481534    byte[] reds = new byte[256]; 
    482535    byte[] blues = new byte[256]; 
    483536    byte[] greens = new byte[256]; 
    484  
     537     
    485538    lut.getReds(reds); 
    486539    lut.getGreens(greens); 
    487540    lut.getBlues(blues); 
    488  
     541     
    489542    /* TODO - helper for testing falseColor problems 
    490543    if (DEBUG) log("  expected min rgb : "+minR+" "+minG+" "+minB); 
     
    493546    if (DEBUG) log("  actual max rgb : "+(reds[255]&0xff)+" "+(greens[255]&0xff)+" "+(blues[255]&0xff)); 
    494547    */ 
    495  
     548     
    496549    assertEquals((byte)minR,reds[0]); 
    497550    assertEquals((byte)maxR,reds[255]); 
     
    511564    } 
    512565  } 
    513  
     566   
    514567  /** tests that input to the crop tests is valid */ 
    515568  private void verifyCropInput(int sizeX, int sizeY, int originCropX, int originCropY, int sizeCrop) 
     
    525578    assertTrue(originCropY + sizeCrop <= sizeY); 
    526579  } 
    527  
     580   
    528581  /** tests that the indices of a FakeFile[z,c,t] match passed in values*/ 
    529582  private boolean indexValuesTest(ImagePlus imp, int z, int c, int t, boolean indexed, boolean falseColor, 
    530                                   int expS, /*int expI,*/ int expZ, int expC, int expT) 
     583                                  int expS, int expI, int expZ, int expC, int expT) 
    531584  { 
    532585    // TODO - returns a boolean so we can print out all values before asserting failure. Could be changed if desired. 
    533  
     586     
    534587    int tempS = sIndex(imp, z, c, t, indexed, falseColor); 
    535     //int tempI = iIndex(imp, z, c, t, indexed, falseColor); 
     588    int tempI = iIndex(imp, z, c, t, indexed, falseColor); 
    536589    int tempZ = zIndex(imp, z, c, t, indexed, falseColor); 
    537590    int tempC = cIndex(imp, z, c, t, indexed, falseColor); 
    538591    int tempT = tIndex(imp, z, c, t, indexed, falseColor); 
    539  
     592     
    540593    //if (DEBUG) log("actual CZT "+tempC+" "+tempZ+" "+tempT); 
    541  
     594     
    542595    //if (DEBUG) log("  indices test (I forced to 0)"); 
    543596    //if (DEBUG) log("    expected (sizct): "+expS+" "+0+" "+expZ+" "+expC+" "+expT); 
    544597    //if (DEBUG) log("    actual (sizct):   "+tempS+" "+0+" "+tempZ+" "+tempC+" "+tempT); 
    545  
     598     
    546599    //TODO - remove this debugging code 
    547600    if ((expS != tempS) || /*(expI != tempI) ||*/ (expZ != tempZ) || (expC != tempC) || (expT != tempT)) 
     
    553606      return false; 
    554607    } 
    555     assertEquals(expS,tempS); 
    556     //assertEquals(expI,tempI);  // not so important we test this 
    557     assertEquals(expZ,tempZ); 
    558     assertEquals(expC,tempC); 
    559     assertEquals(expT,tempT); 
    560     return true; 
    561   } 
    562  
     608    else 
     609    { 
     610      assertEquals(expS,tempS); 
     611      //assertEquals(expI,tempI);  // not so important we test this 
     612      assertEquals(expZ,tempZ); 
     613      assertEquals(expC,tempC); 
     614      assertEquals(expT,tempT); 
     615      return true; 
     616    } 
     617  } 
     618   
    563619  /** tests that a FakeFile dataset has index values in ZCT order */ 
    564620  private void stackInZctOrderTest(ImagePlus imp, int maxZ, int maxC, int maxT, boolean indexed, boolean falseColor) 
    565621  { 
    566622    if (DEBUG) log("stackInZctOrderTest()"); 
    567  
     623     
    568624    boolean success = true; 
    569  
     625     
    570626    stackTest(imp,(maxZ * maxC * maxT)); 
    571627 
     
    576632 
    577633          int expectedS = 0; 
    578           //int expectedI = iIndex; 
     634          int expectedI = iIndex; 
    579635          int expectedZ = z; 
    580636          int expectedC = c; 
    581637          int expectedT = t; 
    582  
     638           
    583639          iIndex++; 
    584  
    585           success &= indexValuesTest(imp,z,c,t,indexed,falseColor,expectedS,expectedZ,expectedC,expectedT); 
     640           
     641          success &= indexValuesTest(imp,z,c,t,indexed,falseColor,expectedS,expectedI,expectedZ,expectedC,expectedT); 
    586642        } 
    587643      } 
    588644    } 
    589  
     645     
    590646    if (!success) 
    591647      fail("indexValuesTest() failed for some values"); 
    592648  } 
    593  
     649   
    594650  /** tests that a FakeFile dataset has index values in CZT order */ 
    595   private void stackInCztOrderTest(ImagePlus imp, int maxZ, int maxC, int maxT, boolean indexed, boolean falseColor) 
     651  private void stackInCztOrderTest(ImagePlus imp, int maxZ, int maxC, int maxT, boolean indexed, boolean falseColor,int inputChan, int inputChanPerPlane) 
    596652  { 
    597653    if (DEBUG) log("stackInCztOrderTest()"); 
    598  
     654     
    599655    boolean success = true; 
    600656 
     
    607663 
    608664          int expectedS = 0; 
    609           //int expectedI = 0;  // won't test anymore : some tricky cases arise 
     665          int expectedI = 0;  // won't test anymore : some tricky cases arise 
    610666          int expectedZ = z; 
    611667          int expectedC = c; 
    612668          int expectedT = t; 
    613  
     669           
    614670          iIndex++; 
    615  
    616           success &= indexValuesTest(imp,z,c,t,indexed,falseColor,expectedS,expectedZ,expectedC,expectedT); 
     671           
     672          success &= indexValuesTest(imp,z,c,t,indexed,falseColor,expectedS,expectedI,expectedZ,expectedC,expectedT); 
    617673        } 
    618674      } 
    619675    } 
    620  
     676     
    621677    if (!success) 
    622678      fail("indexValuesTest() failed for some values"); 
    623679  } 
    624  
     680   
    625681  /** tests that a FakeFile dataset has index values in CZT order repeated once per series */ 
    626682  private void multipleSeriesInCztOrderTest(ImagePlus imp, int numSeries, int maxZ, int maxC, int maxT) 
     
    636692        for (int zIndex = 0; zIndex < maxZ; zIndex++) { 
    637693          for (int cIndex = 0; cIndex < maxC; cIndex++) { 
    638             ImageProcessor proc = st.getProcessor(++slice); 
     694            ImageProcessor proc = st.getProcessor(++slice);  
    639695            assertEquals(sIndex, sIndex(proc)); 
    640696            assertEquals(zIndex, zIndex(proc)); 
     
    661717    Axis middle = axis(chOrder,1); 
    662718    Axis slowest = axis(chOrder,2); 
    663  
     719     
    664720    int maxI = value(slowest,z,c,t); 
    665721    int maxJ = value(middle,z,c,t); 
    666722    int maxK = value(fastest,z,c,t); 
    667  
     723     
    668724    int slice = 0; 
    669725    for (int i = 0; i < maxI; i++) { 
     
    684740    } 
    685741  } 
    686  
     742   
    687743  /** tests that the pixel values of a FakeFile are as expected */ 
    688744  private void pixelsTest(ImagePlus imp, int pixType, boolean indexed, boolean falseColor) 
     
    690746    assertTrue(pixType == FormatTools.UINT8);  // TODO - for now 
    691747    assertTrue(imp.getHeight() > 10); 
    692  
     748     
    693749    int max = imp.getWidth(); 
    694750    if (max > 255) max = 255; 
    695  
     751     
    696752    for (int t = 0; t < imp.getNFrames(); t++) 
    697753      for (int c = 0; c < imp.getNChannels(); c++) 
     
    705761  { 
    706762    ImageProcessor proc = imp.getProcessor(); 
    707  
     763     
    708764    for (int ix = 0; ix < cropSize; ix++) 
    709765      for (int iy = 0; iy < cropSize; iy++) 
    710766        assertEquals(ox+ix,proc.getPixelValue(ix, iy),0); 
    711767  } 
    712  
     768   
    713769  /** tests that multiple file groups are pulled into one dataset */ 
    714770  private void groupedFilesTest(ImagePlus imp, int expNumZ, int expNumC, int expNumT) 
    715771  { 
    716772    stackTest(imp,expNumZ*expNumC*expNumT); 
    717  
     773     
    718774    ImageStack st = imp.getStack(); 
    719  
     775     
    720776    //if (DEBUG) log("groupedFilesTest"); 
    721777    int slice = 0; 
     
    735791    } 
    736792  } 
    737  
     793   
    738794  /** tests that a dataset has had its Z & T dimensions swapped */ 
    739795  private void swappedZtTest(ImagePlus imp, int pixType, boolean virtual, int originalZ, int originalC, int originalT) 
    740796  { 
    741797    if (DEBUG) log("swappedZtTest() : virtual "+virtual+" pixType "+FormatTools.getPixelTypeString(pixType)); 
    742  
     798     
    743799    stackTest(imp,(originalZ*originalC*originalT)); 
    744800 
     
    748804    if (pixType == FormatTools.INT32)  // note - since INT32 represented internally as float the signedness is ignored by IJ 
    749805      offset = 0; 
    750  
     806     
    751807    // verify that the dimensional extents were swapped 
    752808    final int actualSizeZ = imp.getNSlices(); 
     
    765821          int actualZ, actualC, actualT; 
    766822          ImageProcessor proc = st.getProcessor(++slice); 
    767  
     823           
    768824          // TODO - hack in place to clarify an underlying BF bug. Remove when bug fixed. Also remove virtual & pixType params. 
    769 //          if (true)  // TODO - temp until I confirm with Curtis that he has fixed underlying BF bug. 
    770 //          { 
     825          if (true)  // TODO - temp until I confirm with Curtis that he has fixed underlying BF bug. 
     826          { 
    771827            actualZ = (int)(offset + tIndex(proc)); // Z<->T swapped 
    772828            actualC = (int)(offset + cIndex(proc)); 
    773829            actualT = (int)(offset + zIndex(proc)); // Z<->T swapped 
    774 //          } 
    775 //          else 
    776 //          { 
    777 //            actualZ = tIndex(proc); // Z<->T swapped 
    778 //            actualC = cIndex(proc); 
    779 //            actualT = zIndex(proc); // Z<->T swapped 
    780 //          } 
     830          } 
     831          else 
     832          { 
     833            actualZ = tIndex(proc); // Z<->T swapped 
     834            actualC = cIndex(proc); 
     835            actualT = zIndex(proc); // Z<->T swapped 
     836          } 
    781837          //if (DEBUG) log("--\nexp CZT "+cIndex+" "+zIndex+" "+tIndex); 
    782838          //if (DEBUG) log("act CZT "+actualC+" "+actualZ+" "+actualT); 
     
    788844    } 
    789845  } 
    790  
     846   
    791847  /** Tests that an ImageStack is ordered ZCT according to specified from/to/by points of z/c/t */ 
    792848  private void seriesInZctOrderTest(ImagePlus imp, boolean indexed, boolean falseColor, 
     
    798854    int cs = numInSeries(cFrom,cTo,cBy); 
    799855    int ts = numInSeries(tFrom,tTo,tBy); 
    800  
     856    
    801857    stackTest(imp,(zs * cs * ts)); 
    802  
     858     
    803859    for (int t = 0; t < ts; t++) { 
    804860      for (int c = 0; c < cs; c++) { 
     
    808864          int cIndex = cIndex(imp,z,c,t,indexed,falseColor); 
    809865          int tIndex = tIndex(imp,z,c,t,indexed,falseColor); 
    810  
     866           
    811867          int zVal = zFrom + z*zBy; 
    812868          int cVal = cFrom + c*cBy; 
     
    822878 
    823879  /** tests that the Calibration of an ImagePlus of signed integer data is correct */ 
    824  
     880  private void calibrationTest(ImagePlus imp, int pixType) 
     881  { 
     882    // IJ handles BF INT32 as float. So the test is invalid in that case 
     883    if (pixType == FormatTools.INT32) 
     884      return; 
     885     
     886    if (FormatTools.isSigned(pixType) && !FormatTools.isFloatingPoint(pixType)) 
     887    { 
     888      Calibration cal = imp.getCalibration(); 
     889      assertEquals(Calibration.STRAIGHT_LINE,cal.getFunction()); 
     890      double[] coeffs = cal.getCoefficients(); 
     891      int bitsPerPix = FormatTools.getBytesPerPixel(pixType) * 8; 
     892      assertEquals(-(Math.pow(2, (bitsPerPix-1))),coeffs[0],0); 
     893      assertEquals(1,coeffs[1],0); 
     894    } 
     895  } 
     896 
     897  /** tests that an ImagePlus' set of ImageProcessors have their mins and maxes set appropriately */ 
     898  private void minMaxTest(ImagePlus imp, long expectedMin, long expectedMax) 
     899  { 
     900    if (imp instanceof CompositeImage) { 
     901      CompositeImage ci = (CompositeImage) imp; 
     902      for (int c = 0; c < ci.getNChannels(); c++) { 
     903        LUT lut = ci.getChannelLut(c + 1); 
     904        assertEquals(expectedMax,lut.max,0.1); 
     905        assertEquals(expectedMin,lut.min,0.1); 
     906      } 
     907    } 
     908    else { 
     909      ImageStack st = imp.getStack(); 
     910      int numSlices = st.getSize(); 
     911      for (int i = 0; i < numSlices; i++) 
     912      { 
     913        ImageProcessor proc = st.getProcessor(i+1); 
     914        assertEquals(expectedMax,proc.getMax(),0.1); 
     915        assertEquals(expectedMin,proc.getMin(),0.1); 
     916      } 
     917    } 
     918  } 
    825919 
    826920  /** tests if images split on Z are ordered correctly */ 
     
    845939    } 
    846940  } 
    847  
     941   
    848942  /** tests if images split on C are ordered correctly */ 
    849943  private void imagesCInZtOrderTest(ImagePlus[] imps, int sizeX, int sizeY, int sizeZ, int sizeC, int sizeT) 
     
    867961    } 
    868962  } 
    869  
     963   
    870964  /** tests if images split on T are ordered correctly */ 
    871965  private void imagesTInCzOrderTest(ImagePlus[] imps, int sizeX, int sizeY, int sizeZ, int sizeC, int sizeT) 
     
    889983    } 
    890984  } 
    891  
     985   
    892986  /** tests that a set of images is ordered via Z first - used by concatSplit tests */ 
    893987  private void imageSeriesZInCtOrderTest(ImagePlus[] imps, int numSeries, int sizeX, int sizeY, int sizeZ, int sizeC, int sizeT) 
     
    9191013    } 
    9201014  } 
    921  
     1015   
    9221016  /** tests that a set of images is ordered via C first - used by concatSplit tests */ 
    9231017  private void imageSeriesCInZtOrderTest(ImagePlus[] imps, int numSeries, int sizeX, int sizeY, int sizeZ, int sizeC, int sizeT) 
     
    9471041    } 
    9481042  } 
    949  
     1043   
    9501044  // this one will be different from the previous two as we concat along T by default for FakeFiles as all dims compatible. 
    9511045  //   Then we're splitting on T. Logic will need to be different from others. 
     
    9801074    } 
    9811075  } 
    982  
     1076   
    9831077  /** tests that an image stack is correctly ordered after swapping and cropping */ 
    9841078  private void stackCtzSwappedAndCroppedTest(ImagePlus[] imps, int cropSizeX, int cropSizeY, int origSizeZ, int origSizeC, int origSizeT, int start, int stepBy) 
    9851079  { 
    9861080    // note orig data is ZCT. swapping order is CTZ (all dims swapped). 
    987  
     1081     
    9881082    int newMaxT = origSizeC; 
    989  
     1083     
    9901084    int numC = numInSeries(start,origSizeC-1,stepBy); 
    9911085 
     
    9931087    int newC = origSizeZ; 
    9941088    int newT = numC; 
    995  
     1089     
    9961090    for (int zIndex = 0; zIndex < newZ; zIndex++) { 
    997  
     1091       
    9981092      ImagePlus imp = imps[zIndex]; 
    999  
     1093       
    10001094      xyzctTest(imp,cropSizeX,cropSizeY,1,newC,newT); // all dims changed 
    1001  
     1095   
    10021096      stackTest(imp,newC*newT); 
    1003  
     1097       
    10041098      ImageStack st = imp.getStack(); 
    1005  
     1099       
    10061100      int slice = 0; 
    10071101      for (int tIndex = start; tIndex < newMaxT; tIndex += stepBy) { 
     
    10091103        { 
    10101104          ImageProcessor proc = st.getProcessor(++slice); 
    1011  
     1105           
    10121106          assertEquals(cropSizeX,proc.getWidth()); 
    10131107          assertEquals(cropSizeY,proc.getHeight()); 
     
    10161110          final int actualC = zIndex(proc); 
    10171111          final int actualT = cIndex(proc); 
    1018  
     1112           
    10191113          assertEquals(zIndex, actualZ); 
    10201114          assertEquals(cIndex, actualC); 
     
    10241118    } 
    10251119  } 
    1026  
     1120   
    10271121  // ******** specific testers  ********************************** 
    1028  
     1122   
    10291123  /** tests BioFormats when directly calling BF.openImagePlus(path) (no options set) */ 
    10301124  private void defaultBehaviorTester(int pixType, int x, int y, int z, int c, int t) 
     
    10321126    String path = constructFakeFilename("default", pixType, x, y, z, c, t, -1, false, -1, false, -1); 
    10331127    ImagePlus[] imps = null; 
    1034  
     1128     
    10351129    try { 
    10361130      imps = BF.openImagePlus(path); 
     
    10421136      fail(e.getMessage()); 
    10431137    } 
    1044  
     1138     
    10451139    impsCountTest(imps,1); 
    10461140 
    10471141    ImagePlus imp = imps[0]; 
    1048  
     1142     
    10491143    xyzctTest(imp,x,y,z,c,t); 
    10501144  } 
    1051  
     1145   
    10521146  /** tests BF's options.setStackOrder() */ 
    10531147  private void outputStackOrderTester(boolean virtual, int pixType, ChannelOrder order, int x, int y, int z, int c, int t) 
     
    10551149    String bfChOrder = bfChanOrd(order); 
    10561150    String chOrder = order.toString(); 
    1057  
     1151     
    10581152    String path = constructFakeFilename("stack", pixType, x, y, z, c, t, -1, false, -1, false, -1); 
    1059  
     1153     
    10601154    ImagePlus[] imps = null; 
    10611155    try { 
     
    10741168 
    10751169    impsCountTest(imps,1); 
    1076  
     1170     
    10771171    ImagePlus imp = imps[0]; 
    1078  
     1172     
    10791173    xyzctTest(imp,x,y,z,c,t); 
    10801174 
    10811175    stackTest(imp,z*c*t); 
    1082  
     1176     
    10831177    stackInSpecificOrderTest(imp, chOrder); 
    10841178  } 
     
    10901184 
    10911185    ImagePlus[] imps = null; 
    1092  
     1186     
    10931187    try { 
    10941188      ImporterOptions options = new ImporterOptions(); 
     
    11051199      fail(e.getMessage()); 
    11061200    } 
    1107  
     1201     
    11081202    impsCountTest(imps,1); 
    1109  
     1203     
    11101204    xyzctTest(imps[0], FAKE_SIZE_X, FAKE_SIZE_Y, FAKE_PLANE_COUNT, FAKE_CHANNEL_COUNT, FAKE_TIMEPOINT_COUNT); 
    1111  
     1205   
    11121206    groupedFilesTest(imps[0], FAKE_PLANE_COUNT, FAKE_CHANNEL_COUNT, FAKE_TIMEPOINT_COUNT); 
    11131207  } 
    1114  
     1208   
    11151209  /** tests BF's options.setUngroupFiles() */ 
    1116   private void datasetOpenFilesIndividuallyTester(boolean virtual) 
     1210  private void datsetOpenFilesIndividuallyTester(boolean virtual) 
    11171211  { 
    11181212    // TODO - try to remove file dependency 
    1119  
     1213     
    11201214    String path = "2channel_stack_raw01.pic"; 
    1121  
     1215     
    11221216    // there is a second file called "2channel_stack_raw02.pic" present in the same directory 
    11231217    // if open indiv true should only load one of them, otherwise both 
    1124  
     1218     
    11251219    // try ungrouped 
    1126  
     1220     
    11271221    ImagePlus[] imps = null; 
    1128  
     1222     
    11291223    try { 
    11301224      ImporterOptions options = new ImporterOptions(); 
     
    11401234      fail(e.getMessage()); 
    11411235    } 
    1142  
     1236     
    11431237    // test results 
    1144  
     1238     
    11451239    impsCountTest(imps,1); 
    1146  
     1240     
    11471241    stackTest(imps[0],16); // one loaded as one set with 16 slices 
    1148  
     1242     
    11491243    // try grouped 
    1150  
     1244     
    11511245    try { 
    11521246      ImporterOptions options = new ImporterOptions(); 
     
    11641258 
    11651259    // test results 
    1166  
     1260     
    11671261    impsCountTest(imps,1); 
    1168  
     1262     
    11691263    stackTest(imps[0],32); // both loaded as one set of 32 slices 
    11701264  } 
     
    11761270    int c = 3; 
    11771271    ChannelOrder swappedOrder = ChannelOrder.TCZ; // original order is ZCT 
    1178  
     1272     
    11791273    String path = constructFakeFilename("swapDims", pixType, x, y, z, c, t, -1, false, -1, false, -1); 
    11801274 
    11811275    ImagePlus[] imps = null; 
    1182  
     1276     
    11831277    try { 
    11841278      ImporterOptions options = new ImporterOptions(); 
     
    11991293 
    12001294    ImagePlus imp = imps[0]; 
    1201  
     1295     
    12021296    xyzctTest(imp,x,y,t,c,z); // Z<->T swapped 
    12031297 
     
    12091303  { 
    12101304    ImagePlus[] imps = null; 
    1211  
     1305     
    12121306    try { 
    12131307      ImporterOptions options = new ImporterOptions(); 
     
    12231317      fail(e.getMessage()); 
    12241318    } 
    1225  
     1319     
    12261320    return imps; 
    12271321  } 
    1228  
     1322   
    12291323  /** tests BF's options.setOpenAllSeries() */ 
    12301324  private void datasetOpenAllSeriesTester(boolean virtual, boolean openAll) 
    12311325  { 
    12321326    int x = 55, y = 20, z = 2, c = 3, t = 4, numSeries = 5; 
    1233  
     1327     
    12341328    String path = constructFakeFilename("openAllSeries", FormatTools.UINT32, x, y, z, c, t, numSeries, false, -1, false, -1); 
    1235  
     1329     
    12361330    int expectedNumImps = 1; 
    12371331    if (openAll) 
    12381332      expectedNumImps = numSeries; 
    1239  
     1333     
    12401334    ImagePlus[] imps = openSeriesTest(path,virtual,openAll); 
    12411335    impsCountTest(imps,expectedNumImps); 
     
    12431337      xyzctTest(imps[i],x,y,z,c,t); 
    12441338  } 
    1245  
     1339   
    12461340  /** tests BF's options.setOpenAllSeries() and options.setConcatenate() */ 
    12471341  private void datasetConcatenateTester(int pixType, int x, int y, int z, int c, int t, int s) 
    12481342  { 
    12491343    assertTrue(s >= 1);  // necessary for this test 
    1250  
     1344     
    12511345    // open all series as one 
    1252  
     1346     
    12531347    String path = constructFakeFilename("concat", pixType, x, y, z, c, t, s, false, -1, false, -1); 
    1254  
     1348     
    12551349    ImagePlus[] imps = null; 
    1256  
     1350     
    12571351    try { 
    12581352      ImporterOptions options = new ImporterOptions(); 
     
    12701364 
    12711365    // test results 
    1272  
     1366     
    12731367    impsCountTest(imps,1); 
    12741368 
    12751369    ImagePlus imp = imps[0]; 
    1276  
     1370     
    12771371    // with FakeFiles all dims compatible for concat, BF will concat along T. Thus t*s in next test. 
    12781372    xyzctTest(imp,x,y,z,c,t*s); 
    1279  
     1373     
    12801374    multipleSeriesInCztOrderTest(imp,s,z,c,t); 
    12811375  } 
    1282  
    1283  
     1376   
     1377  /** tests BF's options.setAutoscale() */ 
     1378  private void autoscaleTester(int pixType, boolean wantAutoscale) 
     1379  { 
     1380    if (DEBUG) log("autoscaleTester() : pix "+FormatTools.getPixelTypeString(pixType)+" scale "+wantAutoscale); 
     1381 
     1382    if ((pixType == FormatTools.UINT8) && (wantAutoscale)) 
     1383      if (DEBUG) log("  broken case"); 
     1384     
     1385    final int sizeZ = 2, sizeC = 3, sizeT = 4, sizeX = 51, sizeY = 16; 
     1386    final String path = constructFakeFilename("autoscale",pixType, sizeX, sizeY, sizeZ, sizeC, sizeT, -1, false, -1, false, -1); 
     1387     
     1388    ImagePlus[] imps = null; 
     1389     
     1390    try { 
     1391      ImporterOptions options = new ImporterOptions(); 
     1392      options.setAutoscale(wantAutoscale); 
     1393      options.setId(path); 
     1394      imps = BF.openImagePlus(options); 
     1395    } 
     1396    catch (IOException e) { 
     1397      fail(e.getMessage()); 
     1398    } 
     1399    catch (FormatException e) { 
     1400      fail(e.getMessage()); 
     1401    } 
     1402     
     1403    impsCountTest(imps,1); 
     1404     
     1405    ImagePlus imp = imps[0]; 
     1406 
     1407    xyzctTest(imp,sizeX,sizeY,sizeZ,sizeC,sizeT); 
     1408     
     1409    stackTest(imp,sizeZ*sizeC*sizeT); 
     1410 
     1411    calibrationTest(imp,pixType); 
     1412     
     1413    long maxPixVal = minPixelValue(pixType)+sizeX-1; 
     1414    long maxIndex = sizeZ*sizeC*sizeT - 1; 
     1415     
     1416    long expectedMax = expectedMax(pixType,wantAutoscale,maxPixVal,maxIndex); 
     1417    long expectedMin = expectedMin(pixType,wantAutoscale); 
     1418     
     1419    minMaxTest(imp,expectedMin,expectedMax); 
     1420  } 
     1421   
    12841422  private void ascendingValuesTest(byte[] data, int expectedLength) 
    12851423  { 
     
    12881426      assertEquals(i,data[i]&0xff); 
    12891427  } 
    1290  
     1428   
    12911429  // TODO : can I replace all calls to this to colorTests() passing numChannels == 1. Another way: modify lutTest() to 
    12921430  //   use a standard ImagePlus rather than a CompImg and have it call getColorTable(). Then pass in just RED ramped 
     
    12971435    // Therefore it creates a one channel ImagePlus with a LUT that only ramps the red channel. Test this to be 
    12981436    // the case. 
    1299  
     1437     
    13001438    assertFalse(imp instanceof CompositeImage); 
    1301  
     1439     
    13021440    if (indexed) 
    13031441    { 
     
    13061444        ; 
    13071445    } 
    1308  
     1446     
    13091447    LUT lut = getColorTable(imp,0); 
    1310  
     1448     
    13111449    byte[] data = new byte[256]; 
    1312  
     1450     
    13131451    if (color.getRed() > 0) 
    13141452    { 
     
    13271465    } 
    13281466  } 
    1329  
     1467   
    13301468  /** tests BF's options.setColorMode(composite) */ 
    13311469  private void colorDefaultTester(boolean virtual, int pixType, boolean indexed, int channels, int chanPerPlane, 
     
    13341472    if (DEBUG) log("colorDefaultTester(): pixType "+FormatTools.getPixelTypeString(pixType)+" indexed "+indexed+" channels "+ 
    13351473        channels+" chanPerPlane "+chanPerPlane+" falseColor "+falseColor+" numSeries "+numSeries+" defineLut "+wantLutDefined); 
    1336  
     1474     
    13371475    int sizeX = 55, sizeY = 71, sizeZ = 3, sizeT = 4; 
    1338  
     1476     
    13391477    // reportedly works in BF as long as numSeries*sizeC*3 <= 25 
    1340  
     1478     
    13411479    String path = constructFakeFilename("colorDefault", pixType, sizeX, sizeY, sizeZ, channels, sizeT, numSeries, 
    13421480        indexed, chanPerPlane, falseColor, -1); 
    1343  
     1481     
    13441482    ImagePlus[] imps = null; 
    1345  
     1483     
    13461484    try { 
    13471485      ImporterOptions options = new ImporterOptions(); 
     
    13641502 
    13651503    impsCountTest(imps,1); 
    1366  
     1504     
    13671505    ImagePlus imp = imps[0]; 
    13681506 
    13691507    int lutLen = 3; 
    1370  
     1508     
    13711509    int expectedSizeC = effectiveC(channels, chanPerPlane, lutLen, indexed, falseColor); 
    1372  
     1510    
    13731511    xyzctTest(imp,sizeX,sizeY,sizeZ,expectedSizeC,sizeT); 
    1374  
     1512     
    13751513    if ((expectedSizeC >= 2) && (expectedSizeC <= 7)) 
    13761514    { 
    13771515      assertTrue(imp.isComposite()); 
    1378  
     1516       
    13791517      CompositeImage ci = (CompositeImage)imp; 
    1380  
     1518       
    13811519      assertFalse(ci.hasCustomLuts()); 
    13821520 
     
    14001538        colorOrder = DEFAULT_COLOR_ORDER; 
    14011539      } 
    1402  
     1540       
    14031541      assertEquals(expectedType, ci.getMode()); 
    14041542      colorTests(ci,expectedSizeC,colorOrder); 
     
    14101548      imagePlusLutTest(imp,indexed,falseColor,DEFAULT_COLOR_ORDER[0]); 
    14111549    } 
    1412  
    1413     stackInCztOrderTest(imp,sizeZ,expectedSizeC,sizeT,indexed,falseColor); 
    1414  
     1550     
     1551    stackInCztOrderTest(imp,sizeZ,expectedSizeC,sizeT,indexed,falseColor,channels,chanPerPlane); 
     1552     
    14151553    // TODO : i've done no pixel testing 
    14161554  } 
    1417  
     1555   
    14181556  /** tests BF's options.setColorMode(composite) */ 
    14191557  private void colorCompositeTester(boolean virtual, int pixType, boolean indexed, int channels, int chanPerPlane, 
     
    14211559  { 
    14221560    if (DEBUG) log("colorCompositeTester(): pixType "+FormatTools.getPixelTypeString(pixType)+" indexed "+indexed+" channels "+channels+" chanPerPlane "+chanPerPlane+" falseColor "+falseColor+" numSeries "+numSeries); 
    1423  
     1561     
    14241562    int sizeX = 55, sizeY = 71, sizeZ = 3, sizeT = 4; 
    1425  
     1563     
    14261564    // reportedly works in BF as long as numSeries*sizeC*3 <= 25 
    1427  
     1565     
    14281566    String path = constructFakeFilename("colorComposite", pixType, sizeX, sizeY, sizeZ, channels, sizeT, numSeries, 
    14291567        indexed, chanPerPlane, falseColor, -1); 
    1430  
     1568     
    14311569    ImagePlus[] imps = null; 
    1432  
     1570     
    14331571    try { 
    14341572      ImporterOptions options = new ImporterOptions(); 
     
    14461584 
    14471585    impsCountTest(imps,1); 
    1448  
     1586     
    14491587    ImagePlus imp = imps[0]; 
    14501588 
    14511589    int lutLen = 3; 
    1452  
     1590     
    14531591    int expectedSizeC = effectiveC(channels, chanPerPlane, lutLen, indexed, falseColor); 
    1454  
     1592    
    14551593    xyzctTest(imp,sizeX,sizeY,sizeZ,expectedSizeC,sizeT); 
    1456  
     1594     
    14571595    if ((expectedSizeC >= 2) && (expectedSizeC <= 7)) 
    14581596    { 
    14591597      assertTrue(imp.isComposite()); 
    1460  
     1598       
    14611599      CompositeImage ci = (CompositeImage)imp; 
    1462  
     1600       
    14631601      assertFalse(ci.hasCustomLuts()); 
    14641602 
    14651603      assertEquals(CompositeImage.COMPOSITE, ci.getMode()); 
    1466  
     1604       
    14671605      colorTests(ci,expectedSizeC,DEFAULT_COLOR_ORDER); 
    14681606    } 
     
    14731611      imagePlusLutTest(imp,indexed,falseColor,DEFAULT_COLOR_ORDER[0]); 
    14741612    } 
    1475  
    1476     stackInCztOrderTest(imp,sizeZ,expectedSizeC,sizeT,indexed,falseColor); 
    1477  
     1613     
     1614    stackInCztOrderTest(imp,sizeZ,expectedSizeC,sizeT,indexed,falseColor,channels,chanPerPlane); 
     1615     
    14781616    // TODO : i've done no pixel testing 
    14791617  } 
     
    14841622  { 
    14851623    if (DEBUG) log("colorColorizedTester(): pixType "+FormatTools.getPixelTypeString(pixType)+" indexed "+indexed+" channels "+channels+" chanPerPlane "+chanPerPlane+" falseColor "+falseColor+" numSeries "+numSeries); 
    1486  
     1624     
    14871625    int sizeX = 55, sizeY = 71, sizeZ = 3, sizeT = 4; 
    1488  
     1626     
    14891627    String path = constructFakeFilename("colorColorized", pixType, sizeX, sizeY, sizeZ, channels, sizeT, numSeries, 
    14901628        indexed, chanPerPlane, falseColor, -1); 
    1491  
     1629     
    14921630    ImagePlus[] imps = null; 
    1493  
     1631     
    14941632    try { 
    14951633      ImporterOptions options = new ImporterOptions(); 
     
    15081646 
    15091647    impsCountTest(imps,1); 
    1510  
     1648     
    15111649    ImagePlus imp = imps[0]; 
    15121650 
    15131651    int lutLen = 3; 
    1514  
     1652     
    15151653    int expectedSizeC = effectiveC(channels, chanPerPlane, lutLen, indexed, falseColor); 
    1516  
     1654    
    15171655    xyzctTest(imp,sizeX,sizeY,sizeZ,expectedSizeC,sizeT); 
    1518  
     1656     
    15191657    if ((expectedSizeC >= 2) && (expectedSizeC <= 7)) 
    15201658    { 
    15211659      assertTrue(imp.isComposite()); 
    1522  
     1660       
    15231661      CompositeImage ci = (CompositeImage)imp; 
    1524  
     1662       
    15251663      assertFalse(ci.hasCustomLuts()); 
    15261664 
    15271665      assertEquals(CompositeImage.COLOR, ci.getMode()); 
    1528  
     1666       
    15291667      colorTests(ci,expectedSizeC,DEFAULT_COLOR_ORDER); 
    15301668    } 
     
    15351673      imagePlusLutTest(imp,indexed,falseColor,DEFAULT_COLOR_ORDER[0]); 
    15361674    } 
    1537  
    1538     stackInCztOrderTest(imp,sizeZ,expectedSizeC,sizeT,indexed,falseColor); 
    1539  
     1675     
     1676    stackInCztOrderTest(imp,sizeZ,expectedSizeC,sizeT,indexed,falseColor,channels,chanPerPlane); 
     1677     
    15401678    // TODO : i've done no pixel testing 
    15411679  } 
     
    15461684  { 
    15471685    if (DEBUG) log("colorGrayscaleTester(): pixType "+FormatTools.getPixelTypeString(pixType)+" indexed "+indexed+" channels "+channels+" chanPerPlane "+chanPerPlane+" falseColor "+falseColor+" numSeries "+numSeries); 
    1548  
     1686   
    15491687    int sizeX = 55, sizeY = 71, sizeZ = 3, sizeT = 4; 
    1550  
     1688   
    15511689    String path = constructFakeFilename("colorGrayscale", pixType, sizeX, sizeY, sizeZ, channels, sizeT, numSeries, 
    15521690    indexed, chanPerPlane, falseColor, -1); 
    1553  
     1691   
    15541692    ImagePlus[] imps = null; 
    1555  
     1693   
    15561694    try { 
    15571695      ImporterOptions options = new ImporterOptions(); 
     
    15671705      fail(e.getMessage()); 
    15681706    } 
    1569  
     1707   
    15701708    impsCountTest(imps,1); 
    1571  
     1709   
    15721710    ImagePlus imp = imps[0]; 
    1573  
     1711   
    15741712    int lutLen = 3; 
    1575  
     1713   
    15761714    int expectedSizeC = effectiveC(channels, chanPerPlane, lutLen, indexed, falseColor); 
    1577  
     1715   
    15781716    xyzctTest(imp,sizeX,sizeY,sizeZ,expectedSizeC,sizeT); 
    1579  
     1717   
    15801718    if ((expectedSizeC >= 2) && (expectedSizeC <= 7)) 
    15811719    { 
    15821720      assertTrue(imp.isComposite()); 
    1583  
     1721   
    15841722      CompositeImage ci = (CompositeImage)imp; 
    1585  
     1723   
    15861724      assertFalse(ci.hasCustomLuts()); 
    1587  
     1725   
    15881726      assertEquals(CompositeImage.GRAYSCALE, ci.getMode()); 
    1589  
     1727   
    15901728      colorTests(ci,expectedSizeC,DEFAULT_COLOR_ORDER); 
    15911729    } 
     
    15931731    { 
    15941732      assertFalse(imp.isComposite()); 
    1595  
     1733   
    15961734      imagePlusLutTest(imp,indexed,falseColor,DEFAULT_COLOR_ORDER[0]); 
    15971735    } 
    1598  
    1599     stackInCztOrderTest(imp,sizeZ,expectedSizeC,sizeT,indexed,falseColor); 
    1600  
     1736   
     1737    stackInCztOrderTest(imp,sizeZ,expectedSizeC,sizeT,indexed,falseColor,channels,chanPerPlane); 
     1738   
    16011739    // TODO : i've done no pixel testing 
    16021740  } 
     
    16071745  { 
    16081746    if (DEBUG) log("colorCustomTester(): pixType "+FormatTools.getPixelTypeString(pixType)+" indexed "+indexed+" channels "+channels+" chanPerPlane "+chanPerPlane+" falseColor "+falseColor+" numSeries "+numSeries); 
    1609  
     1747   
    16101748    int sizeX = 55, sizeY = 71, sizeZ = 3, sizeT = 4; 
    1611  
     1749   
    16121750    String path = constructFakeFilename("colorCustom", pixType, sizeX, sizeY, sizeZ, channels, sizeT, numSeries, 
    16131751    indexed, chanPerPlane, falseColor, -1); 
    1614  
     1752   
    16151753    ImagePlus[] imps = null; 
    1616  
     1754   
    16171755    try { 
    16181756      ImporterOptions options = new ImporterOptions(); 
     
    16321770      fail(e.getMessage()); 
    16331771    } 
    1634  
     1772   
    16351773    impsCountTest(imps,1); 
    1636  
     1774   
    16371775    ImagePlus imp = imps[0]; 
    1638  
     1776   
    16391777    int lutLen = 3; 
    1640  
     1778   
    16411779    int expectedSizeC = effectiveC(channels, chanPerPlane, lutLen, indexed, falseColor); 
    1642  
     1780   
    16431781    xyzctTest(imp,sizeX,sizeY,sizeZ,expectedSizeC,sizeT); 
    1644  
     1782   
    16451783    if ((expectedSizeC >= 2) && (expectedSizeC <= 7)) 
    16461784    { 
    16471785      assertTrue(imp.isComposite()); 
    1648  
     1786   
    16491787      CompositeImage ci = (CompositeImage)imp; 
    1650  
     1788   
    16511789      assertFalse(ci.hasCustomLuts()); 
    1652  
     1790   
    16531791      assertEquals(CompositeImage.COLOR, ci.getMode()); 
    1654  
     1792   
    16551793      colorTests(ci,expectedSizeC,CUSTOM_COLOR_ORDER); 
    16561794    } 
     
    16581796    { 
    16591797      assertFalse(imp.isComposite()); 
    1660  
     1798   
    16611799      imagePlusLutTest(imp,indexed,falseColor,CUSTOM_COLOR_ORDER[0]); 
    16621800    } 
    1663  
    1664     stackInCztOrderTest(imp,sizeZ,expectedSizeC,sizeT,indexed,falseColor); 
    1665  
     1801   
     1802    stackInCztOrderTest(imp,sizeZ,expectedSizeC,sizeT,indexed,falseColor,channels,chanPerPlane); 
     1803   
    16661804    // TODO : i've done no pixel testing 
    16671805  } 
    1668  
     1806   
    16691807  /** tests BF's options.setVirtual() */ 
    16701808  private void memoryVirtualStackTester(boolean desireVirtual) 
    16711809  { 
    16721810      int x = 604, y = 531, z = 7, c = 1, t = 1; 
    1673  
     1811       
    16741812      String path = constructFakeFilename("vstack", FormatTools.UINT16, x, y, z, c, t, -1, false, -1, false, -1); 
    1675  
     1813       
    16761814      // open stack 
    16771815      ImagePlus[] imps = null; 
    1678  
     1816     
    16791817      try { 
    16801818        ImporterOptions options = new ImporterOptions(); 
     
    16891827        fail(e.getMessage()); 
    16901828      } 
    1691  
     1829   
    16921830      // test results 
    16931831      impsCountTest(imps,1); 
    1694  
     1832       
    16951833      ImagePlus imp = imps[0]; 
    1696  
     1834       
    16971835      xyzctTest(imp,x,y,z,c,t); 
    1698  
     1836   
    16991837      assertEquals(desireVirtual,imp.getStack().isVirtual()); 
    17001838  } 
    17011839 
    17021840  /** tests BF's options.setVirtual() with options.setRecord() */ 
    1703   /* TODO - underlying BF code is not working. Comment out for now 
    17041841  private void memoryRecordModificationsTester(boolean wantToRemember) 
    17051842  { 
    17061843    int x = 50, y = 15, z = 3, c = 1, t = 1; 
    1707  
     1844     
    17081845    String path = constructFakeFilename("memRec", FormatTools.UINT8, x, y, z, c, t, -1, false, -1, false, -1); 
    1709  
     1846     
    17101847    ImagePlus[] imps = null; 
    1711  
     1848     
    17121849    assertTrue(y > 10);  // needed for this test 
    17131850    assertTrue(z > 1); 
    1714  
     1851     
    17151852    // open file 
    17161853    try { 
     
    17301867    // basic tests 
    17311868    impsCountTest(imps,1); 
    1732  
     1869     
    17331870    ImagePlus imp = imps[0]; 
    1734  
     1871     
    17351872    xyzctTest(imp,x,y,z,c,t); 
    17361873 
     
    17441881    IJ.run("Invert","slice"); 
    17451882    assertEquals(254,(int)imp.getProcessor().getPixelValue(1,10)); 
    1746  
     1883     
    17471884    imp.setSlice(2); 
    17481885    assertEquals(1,(int)imp.getProcessor().getPixelValue(1,10)); 
    1749  
     1886     
    17501887    imp.setSlice(1); 
    17511888    int expectedVal = wantToRemember ? 254 : 1; 
    17521889    assertEquals(expectedVal,(int)imp.getProcessor().getPixelValue(1,10)); 
    17531890  } 
    1754   */ 
    1755  
     1891   
    17561892  /** tests BF's options.set?Begin(), options.set?End(), and options.set?Step() */ 
    17571893  private void memorySpecifyRangeTester(int z, int c, int t, 
     
    17591895      int cFrom, int cTo, int cBy, 
    17601896      int tFrom, int tTo, int tBy) 
    1761   { 
     1897  {  
    17621898    int pixType = FormatTools.UINT8, x=50, y=5; 
    17631899 
    17641900    String path = constructFakeFilename("range", pixType, x, y, z, c, t, -1, false, -1, false, -1); 
    1765  
     1901     
    17661902    ImagePlus[] imps = null; 
    17671903 
     
    17691905      ImporterOptions options = new ImporterOptions(); 
    17701906      options.setId(path); 
    1771  
     1907       
    17721908      // only set values when nondefault behavior specified 
    1773  
     1909       
    17741910      // z's 
    17751911      if (zFrom != 0) 
     
    17791915      if (zBy != 1) 
    17801916        options.setZStep(0, zBy); 
    1781  
     1917       
    17821918      // c's 
    17831919      if (cFrom != 0) 
     
    17871923      if (cBy != 1) 
    17881924        options.setCStep(0, cBy); 
    1789  
     1925       
    17901926      // t's 
    17911927      if (tFrom != 0) 
     
    17951931      if (tBy != 1) 
    17961932        options.setTStep(0, tBy); 
    1797  
     1933         
    17981934      imps = BF.openImagePlus(options); 
    17991935    } 
     
    18041940      fail(e.getMessage()); 
    18051941    } 
    1806  
     1942     
    18071943    // should have the data in one series 
    18081944    impsCountTest(imps,1); 
    1809  
     1945     
    18101946    ImagePlus imp = imps[0]; 
    1811  
     1947     
    18121948    xyzctTest(imp,x,y,numInSeries(zFrom,zTo,zBy),numInSeries(cFrom,cTo,cBy),numInSeries(tFrom,tTo,tBy)); 
    18131949 
     
    18151951    seriesInZctOrderTest(imp,false,false,zFrom,zTo,zBy,cFrom,cTo,cBy,tFrom,tTo,tBy); 
    18161952  } 
    1817  
     1953   
    18181954  /** tests BF's options.setCrop() and options.setCropRegion() */ 
    18191955  private void memoryCropTester(int x, int y, int ox, int oy, int cropSize) 
     
    18221958 
    18231959    String path = constructFakeFilename("crop", FormatTools.UINT8, x, y, 1, 1, 1, -1, false, -1, false, -1); 
    1824  
     1960     
    18251961    // open image 
    18261962    ImagePlus[] imps = null; 
    1827  
     1963     
    18281964    try { 
    18291965      ImporterOptions options = new ImporterOptions(); 
     
    18441980 
    18451981    ImagePlus imp = imps[0]; 
    1846  
     1982     
    18471983    xyzctTest(imp,cropSize,cropSize,1,1,1); 
    1848  
     1984     
    18491985    // test we got the right pixels 
    18501986    croppedPixelsTest(imp,ox,cropSize); 
     
    18611997    // open image 
    18621998    ImagePlus[] imps = null; 
    1863  
     1999     
    18642000    try { 
    18652001      ImporterOptions options = new ImporterOptions(); 
     
    18772013    // one image per channel 
    18782014    impsCountTest(imps,sizeC); 
    1879  
     2015     
    18802016    imagesCInZtOrderTest(imps,sizeX,sizeY,sizeZ,sizeC,sizeT); 
    18812017  } 
     
    18852021  { 
    18862022    final int sizeX = 50, sizeY = 20, sizeZ = 5, sizeC = 3, sizeT = 7; 
    1887  
     2023     
    18882024    final String path = constructFakeFilename("splitZ", 
    18892025      FormatTools.UINT8, sizeX, sizeY, sizeZ, sizeC, sizeT, -1, false, -1, false, -1); 
     
    18912027    // open image 
    18922028    ImagePlus[] imps = null; 
    1893  
     2029     
    18942030    try { 
    18952031      ImporterOptions options = new ImporterOptions(); 
     
    19042040      fail(e.getMessage()); 
    19052041    } 
    1906  
     2042     
    19072043    // one image per focal plane 
    19082044    impsCountTest(imps,sizeZ); 
     
    19102046    imagesZInCtOrderTest(imps,sizeX,sizeY,sizeZ,sizeC,sizeT); 
    19112047  } 
    1912  
     2048   
    19132049  /** tests BF's options.setSplitTimepoints() */ 
    19142050  private void splitTimepointsTester() 
    19152051  { 
    19162052    final int sizeX = 50, sizeY = 20, sizeZ = 5, sizeC = 3, sizeT = 7; 
    1917  
     2053   
    19182054    final String path = constructFakeFilename("splitT", 
    19192055      FormatTools.UINT8, 50, 20, sizeZ, sizeC, sizeT, -1, false, -1, false, -1); 
     
    19212057    // open image 
    19222058    ImagePlus[] imps = null; 
    1923  
     2059     
    19242060    try { 
    19252061      ImporterOptions options = new ImporterOptions(); 
     
    19342070      fail(e.getMessage()); 
    19352071    } 
    1936  
     2072     
    19372073    // one image per time point 
    19382074    impsCountTest(imps,sizeT); 
     
    19422078 
    19432079  // note - this test needs to rely on crop() to get predictable nonzero minimums 
    1944  
     2080   
     2081  /** tests BF's options.setCrop() and options.setCropRegion() with options.setAutoscale() */ 
     2082  private void comboCropAndAutoscaleTester(int pixType, int sizeX, int sizeY, int sizeZ, int sizeC, int sizeT, 
     2083      int originCropX, int originCropY, int sizeCrop) 
     2084  { 
     2085    final String path = constructFakeFilename("cropAutoscale",pixType, sizeX, sizeY, sizeZ, sizeC, sizeT, -1, false, -1, false, -1); 
     2086     
     2087    // needed for this test 
     2088    verifyCropInput(sizeX,sizeY,originCropX,originCropY,sizeCrop); 
     2089     
     2090    ImagePlus[] imps = null; 
     2091     
     2092    try { 
     2093      ImporterOptions options = new ImporterOptions(); 
     2094      options.setAutoscale(true); 
     2095      options.setCrop(true); 
     2096      options.setCropRegion(0,new Region(originCropX,originCropY,sizeCrop,sizeCrop)); 
     2097      options.setId(path); 
     2098      imps = BF.openImagePlus(options); 
     2099    } 
     2100    catch (IOException e) { 
     2101      fail(e.getMessage()); 
     2102    } 
     2103    catch (FormatException e) { 
     2104      fail(e.getMessage()); 
     2105    } 
     2106     
     2107    impsCountTest(imps,1); 
     2108     
     2109    ImagePlus imp = imps[0]; 
     2110     
     2111    xyzctTest(imps[0],sizeCrop,sizeCrop,sizeZ,sizeC,sizeT); 
     2112 
     2113    stackTest(imp,(sizeZ*sizeC*sizeT)); 
     2114     
     2115    calibrationTest(imp,pixType); 
     2116     
     2117    long expectedMax = minPixelValue(pixType) + originCropX + sizeCrop - 1; 
     2118    long expectedMin = minPixelValue(pixType) + originCropX; 
     2119 
     2120    if (pixType == FormatTools.INT16)  // hack : clamp like IJ does 
     2121    { 
     2122      if (expectedMin < 0) 
     2123        expectedMin = 0; 
     2124      if (expectedMax > 65535) 
     2125        expectedMax = 65535; 
     2126    } 
     2127 
     2128    // NOTE - the minMaxTest can't work for INT32 as it has more precision than can be represented by IJ's GRAY32 float 
     2129    if (pixType != FormatTools.INT32) 
     2130      minMaxTest(imp,expectedMin,expectedMax); 
     2131  } 
     2132   
    19452133  /** tests BF's options.setConcatenate() with options.setSplitFocalPlanes() */ 
    19462134  private void comboConcatSplitFocalPlanesTester() 
     
    19502138 
    19512139    final int sizeX = 50, sizeY = 20, sizeZ = 3, sizeC = 5, sizeT = 7, series = 4; 
    1952  
     2140     
    19532141    final String path = constructFakeFilename("concatSplitZ", 
    19542142      FormatTools.UINT8, sizeX, sizeY, sizeZ, sizeC, sizeT, series, false, -1, false, -1); 
     
    19712159      fail(e.getMessage()); 
    19722160    } 
    1973  
     2161     
    19742162    // one image per focal plane 
    19752163    impsCountTest(imps,sizeZ); 
     
    19772165    imageSeriesZInCtOrderTest(imps,series,sizeX,sizeY,sizeZ,sizeC,sizeT); 
    19782166  } 
    1979  
     2167   
    19802168  /** tests BF's options.setConcatenate() with options.setSplitChannels() */ 
    19812169  private void comboConcatSplitChannelsTester() 
     
    19852173 
    19862174    final int sizeX = 50, sizeY = 20, sizeZ = 3, sizeC = 5, sizeT = 7, series = 4; 
    1987  
     2175     
    19882176    final String path = constructFakeFilename("concatSplitC", 
    19892177      FormatTools.UINT8, sizeX, sizeY, sizeZ, sizeC, sizeT, series, false, -1, false, -1); 
     
    19912179    // open image 
    19922180    ImagePlus[] imps = null; 
    1993  
     2181     
    19942182    try { 
    19952183      ImporterOptions options = new ImporterOptions(); 
     
    20062194      fail(e.getMessage()); 
    20072195    } 
    2008  
     2196     
    20092197    // one image per channel 
    20102198    impsCountTest(imps,sizeC); 
    2011  
     2199     
    20122200    imageSeriesCInZtOrderTest(imps,series,sizeX,sizeY,sizeZ,sizeC,sizeT); 
    20132201  } 
    2014  
     2202   
    20152203  /** tests BF's options.setConcatenate() with options.setSplitTimepoints() */ 
    20162204  private void comboConcatSplitTimepointsTester() 
     
    20202208 
    20212209    final int sizeX = 50, sizeY = 20, sizeZ = 3, sizeC = 5, sizeT = 7, numSeries = 4; 
    2022  
     2210   
    20232211    final String path = constructFakeFilename("concatSplitT", 
    20242212      FormatTools.UINT8, sizeX, sizeY, sizeZ, sizeC, sizeT, numSeries, false, -1, false, -1); 
     
    20262214    // open image 
    20272215    ImagePlus[] imps = null; 
    2028  
     2216     
    20292217    try { 
    20302218      ImporterOptions options = new ImporterOptions(); 
     
    20412229      fail(e.getMessage()); 
    20422230    } 
    2043  
     2231     
    20442232    // numSeries images per timepoint 
    20452233    impsCountTest(imps,sizeT*numSeries); 
    2046  
     2234     
    20472235    imageSeriesTInCzOrderTest(imps,numSeries,sizeX,sizeY,sizeZ,sizeC,sizeT); 
    20482236  } 
    2049  
     2237   
    20502238  /** tests BF's options.setColormode(composite) - alternate, later definition */ 
    20512239  private void compositeSubcaseTester(int sizeC, boolean indexed) 
     
    20532241    int pixType = FormatTools.UINT8, sizeX = 60, sizeY = 30, sizeZ = 2, sizeT = 3, numSeries = 1, rgb = -1, lutLen = -1; 
    20542242    boolean falseColor = false; 
    2055  
     2243     
    20562244    String path = constructFakeFilename("colorComposite", pixType, sizeX, sizeY, sizeZ, sizeC, sizeT, numSeries, indexed, 
    20572245                                          rgb, falseColor, lutLen); 
    20582246 
    20592247    ImagePlus[] imps = null; 
    2060  
     2248     
    20612249    try { 
    20622250      ImporterOptions options = new ImporterOptions(); 
     
    20732261 
    20742262    impsCountTest(imps,1); 
    2075  
     2263     
    20762264    ImagePlus imp = imps[0]; 
    20772265 
     
    20812269 
    20822270    CompositeImage ci = (CompositeImage)imp; 
    2083  
     2271     
    20842272    assertFalse(ci.hasCustomLuts()); 
    20852273 
    20862274    assertEquals(CompositeImage.COMPOSITE, ci.getMode()); 
    2087  
     2275     
    20882276    colorTests(ci,sizeC,DEFAULT_COLOR_ORDER); 
    2089  
     2277       
    20902278    stackInZctOrderTest(imp,sizeZ,sizeC,sizeT,indexed,falseColor); 
    2091  
     2279     
    20922280    pixelsTest(imp,pixType,indexed,falseColor); 
    20932281  } 
    2094  
     2282   
    20952283// ** ImporterTest methods ************************************************************** 
    20962284 
     
    21262314  public void testDatasetOpenFilesIndividually() 
    21272315  { 
    2128     if (RUN_SPECIAL_TESTS) { 
    2129       for (boolean virtual : BOOLEAN_STATES) 
    2130         datasetOpenFilesIndividuallyTester(virtual); 
    2131     } 
    2132   } 
    2133  
     2316    for (boolean virtual : BOOLEAN_STATES) 
     2317      datsetOpenFilesIndividuallyTester(virtual); 
     2318  } 
     2319   
    21342320  @Test 
    21352321  public void testDatasetSwapDims() 
     
    21672353  { 
    21682354    // NOTE: for now we will not use a virtual boolean with datasetConcatenateTester() as that combo not a legal one in BF 
    2169  
     2355     
    21702356    // open a dataset that has multiple series and should get back a single series 
    21712357    datasetConcatenateTester(FormatTools.UINT8, 82, 47, 1, 1, 1, 1); 
     
    21812367        for (boolean defineLutEntry : BOOLEAN_STATES) { 
    21822368      // these here to simplify debugging 
    2183  
     2369   
    21842370          // edge cases in number of channels nonindexed in one series 
    21852371          colorDefaultTester(virtual,pixType,NOT_INDEXED,1,1,REAL_COLOR,ONE_SERIES,defineLutEntry); 
     
    21872373          colorDefaultTester(virtual,pixType,NOT_INDEXED,7,7,REAL_COLOR,ONE_SERIES,defineLutEntry); 
    21882374          colorDefaultTester(virtual,pixType,NOT_INDEXED,8,8,REAL_COLOR,ONE_SERIES,defineLutEntry); 
    2189  
     2375       
    21902376          // edge cases in number of channels nonindexed in one series 
    21912377          colorDefaultTester(virtual,pixType,NOT_INDEXED,4,4,REAL_COLOR,ONE_SERIES,defineLutEntry); 
    21922378          colorDefaultTester(virtual,pixType,NOT_INDEXED,6,3,REAL_COLOR,ONE_SERIES,defineLutEntry); 
    21932379          colorDefaultTester(virtual,pixType,NOT_INDEXED,12,3,REAL_COLOR,ONE_SERIES,defineLutEntry); 
    2194  
     2380       
    21952381          // edge case : standard 3 chan planar layout 
    21962382          colorDefaultTester(virtual,pixType,NOT_INDEXED,3,1,REAL_COLOR,ONE_SERIES,defineLutEntry); 
    2197  
     2383       
    21982384          // edge case 1 channel indexed 
    21992385          // TODO - this one fails UINT8 before I used general pixTypes. With gen pix types indexed does not make sense. 
     
    22032389    } 
    22042390  } 
    2205  
     2391   
    22062392  @Test 
    22072393  public void testColorComposite() 
    22082394  { 
    22092395    for (boolean virtual : new boolean[]{false,true}) { 
    2210  
     2396       
    22112397      // these here to simplify debugging 
    2212  
     2398   
    22132399      // edge cases in number of channels nonindexed in one series 
    22142400      // TODO : next one fails when virtual true 
     
    22182404      // TODO : next one fails when virtual true 
    22192405      colorCompositeTester(virtual,FormatTools.UINT8,NOT_INDEXED,8,8,REAL_COLOR,ONE_SERIES); 
    2220  
     2406   
    22212407      // edge cases in number of channels nonindexed in one series 
    22222408      colorCompositeTester(virtual,FormatTools.UINT8,NOT_INDEXED,4,4,REAL_COLOR,ONE_SERIES); 
     
    22242410      // TODO : next one fails when virtual true 
    22252411      colorCompositeTester(virtual,FormatTools.UINT8,NOT_INDEXED,12,3,REAL_COLOR,ONE_SERIES); 
    2226  
     2412   
    22272413      // edge case : standard 3 chan planar layout 
    22282414      colorCompositeTester(virtual,FormatTools.UINT8,NOT_INDEXED,3,1,REAL_COLOR,ONE_SERIES); 
    2229  
     2415   
    22302416      // edge case 1 channel indexed 
    22312417      // TODO - this one fails. Actual czt vals back from code are all zeroes 2/3 of the time (1 chan goes to 3) 
    22322418      //colorCompositeTester(FormatTools.UINT8,INDEXED,1,1,REAL_COLOR,ONE_SERIES); 
    2233  
     2419   
    22342420      // general test loop 
    22352421      int[] pixTypes = new int[] {FormatTools.UINT8,FormatTools.UINT16}; 
     
    22372423      int[] series = new int[] {1,2,3,4}; 
    22382424      int[] channelsPerPlaneVals = new int[]{1,2,3}; 
    2239  
     2425       
    22402426      for (int pixFormat : pixTypes) { 
    22412427        for (int chanCount : channels) { 
     
    22442430              for (boolean indexed : new boolean[]{false}) {  // TODO - indexed not test right now : replace with BOOLEAN_STATES 
    22452431                for (boolean falseColor : BOOLEAN_STATES) { 
    2246  
     2432   
    22472433                  //if (DEBUG) log(" format "+pixFormat+"indexed "+indexed+" rgb "+rgb+" fasleColor "+falseColor+" c "+c+" s "+s); 
    2248  
     2434                   
    22492435                  // TODO see what happens when we remove this 
    22502436                  //if ((chanCount*numSeries*3) > 25)  // IJ slider limitation 
     
    22532439                  //  continue; 
    22542440                  //} 
    2255  
     2441                   
    22562442                  if (!indexed && falseColor)  // invalid combo - skip 
    22572443                    continue; 
    2258  
     2444                   
    22592445                  if ((chanCount % channelsPerPlane) != 0)  // invalid combo - skip 
    22602446                    continue; 
    2261  
     2447                   
    22622448                  colorCompositeTester(virtual,pixFormat,indexed,chanCount,channelsPerPlane,falseColor,numSeries); 
    22632449                } 
     
    22692455    } 
    22702456  } 
    2271  
     2457   
    22722458  @Test 
    22732459  public void testColorColorized() 
     
    22762462      for (boolean virtual : new boolean[]{false,true}) { 
    22772463        // these here to simplify debugging 
    2278  
     2464     
    22792465        // edge cases in number of channels nonindexed in one series 
    22802466        colorColorizedTester(virtual,pixType,NOT_INDEXED,1,1,REAL_COLOR,ONE_SERIES); 
     
    22822468        colorColorizedTester(virtual,pixType,NOT_INDEXED,7,7,REAL_COLOR,ONE_SERIES); 
    22832469        colorColorizedTester(virtual,pixType,NOT_INDEXED,8,8,REAL_COLOR,ONE_SERIES); 
    2284  
     2470     
    22852471        // edge cases in number of channels nonindexed in one series 
    22862472        colorColorizedTester(virtual,pixType,NOT_INDEXED,4,4,REAL_COLOR,ONE_SERIES); 
    22872473        colorColorizedTester(virtual,pixType,NOT_INDEXED,6,3,REAL_COLOR,ONE_SERIES); 
    22882474        colorColorizedTester(virtual,pixType,NOT_INDEXED,12,3,REAL_COLOR,ONE_SERIES); 
    2289  
     2475     
    22902476        // edge case : standard 3 chan planar layout 
    22912477        colorColorizedTester(virtual,pixType,NOT_INDEXED,3,1,REAL_COLOR,ONE_SERIES); 
    2292  
     2478     
    22932479        // edge case 1 channel indexed 
    22942480        // TODO - this one fails UINT8 before I used general pixTypes. With gen pix types indexed does not make sense. 
     
    22972483    } 
    22982484  } 
    2299  
     2485   
    23002486  @Test 
    23012487  public void testColorGrayscale() 
     
    23042490      for (boolean virtual : new boolean[]{false,true}) { 
    23052491        // these here to simplify debugging 
    2306  
     2492     
    23072493        // edge cases in number of channels nonindexed in one series 
    23082494        colorGrayscaleTester(virtual,pixType,NOT_INDEXED,1,1,REAL_COLOR,ONE_SERIES); 
     
    23102496        colorGrayscaleTester(virtual,pixType,NOT_INDEXED,7,7,REAL_COLOR,ONE_SERIES); 
    23112497        colorGrayscaleTester(virtual,pixType,NOT_INDEXED,8,8,REAL_COLOR,ONE_SERIES); 
    2312  
     2498     
    23132499        // edge cases in number of channels nonindexed in one series 
    23142500        colorGrayscaleTester(virtual,pixType,NOT_INDEXED,4,4,REAL_COLOR,ONE_SERIES); 
    23152501        colorGrayscaleTester(virtual,pixType,NOT_INDEXED,6,3,REAL_COLOR,ONE_SERIES); 
    23162502        colorGrayscaleTester(virtual,pixType,NOT_INDEXED,12,3,REAL_COLOR,ONE_SERIES); 
    2317  
     2503     
    23182504        // edge case : standard 3 chan planar layout 
    23192505        colorGrayscaleTester(virtual,pixType,NOT_INDEXED,3,1,REAL_COLOR,ONE_SERIES); 
    2320  
     2506     
    23212507        // edge case 1 channel indexed 
    23222508        // TODO - this one fails UINT8 before I used general pixTypes. With gen pix types indexed does not make sense. 
     
    23252511    } 
    23262512  } 
    2327  
     2513   
    23282514  @Test 
    23292515  public void testColorCustom() 
     
    23322518      for (boolean virtual : new boolean[]{false,true}) { 
    23332519        // these here to simplify debugging 
    2334  
     2520     
    23352521        // edge cases in number of channels nonindexed in one series 
    23362522        colorCustomTester(virtual,pixType,NOT_INDEXED,1,1,REAL_COLOR,ONE_SERIES); 
     
    23382524        colorCustomTester(virtual,pixType,NOT_INDEXED,7,7,REAL_COLOR,ONE_SERIES); 
    23392525        colorCustomTester(virtual,pixType,NOT_INDEXED,8,8,REAL_COLOR,ONE_SERIES); 
    2340  
     2526     
    23412527        // edge cases in number of channels nonindexed in one series 
    23422528        colorCustomTester(virtual,pixType,NOT_INDEXED,4,4,REAL_COLOR,ONE_SERIES); 
    23432529        colorCustomTester(virtual,pixType,NOT_INDEXED,6,3,REAL_COLOR,ONE_SERIES); 
    23442530        colorCustomTester(virtual,pixType,NOT_INDEXED,12,3,REAL_COLOR,ONE_SERIES); 
    2345  
     2531     
    23462532        // edge case : standard 3 chan planar layout 
    23472533        colorCustomTester(virtual,pixType,NOT_INDEXED,3,1,REAL_COLOR,ONE_SERIES); 
    2348  
     2534     
    23492535        // edge case 1 channel indexed 
    23502536        // TODO - this one fails UINT8 before I used general pixTypes. With gen pix types indexed does not make sense. 
     
    23532539    } 
    23542540 
    2355     /* old way 
     2541    /* old way     
    23562542    int[] pixTypes = new int[]{FormatTools.UINT8, FormatTools.UINT16, FormatTools.FLOAT}; 
    23572543    int[] xs = new int[] {45}; 
     
    23612547    int[] ts = new int[] {1,2}; 
    23622548    int[] series = new int[] {1,2,3,4}; 
    2363  
     2549     
    23642550    for (int pixFormat : pixTypes) 
    23652551      for (int x : xs) 
     
    23762562    */ 
    23772563  } 
    2378  
     2564   
    23792565  @Test 
    23802566  public void testColorAutoscale() 
    23812567  { 
    2382     new AutoscaleTest().testAutoscale(); 
    2383   } 
    2384  
     2568    // note - can't autoscale a virtualStack. No need to test it. 
     2569     
     2570    for (int pixType : PIXEL_TYPES) { 
     2571      for (boolean autoscale : BOOLEAN_STATES) { 
     2572        log("testColorAutoscale(): pixType = "+FormatTools.getPixelTypeString(pixType)+" autoscale = "+autoscale); 
     2573        autoscaleTester(pixType,autoscale); 
     2574      } 
     2575    } 
     2576  } 
    23852577 
    23862578  @Test 
     
    23922584 
    23932585/* TODO - underlying BF code is not working. Comment out for now 
     2586   
    23942587  @Test 
    23952588  public void testMemoryRecordModifications() 
    23962589  { 
    23972590    // recordMemory has virtual always set to true. no need to do any other virtual testing 
    2398  
     2591     
    23992592    for (boolean rememberChanges : BOOLEAN_STATES) 
    24002593      memoryRecordModificationsTester(rememberChanges); 
    24012594  } 
    24022595*/ 
    2403  
     2596   
    24042597  @Test 
    24052598  public void testMemorySpecifyRange() 
    24062599  { 
    24072600    // note - can't specify range in a virtualStack - no need to test 
    2408  
     2601     
    24092602    int z,c,t,zFrom,zTo,zBy,cFrom,cTo,cBy,tFrom,tTo,tBy; 
    24102603 
     
    24122605    z=8; c=3; t=2; zFrom=2; zTo=z-1; zBy=1; cFrom=0; cTo=c-1; cBy=1; tFrom=0; tTo=t-1; tBy=1; 
    24132606    memorySpecifyRangeTester(z,c,t,zFrom,zTo,zBy,cFrom,cTo,cBy,tFrom,tTo,tBy); 
    2414  
     2607     
    24152608    // test partial z: to 
    24162609    z=8; c=3; t=2; zFrom=0; zTo=4; zBy=1; cFrom=0; cTo=c-1; cBy=1; tFrom=0; tTo=t-1; tBy=1; 
     
    24242617    z=8; c=3; t=2; zFrom=2; zTo=7; zBy=3; cFrom=0; cTo=c-1; cBy=1; tFrom=0; tTo=t-1; tBy=1; 
    24252618    memorySpecifyRangeTester(z,c,t,zFrom,zTo,zBy,cFrom,cTo,cBy,tFrom,tTo,tBy); 
    2426  
     2619     
    24272620    // test partial c: from 
    24282621    z=6; c=14; t=4; zFrom=0; zTo=z-1; zBy=1; cFrom=3; cTo=c-1; cBy=1; tFrom=0; tTo=t-1; tBy=1; 
    24292622    memorySpecifyRangeTester(z,c,t,zFrom,zTo,zBy,cFrom,cTo,cBy,tFrom,tTo,tBy); 
    2430  
     2623     
    24312624    // test partial c: to 
    24322625    z=6; c=14; t=4; zFrom=0; zTo=z-1; zBy=1; cFrom=0; cTo=6; cBy=1; tFrom=0; tTo=t-1; tBy=1; 
    24332626    memorySpecifyRangeTester(z,c,t,zFrom,zTo,zBy,cFrom,cTo,cBy,tFrom,tTo,tBy); 
    2434  
     2627     
    24352628    // test partial c: by 
    24362629    z=6; c=14; t=4; zFrom=0; zTo=z-1; zBy=1; cFrom=0; cTo=c-1; cBy=4; tFrom=0; tTo=t-1; tBy=1; 
    24372630    memorySpecifyRangeTester(z,c,t,zFrom,zTo,zBy,cFrom,cTo,cBy,tFrom,tTo,tBy); 
    2438  
     2631     
    24392632    // test full c 
    24402633    z=6; c=14; t=4; zFrom=0; zTo=z-1; zBy=1; cFrom=0; cTo=12; cBy=4; tFrom=0; tTo=t-1; tBy=1; 
    24412634    memorySpecifyRangeTester(z,c,t,zFrom,zTo,zBy,cFrom,cTo,cBy,tFrom,tTo,tBy); 
    2442  
     2635     
    24432636    // test partial t: from 
    24442637    z=3; c=5; t=13; zFrom=0; zTo=z-1; zBy=1; cFrom=0; cTo=c-1; cBy=1; tFrom=4; tTo=t-1; tBy=1; 
    24452638    memorySpecifyRangeTester(z,c,t,zFrom,zTo,zBy,cFrom,cTo,cBy,tFrom,tTo,tBy); 
    2446  
     2639     
    24472640    // test partial t: to 
    24482641    z=3; c=5; t=13; zFrom=0; zTo=z-1; zBy=1; cFrom=0; cTo=c-1; cBy=1; tFrom=0; tTo=8; tBy=1; 
    24492642    memorySpecifyRangeTester(z,c,t,zFrom,zTo,zBy,cFrom,cTo,cBy,tFrom,tTo,tBy); 
    2450  
     2643     
    24512644    // test partial t: by 
    24522645    z=3; c=5; t=13; zFrom=0; zTo=z-1; zBy=1; cFrom=0; cTo=c-1; cBy=1; tFrom=0; tTo=t-1; tBy=2; 
    24532646    memorySpecifyRangeTester(z,c,t,zFrom,zTo,zBy,cFrom,cTo,cBy,tFrom,tTo,tBy); 
    2454  
     2647     
    24552648    // test full t 
    24562649    z=3; c=5; t=13; zFrom=0; zTo=z-1; zBy=1; cFrom=0; cTo=c-1; cBy=1; tFrom=4; tTo=13; tBy=2; 
    24572650    memorySpecifyRangeTester(z,c,t,zFrom,zTo,zBy,cFrom,cTo,cBy,tFrom,tTo,tBy); 
    2458  
     2651     
    24592652    // test edge case combo with an invalid by 
    24602653    z=2; c=2; t=2; zFrom=0; zTo=0; zBy=2; cFrom=1; cTo=1; cBy=1; tFrom=0; tTo=1; tBy=1; 
     
    24642657    z=5; c=4; t=6; zFrom=1; zTo=4; zBy=2; cFrom=1; cTo=3; cBy=1; tFrom=2; tTo=5; tBy=2; 
    24652658    memorySpecifyRangeTester(z,c,t,zFrom,zTo,zBy,cFrom,cTo,cBy,tFrom,tTo,tBy); 
    2466  
     2659     
    24672660    // test another combination of zct's 
    24682661    z=7; c=7; t=7; zFrom=3; zTo=6; zBy=4; cFrom=1; cTo=6; cBy=3; tFrom=0; tTo=2; tBy=2; 
    24692662    memorySpecifyRangeTester(z,c,t,zFrom,zTo,zBy,cFrom,cTo,cBy,tFrom,tTo,tBy); 
    2470  
     2663     
    24712664    // test bad combination of zct's - choosing beyond ends of ranges 
    2472  
     2665     
    24732666    // z index before 0 begin 
    24742667    try { 
     
    24882681      assertTrue(true); 
    24892682    } 
    2490  
     2683     
    24912684    // z by < 1 
    24922685    try { 
     
    25512744      assertTrue(true); 
    25522745    } 
    2553  
     2746     
    25542747    /* TODO - could replace above code with this uber combo test 
    25552748    // comprehensive but probably WAY too much computation to finish in reasonable time 
     
    25922785    */ 
    25932786  } 
    2594  
     2787   
    25952788  @Test 
    25962789  public void testMemoryCrop() 
    25972790  { 
    25982791    // note - can't crop a virtualStack. therefore no need to test it. 
    2599  
     2792     
    26002793    memoryCropTester(203, 255, 55, 20, 3); 
    26012794    memoryCropTester(203, 184, 55, 40, 2); 
     
    26032796    memoryCropTester(100, 122, 0, 15, 3); 
    26042797  } 
    2605  
     2798   
    26062799  @Test 
    26072800  public void testSplitChannels() 
     
    26222815    splitTimepointsTester(); 
    26232816  } 
    2624  
    2625  
     2817   
     2818  @Test 
     2819  public void testComboCropAutoscale() 
     2820  { 
     2821    // note - crop and autoscale both don't work with virtualStacks. No need to test virtual here. 
     2822     
     2823    // try a simple test: single small byte type image  
     2824    comboCropAndAutoscaleTester(FormatTools.UINT8,240,240,1,1,1,70,40,25); 
     2825     
     2826    // try multiple dimensions 
     2827    comboCropAndAutoscaleTester(FormatTools.UINT8,240,240,4,3,2,51,15,13); 
     2828     
     2829    // try various pixTypes 
     2830    for (int pixType : PIXEL_TYPES) 
     2831      comboCropAndAutoscaleTester(pixType,240,240,2,2,2,225,225,10); 
     2832  } 
     2833   
    26262834  /* 
    26272835  @Test 
     
    26292837  { 
    26302838    // note - concat doesn't work with virtualStacks. No need to test virtual here. 
    2631  
     2839     
    26322840    fail("unimplemented"); 
    26332841  } 
    26342842  */ 
    2635  
     2843   
    26362844  @Test 
    26372845  public void testComboConcatSplitFocalPlanes() 
    26382846  { 
    26392847    // note - concat and split both don't work with virtualStacks. No need to test virtual here. 
    2640  
     2848     
    26412849    comboConcatSplitFocalPlanesTester(); 
    26422850  } 
     
    26632871  { 
    26642872    // note - split both doesn't work with virtualStacks. No need to test virtual here. 
    2665  
     2873     
    26662874    fail("unimplemented"); 
    26672875  } 
    26682876  */ 
    2669  
     2877   
    26702878  /* 
    26712879  @Test 
     
    26732881  { 
    26742882    // note - concat and split both don't work with virtualStacks. No need to test virtual here. 
    2675  
     2883    
    26762884    fail("unimplemented"); 
    26772885  } 
    26782886  */ 
    2679  
     2887   
    26802888  @Test 
    26812889  public void testComboManyOptions() 
     
    26882896 
    26892897    // note - to reuse existing code it is necessary that the crop origin is (0,0) 
    2690  
     2898     
    26912899    String path = constructFakeFilename("superCombo", pixType, sizeX, sizeY, sizeZ, sizeC, sizeT, 1, false, -1, false, -1); 
    2692  
     2900   
    26932901    ImagePlus[] imps = null; 
    26942902 
     
    27252933      throw new IllegalArgumentException("colorizeSubcaseTester() passed a bad combo of sizeC and rgb: "+sizeC+" "+rgb); 
    27262934 
    2727     //int totalChannels = sizeC; 
     2935    int totalChannels = sizeC; 
    27282936    int channelsPerPlane = rgb; 
    2729     //int totalPlanes = totalChannels / channelsPerPlane; 
     2937    int totalPlanes = totalChannels / channelsPerPlane; 
    27302938 
    27312939    if (channelsPerPlane > 7) 
    27322940      throw new IllegalArgumentException("colorizeSubcaseTester() passed bad sizeC - channelsPerPlane > 7 : "+channelsPerPlane); 
    2733  
     2941     
    27342942    int sizeX = 60, sizeY = 30, sizeZ = 1, sizeT = 1, numSeries = 1; 
    2735  
     2943     
    27362944    String path = constructFakeFilename("colorColorized", pixType, sizeX, sizeY, sizeZ, sizeC, sizeT, numSeries, indexed, rgb, falseColor, lutLen); 
    27372945 
    27382946    ImagePlus[] imps = null; 
    2739  
     2947     
    27402948    try { 
    27412949      ImporterOptions options = new ImporterOptions(); 
     
    27522960 
    27532961    impsCountTest(imps,1); 
    2754  
     2962     
    27552963    ImagePlus imp = imps[0]; 
    2756  
     2964    
    27572965    if (DEBUG) log("  Returned imp: Z = " +imp.getNSlices()+ " C = " +imp.getNChannels()+" T = "+imp.getNFrames()); 
    27582966    for (int tIndex = 0; tIndex < imp.getNFrames(); tIndex++) { 
     
    27652973      } 
    27662974    } 
    2767  
     2975     
    27682976    if (lutLen == -1) 
    27692977      lutLen = 3; 
    27702978 
    27712979    int expectedSizeC = effectiveC(sizeC, rgb, lutLen, indexed, falseColor); 
    2772  
     2980       
    27732981    //if (DEBUG) log("  chans channsPerPlane planes expectedSizeC "+totalChannels+" "+channelsPerPlane+" "+totalPlanes+" "+expectedSizeC); 
    27742982 
     
    27772985    // TODO: the following code conditional as BF sometimes does not return a CompositeImage. Handle better after BF 
    27782986    //   changed and after I've handled all special cases. 
    2779  
     2987   
    27802988    if (imp.isComposite()) 
    27812989    { 
    27822990      CompositeImage ci = (CompositeImage)imp; 
    2783  
     2991     
    27842992      assertFalse(ci.hasCustomLuts()); 
    27852993 
    27862994      assertEquals(CompositeImage.COLOR, ci.getMode()); 
    2787  
     2995     
    27882996      // TODO - falseColor stuff needs to be impl 
    27892997      if (!falseColor) 
    27902998        colorTests(ci,expectedSizeC,DEFAULT_COLOR_ORDER); 
    2791  
     2999       
    27923000    } 
    27933001    else 
    27943002      if (DEBUG) log("  Not a composite image"); 
    27953003 
    2796     //int iIndex = 0; 
     3004    /* 
     3005    */ 
     3006    int iIndex = 0; 
    27973007    for (int cIndex = 0; cIndex < expectedSizeC; cIndex++) 
    27983008      for (int tIndex = 0; tIndex < sizeT; tIndex++) 
     
    28123022  { 
    28133023    if (DEBUG) log("testColorizeSubcases() - begin special cases"); 
    2814  
     3024     
    28153025    // INDEXED and sizeC == 1,2,3,anything bigger than 3 
    2816  
     3026     
    28173027    // sizeC == 1, rgb == 1, indexed, 8 bit, implicit lut length of 3 - KEY test to do, also note can vary lut len 
    28183028    if (DEBUG) log("1/1 indexed"); 
     
    28223032    if (DEBUG) log("1/1/indexed lutLen==2"); 
    28233033    colorizeSubcaseTester(FormatTools.UINT8,1,1,INDEXED,REAL_COLOR,2); 
    2824  
     3034     
    28253035    // sizeC == 1, rgb == 1, indexed, 16 bit, implicit lut length of 3 - 2nd important test to do, also note can vary lut len 
    28263036    if (DEBUG) log("1/1 indexed (16-bit)"); 
     
    28453055 
    28463056    // NOT INDEXED 
    2847  
     3057     
    28483058    // sizeC == 1 : don't test yet 
    28493059    // TODO - is this limitation now fixed in BF? Do we need to test here? 
    2850  
     3060     
    28513061    // sizeC = 4 and rgb = 4 : interleaved including alpha 
    28523062    // if indexed == true this combo throws exception in CompositeImage constructor 
     
    28583068    if (DEBUG) log("6/3 nonindexed"); 
    28593069    colorizeSubcaseTester(FormatTools.UINT8,6,3,NOT_INDEXED,REAL_COLOR,-1); 
    2860  
     3070    
    28613071    // sizeC = 12, rgb = 3, indexed = false 
    28623072    if (DEBUG) log("12/3 nonindexed"); 
     
    28803090    if (DEBUG) log("testColorizeSubcases() - past all cases"); 
    28813091    */ 
    2882  
     3092     
    28833093    if (DEBUG) log("testColorizeSubcases() : numerous failures : actual tests commented out to see all print statements."); 
    28843094  } 
Note: See TracChangeset for help on using the changeset viewer.