Changeset 6067


Ignore:
Timestamp:
03/25/10 10:54:20 (10 years ago)
Author:
melissa
Message:

Allow Zeiss LSM datasets to contain non-LSM TIFF files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/bio-formats/src/loci/formats/in/ZeissLSMReader.java

    r6061 r6067  
    301301    IFDList ifds = ifdsList.get(getSeries()); 
    302302 
    303     if (splitPlanes && getSizeC() > 1) { 
     303    if (splitPlanes && getSizeC() > 1 && ifds.size() == getSizeZ() * getSizeT()) 
     304    { 
    304305      int bpp = FormatTools.getBytesPerPixel(getPixelType()); 
    305306      int plane = no / getSizeC(); 
     
    368369    } 
    369370 
    370     LOGGER.info("Removing thumbnails"); 
    371  
    372371    MetadataStore store = 
    373372      new FilterMetadata(getMetadataStore(), isMetadataFiltered()); 
     
    375374    for (int series=0; series<ifdsList.size(); series++) { 
    376375      IFDList ifds = ifdsList.get(series); 
    377       for (int i=0; i<ifds.size(); i++) { 
    378         IFD ifd = ifds.get(i); 
    379  
     376      for (IFD ifd : ifds) { 
    380377        // check that predictor is set to 1 if anything other 
    381378        // than LZW compression is used 
     
    467464    short[] s = ifd.getIFDShortArray(ZEISS_ID); 
    468465    if (s == null) { 
    469       throw new FormatException("Invalid Zeiss LSM file. Tag " + 
    470         ZEISS_ID + " not found."); 
     466      LOGGER.warn("Invalid Zeiss LSM file. Tag {} not found.", ZEISS_ID); 
     467      TiffReader reader = new TiffReader(); 
     468      reader.setId(lsmFilenames[series]); 
     469      core[series] = reader.getCoreMetadata()[0]; 
     470      reader.close(); 
     471      imageNames.add(imageName); 
     472      return; 
    471473    } 
    472474    byte[] cz = new byte[s.length]; 
Note: See TracChangeset for help on using the changeset viewer.