Changeset 5092 for trunk/utils


Ignore:
Timestamp:
05/07/09 17:42:13 (11 years ago)
Author:
curtis
Message:

Progress on LOCI plugins refactoring.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/utils/Read_Image.java

    r5054 r5092  
    1313import loci.formats.FormatException; 
    1414import loci.formats.IFormatReader; 
    15 import loci.plugins.util.Util; 
     15import loci.plugins.util.ImagePlusReader; 
    1616 
    1717/** A very simple example of using Bio-Formats in an ImageJ plugin. */ 
     
    2222    String name = od.getFileName(); 
    2323    String id = dir + name; 
    24     IFormatReader r = new ChannelSeparator(); 
     24    ImagePlusReader r = new ImagePlusReader( 
     25      new ChannelSeparator(ImagePlusReader.makeImageReader())); 
    2526    try { 
    2627      IJ.showStatus("Examining file " + name); 
     
    3233      for (int i=0; i<num; i++) { 
    3334        IJ.showStatus("Reading image plane #" + (i + 1) + "/" + num); 
    34         ImageProcessor ip = Util.openProcessors(r, i)[0]; 
     35        ImageProcessor ip = r.openProcessors(i)[0]; 
    3536        stack.addSlice("" + (i + 1), ip); 
    3637      } 
Note: See TracChangeset for help on using the changeset viewer.