Changeset 1405


Ignore:
Timestamp:
09/01/06 14:46:14 (14 years ago)
Author:
curtis
Message:

Print series dimensions (SizeX x SizeY x ImageCount) in the chooser;
some style fixes.

Location:
trunk/loci/plugins
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/plugins/About.java

    r1275 r1405  
    2828 
    2929/** Displays a small information dialog about this package. */ 
    30 public abstract class About { 
     30public final class About { 
     31 
     32  private About() { } 
    3133 
    3234  public static void main(String[] args) { 
  • trunk/loci/plugins/HandleExtraFileTypes.java

    r1270 r1405  
    2020// jefferis@stanford.edu 
    2121 
     22/** 
     23 * Plugin to handle file types which are not implemented 
     24 * directly in ImageJ through io.Opener. 
     25 */ 
    2226public class HandleExtraFileTypes extends ImagePlus implements PlugIn { 
    2327  static final int IMAGE_OPENED=-1; 
     
    3438 
    3539    // Try and recognise file type and load the file if recognised 
    36     ImagePlus imp=openImage(directory,fileName); 
     40    ImagePlus imp=openImage(directory, fileName); 
    3741    if (imp==null) { 
    3842      // failed to load file or plugin has opened and displayed it 
     
    4347    // Set the stack of this HandleExtraFileTypes object 
    4448    // to that attached to the ImagePlus object returned by openImage() 
    45     setStack(fileName,stack); 
     49    setStack(fileName, stack); 
    4650    // Copy over the calibration info since it doesn't come with the 
    4751    // ImageProcessor 
     
    4953    // Also copy the Show Info field over if it exists 
    5054    if (imp.getProperty("Info")!=null) 
    51       setProperty("Info",imp.getProperty("Info")); 
     55      setProperty("Info", imp.getProperty("Info")); 
    5256    // Copy over the FileInfo 
    5357    setFileInfo(imp.getOriginalFileInfo()); 
     
    7579      is.read(buf, 0, 132); 
    7680      is.close(); 
    77     } catch (IOException e) { 
     81    } 
     82    catch (IOException e) { 
    7883      // Couldn't open the file for reading 
    7984      return null; 
     
    9297      // Ok we've identified the file type 
    9398      // Now load it using the relevant plugin 
    94       imp = (ImagePlus)IJ.runPlugIn("Biorad_Reader", path); 
     99      imp = (ImagePlus) IJ.runPlugIn("Biorad_Reader", path); 
    95100      if (imp==null) width = PLUGIN_NOT_FOUND; 
    96101      if (imp!=null&&imp.getWidth()==0) imp = null; 
     
    107112      if(buf[0]==0 && buf[1]==0 && buf[2]==0 && buf[3]==3) { 
    108113        // Ok we've identified the file type - now load it 
    109         imp = (ImagePlus)IJ.runPlugIn("DM3_Reader", path); 
     114        imp = (ImagePlus) IJ.runPlugIn("DM3_Reader", path); 
    110115        if (imp==null) width = PLUGIN_NOT_FOUND; 
    111116        if (imp!=null&&imp.getWidth()==0) imp = null; 
     
    130135      (buf[0]==109&& buf[1]==109&&buf[2]==109&&buf[3]==109)) 
    131136    { 
    132       imp = (ImagePlus)IJ.runPlugIn("IPLab_Reader", path); 
     137      imp = (ImagePlus) IJ.runPlugIn("IPLab_Reader", path); 
    133138      if (imp==null) width = PLUGIN_NOT_FOUND; 
    134139      if (imp!=null&&imp.getWidth()==0) imp = null; 
     
    143148      buf[2]==74 && buf[3]==0) 
    144149    { 
    145       imp = (ImagePlus)IJ.runPlugIn("InstantImager_Reader", path); 
     150      imp = (ImagePlus) IJ.runPlugIn("InstantImager_Reader", path); 
    146151      if (imp==null) width = PLUGIN_NOT_FOUND; 
    147152      if (imp!=null&&imp.getWidth()==0) imp = null; 
     
    239244      if(buf[0]==42 && buf[1]==42) { 
    240245        // Ok we've identified the file type - now load it 
    241         imp = (ImagePlus)IJ.runPlugIn("XYZ_Reader", path); 
     246        imp = (ImagePlus) IJ.runPlugIn("XYZ_Reader", path); 
    242247        if (imp==null) width = PLUGIN_NOT_FOUND; 
    243248        if (imp!=null&&imp.getWidth()==0) imp = null; 
  • trunk/loci/plugins/LociImporter.java

    r1385 r1405  
    137137        new GenericDialog("LOCI Bio-Formats Series Chooser"); 
    138138 
    139       for (int i=0; i<r.getSeriesCount(id); i++) { 
    140         datasets.addCheckbox("Series " + i, i == 0); 
    141       } 
    142       if (r.getSeriesCount(id) > 1) datasets.showDialog(); 
    143  
    144       boolean[] series = new boolean[r.getSeriesCount(id)]; 
    145       for (int i=0; i<series.length; i++) { 
    146         series[i] = datasets.getNextBoolean(); 
    147       } 
     139      int seriesCount = r.getSeriesCount(id); 
     140      for (int i=0; i<seriesCount; i++) { 
     141        r.setSeries(id, i); 
     142        int sizeX = r.getSizeX(id); 
     143        int sizeY = r.getSizeY(id); 
     144        int imageCount = r.getImageCount(id); 
     145        //int sizeZ = r.getSizeZ(id); 
     146        //int sizeC = r.getSizeC(id); 
     147        //int sizeT = r.getSizeT(id); 
     148        datasets.addCheckbox("Series " + i + ": " + 
     149          sizeX + " x " + sizeY + " x " + imageCount, i == 0); 
     150      } 
     151      if (seriesCount > 1) datasets.showDialog(); 
     152 
     153      boolean[] series = new boolean[seriesCount]; 
     154      for (int i=0; i<seriesCount; i++) series[i] = datasets.getNextBoolean(); 
    148155 
    149156      r.setSeparated(!mergeChannels); 
     
    277284        else { 
    278285          long average = (end - start) / num; 
    279           IJ.showStatus("LOCI Bio-Formats : " + elapsed + " seconds (" + 
     286          IJ.showStatus("LOCI Bio-Formats: " + elapsed + " seconds (" + 
    280287            average + " ms per plane)"); 
    281288        } 
  • trunk/loci/plugins/MetadataPane.java

    r1356 r1405  
    3030import javax.swing.table.DefaultTableModel; 
    3131 
     32/** A widget for display of a dataset's associated metadata. */ 
    3233public class MetadataPane extends JPanel { 
    3334 
     
    5556  // -- Constructor -- 
    5657 
    57   /** Constructs a widget for display of a dataset's associated metadata. */ 
    5858  public MetadataPane(Hashtable metadata) { 
    5959    super(); 
Note: See TracChangeset for help on using the changeset viewer.