Changeset 6474


Ignore:
Timestamp:
06/03/10 18:21:52 (9 years ago)
Author:
curtis
Message:

Add a note about the use of ImporterPrompter in BF.openImagePlus.

File:
1 edited

Legend:

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

    r6322 r6474  
    5555    if (IJ.debugMode) IJ.log("LOCI: " + msg); 
    5656  } 
    57    
     57 
    5858  public static void status(boolean quiet, String msg) { 
    5959    if (quiet) return; 
    6060    IJ.showStatus(msg); 
    6161  } 
    62    
     62 
    6363  public static void warn(boolean quiet, String msg) { 
    6464    if (quiet) return; 
    6565    IJ.log("Warning: " + msg); 
    6666  } 
    67    
     67 
    6868  public static void progress(boolean quiet, int value, int max) { 
    6969    if (quiet) return; 
     
    8282    throws FormatException, IOException 
    8383  { 
    84     options.setQuiet(true);//TEMP 
    85     options.setWindowless(true);//TEMP 
     84    // TODO: Eliminate use of the ImporterPrompter. While no dialogs should 
     85    // appear due to the quiet and windowless flags, it would be cleaner to 
     86    // avoid piping everything through invisible GenericDialogs internally. 
     87    // 
     88    // However, we need to be sure all the Dialog classes are not performing 
     89    // any "side-effect" logic on the ImportProcess and/or ImporterOptions 
     90    // before we can make this change. 
     91    // 
     92    // Another downside might be that we could miss out on any other magic that 
     93    // ImageJ is performing (e.g., macro-related functionality), but further 
     94    // testing is warranted. 
     95 
     96    options.setQuiet(true); // NB: Only needed due to ImporterPrompter. 
     97    options.setWindowless(true); // NB: Only needed due to ImporterPrompter. 
     98 
    8699    ImportProcess process = new ImportProcess(options); 
    87     new ImporterPrompter(process);//TEMP 
     100 
     101    new ImporterPrompter(process); // NB: Could eliminate this (see above). 
     102 
    88103    if (!process.execute()) return null; 
    89104    ImagePlusReader reader = new ImagePlusReader(process); 
Note: See TracChangeset for help on using the changeset viewer.