Changeset 2741


Ignore:
Timestamp:
05/03/07 16:34:38 (13 years ago)
Author:
melissa
Message:

Fixed interleaving issue.

Location:
trunk/loci/formats/in
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/in/BaseTiffReader.java

    r2701 r2741  
    492492    core.rgb[0] = samples > 1 || p == TiffTools.RGB_PALETTE || 
    493493      p == TiffTools.CFA_ARRAY || p == TiffTools.RGB; 
    494     core.interleaved[0] = TiffTools.getSamplesPerPixel(ifds[0]) > 1; 
     494    //core.interleaved[0] = TiffTools.getSamplesPerPixel(ifds[0]) > 1; 
     495    core.interleaved[0] = true;  
    495496    core.littleEndian[0] = TiffTools.isLittleEndian(ifds[0]); 
    496497 
  • trunk/loci/formats/in/MetamorphReader.java

    r2739 r2741  
    6262 
    6363  private int mmPlanes; //number of metamorph planes 
     64 
     65  /** List of STK files in the dataset. */ 
     66  private String[] stks; 
    6467 
    6568  // -- Constructor -- 
     
    103106      return false; // we went through the IFD; the ID wasn't found. 
    104107    } 
     108  } 
     109 
     110  /* @see loci.formats.IFormatReader#openBytes(int) */ 
     111  public byte[] openBytes(int no) throws FormatException, IOException { 
     112    FormatTools.assertId(currentId, true, 1); 
     113    if (stks.length == 1) return super.openBytes(no);  
     114    return null; // TODO  
     115  } 
     116 
     117  /* @see loci.formats.IFormatReader#openBytes(int, byte[]) */ 
     118  public byte[] openBytes(int no, byte[] buf) 
     119    throws FormatException, IOException 
     120  { 
     121    FormatTools.assertId(currentId, true, 1); 
     122    if (stks.length == 1) return super.openBytes(no, buf);  
     123    return null; // TODO  
     124  } 
     125 
     126  /* @see loci.formats.IFormatReader#openImage(int) */ 
     127  public BufferedImage openImage(int no) throws FormatException, IOException { 
     128    FormatTools.assertId(currentId, true, 1); 
     129    if (stks.length == 1) return super.openImage(no);  
     130    return null; // TODO  
    105131  } 
    106132 
     
    280306  
    281307    Location abs = new Location(currentId).getAbsoluteFile(); 
    282     String absPath = abs.getPath().substring(abs.getPath().lastIndexOf(File.separator));  
     308    String absPath = abs.getPath().substring( 
     309      abs.getPath().lastIndexOf(File.separator));  
    283310    Location ndfile = new Location(abs.getParent(),  
    284311      absPath.substring(0, absPath.indexOf("_")) + ".nd"); 
    285312    if (!ndfile.exists()) { 
    286       /* debug */ System.out.println(ndfile.getAbsolutePath() + " DOES NOT EXIST"); 
    287313      ndfile = new Location(ndfile.getAbsolutePath().replaceAll(".nd", ".ND")); 
    288314    } 
     
    300326        line = ndStream.readLine().trim();  
    301327      } 
     328     
     329      // figure out how many files we need  
     330     
     331      String z = (String) getMeta("NZSteps"); 
     332      String c = (String) getMeta("NWavelengths"); 
     333      String t = (String) getMeta("NTimePoints"); 
     334 
     335      int zc = core.sizeZ[0], cc = core.sizeC[0], tc = core.sizeT[0]; 
     336 
     337      if (z != null) zc = Integer.parseInt(z);  
     338      if (c != null) cc = Integer.parseInt(c);  
     339      if (t != null) tc = Integer.parseInt(t);  
     340 
     341      int numFiles = (z * c * t) /  
     342        (core.sizeZ[0] * core.sizeT[0] * getEffectiveSizeC()); 
     343 
     344      stks = new String[numFiles]; 
     345 
     346 
     347 
    302348    } 
    303349  } 
Note: See TracChangeset for help on using the changeset viewer.