Changeset 6249


Ignore:
Timestamp:
05/07/10 14:54:23 (10 years ago)
Author:
curtis
Message:

Update the way View5D is invoked.

File:
1 edited

Legend:

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

    r6229 r6249  
    3232import java.awt.image.IndexColorModel; 
    3333import java.io.IOException; 
     34import java.lang.reflect.Constructor; 
     35import java.lang.reflect.InvocationTargetException; 
    3436 
    3537import javax.xml.parsers.ParserConfigurationException; 
     
    127129    else if (options.isViewBrowser()) displayDataBrowser(imp, stackOrder, colorModels); 
    128130    else if (options.isViewImage5D()) displayImage5D(imp, stackOrder, colorModels); 
    129     else if (options.isViewView5D()) displayView5D(imp, stackOrder, colorModels); 
     131    else if (options.isViewView5D()) displayView5D(imp); 
    130132    else if (options.isViewVisBio()) displayVisBio(imp); 
    131133    else throw new IllegalStateException("Unknown display mode"); 
     
    233235  } 
    234236 
    235   public void displayView5D(ImagePlus imp, String stackOrder, IndexColorModel[] colorModels) { 
    236     displayNormal(imp, stackOrder, colorModels); //TEMP? 
    237  
     237  public void displayView5D(ImagePlus imp) { 
    238238    WindowManager.setTempCurrentImage(imp); 
    239     IJ.run("start viewer", ""); 
     239    //new view5d.View5D_(""); 
     240    Exception exc = null; 
     241    try { 
     242      Class<?> c = Class.forName("view5d.View5D_"); 
     243      Constructor<?> con = c.getConstructor(new Class[] {String.class}); 
     244      con.newInstance(new Object[] {""}); 
     245    } 
     246    catch (ClassNotFoundException e) { exc = e; } 
     247    catch (SecurityException e) { exc = e; } 
     248    catch (NoSuchMethodException e) { exc = e; } 
     249    catch (IllegalArgumentException e) { exc = e; } 
     250    catch (InstantiationException e) { exc = e; } 
     251    catch (IllegalAccessException e) { exc = e; } 
     252    catch (InvocationTargetException e) { exc = e; } 
     253    if (exc != null) { 
     254      WindowTools.reportException(exc, options.isQuiet(), 
     255        "Sorry, there was a problem interfacing with View5D"); 
     256      return; 
     257    } 
    240258  } 
    241259 
Note: See TracChangeset for help on using the changeset viewer.