Changeset 5138


Ignore:
Timestamp:
05/29/09 16:10:32 (11 years ago)
Author:
curtis
Message:

Fix a bunch of bugs. Still not ready for prime time though.

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

Legend:

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

    r5133 r5138  
    5555import loci.plugins.importer.ImporterOptions; 
    5656import loci.plugins.importer.MergeDialog; 
     57import loci.plugins.prefs.OptionsDialog; 
    5758import loci.plugins.util.ImagePlusTools; 
    58 import loci.plugins.util.OptionsDialog; 
    5959import loci.plugins.util.WindowTools; 
    6060 
     
    235235        ImporterOptions options = null; 
    236236        try { 
    237           options = new ImporterOptions();//FIXME 
     237          // CTR TODO - should not depend anything in importer package 
     238          options = new ImporterOptions(); 
    238239        } 
    239240        catch (IOException exc) { 
  • trunk/components/loci-plugins/src/loci/plugins/config/ConfigWindow.java

    r5133 r5138  
    9090  private JCheckBox enabledBox, windowlessBox, upgradeBox; 
    9191 
    92   private ImporterOptions options;//FIXME 
     92  private ImporterOptions options; 
    9393 
    9494  private DefaultListModel libsListModel; 
     
    196196 
    197197    JLabel upgradeLabel = 
    198       new JLabel("Automatically check for a new version of Bio-Formats"); 
     198      new JLabel("Automatically check for a new versions of the LOCI plugins"); 
    199199    upgradePanel.add(upgradeLabel); 
    200200 
    201201    try { 
     202      // CTR TODO - should not depend anything in importer package 
    202203      options = new ImporterOptions(); 
    203204    } 
     
    243244  public void itemStateChanged(ItemEvent e) { 
    244245    Object src = e.getSource(); 
    245     // CTR TODO 
     246    // CTR TODO NOW 
    246247    /* 
    247248    if (src == upgradeBox) { 
     
    613614    InvocationTargetException 
    614615  { 
    615     Class utilClass = Class.forName("loci.plugins.util.Util"); 
     616    Class utilClass = Class.forName("loci.plugins.util.LociPrefs"); 
    616617    Field field = utilClass.getField(fieldName); 
    617618    String key = field.get(null) + "." + entry.readerName; 
  • trunk/components/loci-plugins/src/loci/plugins/importer/CropDialog.java

    r5133 r5138  
    3131 
    3232import loci.formats.IFormatReader; 
    33 import loci.plugins.util.OptionsDialog; 
     33import loci.plugins.prefs.OptionsDialog; 
    3434import loci.plugins.util.WindowTools; 
    3535 
  • trunk/components/loci-plugins/src/loci/plugins/importer/FilePatternDialog.java

    r5133 r5138  
    3030import loci.common.Location; 
    3131import loci.formats.FilePattern; 
    32 import loci.plugins.util.OptionsDialog; 
     32import loci.plugins.prefs.OptionsDialog; 
    3333 
    3434/** 
  • trunk/components/loci-plugins/src/loci/plugins/importer/IdDialog.java

    r5133 r5138  
    3030import ij.io.OpenDialog; 
    3131import loci.common.Location; 
    32 import loci.plugins.util.OptionsDialog; 
     32import loci.plugins.prefs.OptionsDialog; 
    3333 
    3434/** 
     
    7272        // present user with one-time dialog box 
    7373        IJ.showMessage("Bio-Formats", 
    74           "One-time warning: There is a bug in Java on Mac OS X with the\n" + 
    75           "native file chooser that crashes ImageJ if you click on a file\n" + 
    76           "in cxd, ipw, oib or zvi format while in column view mode.\n" + 
    77           "You can work around the problem by switching to list view\n" + 
    78           "(press Command+2) or by checking the \"Use JFileChooser to\n" + 
    79           "Open/Save\" option in the Edit>Options>Input/Output... dialog."); 
     74          "One-time warning: There is a bug in Java on Mac OS X with the " + 
     75          "native file chooser\nthat crashes ImageJ if you click on a file " + 
     76          "in CXD, IPW, OIB or ZVI format while in\ncolumn view mode. You " + 
     77          "can work around the problem in one of two ways:\n" + 
     78          "  1. Switch to list view (press Command+2)\n" + 
     79          "  2. Check \"Use JFileChooser to Open/Save\" under " + 
     80          "Edit>Options>Input/Output..."); 
    8081      } 
    8182    } 
     
    145146    String id = options.getId(); 
    146147    if (id == null) { 
    147       // CTR FIXME -- eliminate this kludge 
     148      // CTR TODO -- eliminate this kludge 
    148149      IJ.runPlugIn("loci.plugins.ome.OMEPlugin", ""); 
    149150      return STATUS_FINISHED; 
  • trunk/components/loci-plugins/src/loci/plugins/importer/Importer.java

    r5137 r5138  
    6969import loci.plugins.LociImporter; 
    7070import loci.plugins.Updater; 
     71import loci.plugins.prefs.OptionsDialog; 
    7172import loci.plugins.util.BFVirtualStack; 
    7273import loci.plugins.util.DataBrowser; 
     
    7475import loci.plugins.util.ImagePlusTools; 
    7576import loci.plugins.util.LociPrefs; 
    76 import loci.plugins.util.OptionsDialog; 
    7777import loci.plugins.util.ROIHandler; 
    7878import loci.plugins.util.SearchableWindow; 
     
    132132    // -- Step 1: check if new version is available -- 
    133133 
     134    UpgradeDialog upgradeDialog = new UpgradeDialog(options); 
     135    int status = upgradeDialog.showDialog(); 
     136    if (!statusOk(status)) return; 
     137 
    134138    if (options.doUpgradeCheck()) { 
    135139      debug("check if new version is available"); 
     
    151155 
    152156    LocationDialog locationDialog = new LocationDialog(options); 
    153     int status = locationDialog.showDialog(); 
     157    status = locationDialog.showDialog(); 
    154158    if (!statusOk(status)) return; 
    155159 
  • trunk/components/loci-plugins/src/loci/plugins/importer/ImporterDialog.java

    r5133 r5138  
    4545import javax.swing.JScrollPane; 
    4646 
    47 import loci.plugins.util.OptionsDialog; 
     47import loci.plugins.prefs.OptionsDialog; 
    4848 
    4949import com.jgoodies.forms.builder.PanelBuilder; 
  • trunk/components/loci-plugins/src/loci/plugins/importer/LocationDialog.java

    r5133 r5138  
    2727 
    2828import ij.gui.GenericDialog; 
    29 import loci.plugins.util.OptionsDialog; 
     29import loci.plugins.prefs.OptionsDialog; 
    3030 
    3131/** 
  • trunk/components/loci-plugins/src/loci/plugins/importer/MergeDialog.java

    r5133 r5138  
    2727 
    2828import ij.gui.GenericDialog; 
    29 import loci.plugins.util.OptionsDialog; 
     29import loci.plugins.prefs.OptionsDialog; 
    3030 
    3131/** 
  • trunk/components/loci-plugins/src/loci/plugins/importer/RangeDialog.java

    r5133 r5138  
    2828import ij.gui.GenericDialog; 
    2929import loci.formats.IFormatReader; 
    30 import loci.plugins.util.OptionsDialog; 
     30import loci.plugins.prefs.OptionsDialog; 
    3131import loci.plugins.util.WindowTools; 
    3232 
  • trunk/components/loci-plugins/src/loci/plugins/importer/SeriesDialog.java

    r5133 r5138  
    4848import loci.formats.FormatTools; 
    4949import loci.formats.IFormatReader; 
    50 import loci.plugins.util.OptionsDialog; 
     50import loci.plugins.prefs.OptionsDialog; 
    5151import loci.plugins.util.WindowTools; 
    5252 
     
    196196    if (options.isConcatenate()) { 
    197197      // toggle on compatible series 
    198       // CTR FIXME -- why are we doing this? 
     198      // CTR TODO -- why are we doing this? 
    199199      for (int i=0; i<seriesCount; i++) { 
    200200        if (series[i]) continue; 
  • trunk/components/loci-plugins/src/loci/plugins/importer/SwapDialog.java

    r5133 r5138  
    2929import ij.gui.GenericDialog; 
    3030import loci.formats.DimensionSwapper; 
    31 import loci.plugins.util.OptionsDialog; 
     31import loci.plugins.prefs.OptionsDialog; 
    3232import loci.plugins.util.WindowTools; 
    3333 
     
    9898      if (z.equals(t) || z.equals(c) || c.equals(t)) { 
    9999        IJ.error("Invalid swapping options - each axis can be used only once."); 
    100         return showDialog(); // CTR: FIXME: bad recursion 
     100        return showDialog(); // CTR: TODO: fix bad recursion 
    101101      } 
    102102 
  • trunk/components/loci-plugins/src/loci/plugins/importer/UpgradeDialog.java

    r5133 r5138  
    2626package loci.plugins.importer; 
    2727 
    28 import loci.plugins.util.OptionsDialog; 
     28import ij.gui.GenericDialog; 
     29import loci.plugins.prefs.OptionsDialog; 
    2930 
    3031/** 
    31  * Bio-Formats Importer update checker dialog box. 
     32 * Bio-Formats Importer upgrade checker dialog box. 
    3233 * 
    3334 * <dl><dt><b>Source code:</b></dt> 
     
    4445  // -- Constructor -- 
    4546 
    46   /** Creates an update checker dialog for the Bio-Formats Importer. */ 
     47  /** Creates an upgrade checker dialog for the Bio-Formats Importer. */ 
    4748  public UpgradeDialog(ImporterOptions options) { 
    4849    super(options); 
     
    5354 
    5455  /** 
    55    * Asks user whether Bio-Formats should automatically check for updates. 
     56   * Asks user whether Bio-Formats should automatically check for upgrades. 
    5657   * 
    5758   * @return status of operation 
    5859   */ 
    5960  public int showDialog() { 
    60     // CTR TODO 
    61     /* 
    62     // load: 
    63     if (Prefs.get(KEY_UPGRADE, null) == null) { 
    64       IJ.showMessage("The Bio-Formats plugin for ImageJ can automatically " + 
    65         "check for\nupdates. By default, this feature is enabled, but you " + 
    66         "can disable\nit in the 'Upgrade' tab of the LOCI plugins " + 
    67         "configuration window."); 
     61    if (options.isFirstTime() && !options.isQuiet()) { 
     62      // present user with one-time dialog box 
     63      GenericDialog gd = new GenericDialog("Check for Upgrades"); 
     64      gd.addMessage("One-time notice: The LOCI plugins for ImageJ can " + 
     65        "automatically check for upgrades\neach time they are run. If you " + 
     66        "wish to disable this feature, uncheck the box below.\nYou can " + 
     67        "toggle this behavior later in the LOCI Plugins Configuration's " + 
     68        "\"Upgrade\" tab."); 
     69      addCheckbox(gd, ImporterOptions.KEY_UPGRADE_CHECK); 
     70      gd.showDialog(); 
     71      if (gd.wasCanceled()) return STATUS_CANCELED; 
    6872    } 
    69  
    70     // save: 
    71     if (Prefs.get(KEY_UPGRADE, null) == null) upgradeCheck = true; 
    72     */ 
    7373    return STATUS_OK; 
    7474  } 
  • trunk/components/loci-plugins/src/loci/plugins/importer/importer-options.txt

    r5133 r5138  
    5252label = Concatenate_series when compatible 
    5353info = <b>Concatenate series when compatible</b> - \ 
    54   Allows multiple image series to be joined end to end.             \ 
    55   <br><br><b>Example:</b> You want to join two sequential timelapse \ 
    56   series. 
     54  Allows multiple image series to be joined end to end.   \ 
     55  <br><br><b>Example:</b> You want to join two sequential \ 
     56  timelapse series. 
    5757default = false 
    5858 
     
    7272label = Custom_colorize channels 
    7373info = <b>Custom colorize channels</b> - \ 
    74   Each channel is assigned a pseudocolor table rather than the normal      \ 
    75   grayscale.<br><br>The color for each channel is chosen by the user. This \ 
    76   option is not available when <b>Merge channels to RGB</b> or <b>RGB      \ 
    77   colorize channels</b> are set. 
     74  Each channel is assigned a pseudocolor table rather than the normal \ 
     75  grayscale.<br><br>The color for each channel is chosen by the user. \ 
     76  This option is not available when <b>Merge channels to RGB</b> or   \ 
     77  <b>RGB colorize channels</b> are set. 
    7878default = false 
    7979 
     
    344344[upgradeCheck] 
    345345type = boolean 
     346label = Check_for_upgrades to the LOCI plugins 
    346347default = true 
    347348 
  • trunk/components/loci-plugins/src/loci/plugins/prefs/OptionsDialog.java

    r5133 r5138  
    2424*/ 
    2525 
    26 package loci.plugins.util; 
     26package loci.plugins.prefs; 
    2727 
    2828import ij.gui.GenericDialog; 
    29 import loci.plugins.prefs.OptionsList; 
    3029 
    3130/** 
     
    3332 * 
    3433 * <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/util/OptionsDialog.java">Trac</a>, 
    36  * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/OptionsDialog.java">SVN</a></dd></dl> 
     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> 
    3736 */ 
    3837public abstract class OptionsDialog { 
  • trunk/components/loci-plugins/src/loci/plugins/util/ROIHandler.java

    r5093 r5138  
    4141 
    4242/** 
    43  * TODO 
     43 * Utility class for managing regions of interest within ImageJ. 
     44 * Capable of constructing ROIs within ImageJ's ROI manager matching 
     45 * those specified in an OME metadata store, and vice versa. 
    4446 * 
    4547 * <dl><dt><b>Source code:</b></dt> 
     
    233235    int roiNum, int shape) 
    234236  { 
    235     // TODO 
     237    // TODO - storeOval 
    236238  } 
    237239 
  • trunk/components/loci-plugins/src/loci/plugins/util/RecordedImageProcessor.java

    r5093 r5138  
    5050 
    5151/** 
    52  * TODO 
     52 * Image processor extension that records commands executed upon it. 
     53 * Allows "recordable virtual stacks" that repeat operations performed on 
     54 * one image plane on other image planes when they are loaded from disk. 
    5355 * 
    5456 * <dl><dt><b>Source code:</b></dt> 
    5557 * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/RecordedImageProcessor.java">Trac</a>, 
    5658 * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/RecordedImageProcessor.java">SVN</a></dd></dl> 
     59 * 
     60 * @author Melissa Linkert linkert at wisc.edu 
    5761 */ 
    5862public class RecordedImageProcessor extends ImageProcessor { 
  • trunk/components/loci-plugins/src/loci/plugins/util/VirtualImagePlus.java

    r5093 r5138  
    3535 
    3636/** 
    37  * TODO 
     37 * Extension of {@link ij.ImagePlus} that supports 
     38 * Bio-Formats-driven virtual stacks. 
    3839 * 
    3940 * <dl><dt><b>Source code:</b></dt> 
    4041 * <dd><a href="https://skyking.microscopy.wisc.edu/trac/java/browser/trunk/components/loci-plugins/src/loci/plugins/util/VirtualImagePlus.java">Trac</a>, 
    4142 * <a href="https://skyking.microscopy.wisc.edu/svn/java/trunk/components/loci-plugins/src/loci/plugins/util/VirtualImagePlus.java">SVN</a></dd></dl> 
     43 * 
     44 * @author Melissa Linkert linkert at wisc.edu 
    4245 */ 
    4346public class VirtualImagePlus extends ImagePlus { 
Note: See TracChangeset for help on using the changeset viewer.