Changeset 3247


Ignore:
Timestamp:
10/09/07 13:38:32 (12 years ago)
Author:
melissa
Message:

Added support for JPEG-compressed ZVI images.

File:
1 edited

Legend:

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

    r3204 r3247  
    2828import java.util.*; 
    2929import loci.formats.*; 
     30import loci.formats.codec.JPEGCodec; 
    3031 
    3132/** 
     
    101102  private boolean isTiled; 
    102103  private int tileRows, tileColumns; 
     104  private boolean isJPEG; 
    103105 
    104106  // -- Constructor -- 
     
    194196          offset += core.sizeX[0]*bytes; 
    195197        } 
     198 
     199        if (isJPEG) { 
     200          JPEGCodec codec = new JPEGCodec(); 
     201          buf = codec.decompress(buf); 
     202        } 
    196203      } 
    197204 
     
    280287        (core.sizeZ[0] * core.sizeC[0] * core.sizeT[0] != core.imageCount[0]); 
    281288      core.littleEndian[0] = true; 
    282       core.interleaved[0] = true; 
     289      core.interleaved[0] = !isJPEG; 
    283290      core.indexed[0] = false; 
    284291      core.falseColor[0] = false; 
     
    780787    s.skipBytes(4); 
    781788    bpp = s.readInt(); 
    782     s.skipBytes(8); 
     789    //s.skipBytes(8); 
     790    s.skipBytes(4); 
     791    int valid = s.readInt(); 
     792    isJPEG = valid == 0 || valid == 1; 
    783793 
    784794    pixels.put(new Integer(num), directory); 
Note: See TracChangeset for help on using the changeset viewer.