Changeset 3060


Ignore:
Timestamp:
08/08/07 14:44:06 (12 years ago)
Author:
melissa
Message:

Set the file name as the default image name.

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

Legend:

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

    r3023 r3060  
    324324    if (stamp == null || stamp.trim().equals("")) stamp = null; 
    325325 
    326     store.setImage( 
    327       null, // name 
    328       stamp, 
    329       (String) getMeta("Image Type"), 
    330       null); // Use index 0 
     326    store.setImage(currentId, stamp, (String) getMeta("Image Type"), null); 
    331327 
    332328    store.setInstrument( 
  • trunk/loci/formats/in/EPSReader.java

    r3046 r3060  
    301301    MetadataStore store = getMetadataStore(); 
    302302 
     303    store.setImage(currentId, null, null, null); 
     304 
    303305    store.setPixels( 
    304306      new Integer(core.sizeX[0]), 
  • trunk/loci/formats/in/FitsReader.java

    r3023 r3060  
    154154 
    155155    MetadataStore store = getMetadataStore(); 
     156      
     157    store.setImage(currentId, null, null, null);  
    156158    store.setPixels(new Integer(core.sizeX[0]), new Integer(core.sizeY[0]), 
    157159      new Integer(core.sizeZ[0]), new Integer(core.sizeC[0]), 
  • trunk/loci/formats/in/GIFReader.java

    r3046 r3060  
    330330 
    331331    MetadataStore store = getMetadataStore(); 
     332    store.setImage(currentId, null, null, null);  
    332333 
    333334    core.pixelType[0] = FormatTools.UINT8; 
  • trunk/loci/formats/in/GatanReader.java

    r3023 r3060  
    163163    // The metadata store we're working with. 
    164164    MetadataStore store = getMetadataStore(); 
     165    store.setImage(currentId, null, null, null);  
    165166 
    166167    store.setPixels( 
  • trunk/loci/formats/in/IPWReader.java

    r3023 r3060  
    334334      new Integer(core.pixelType[0]), new Boolean(!isLittleEndian()), 
    335335      core.currentOrder[0], null, null); 
    336     store.setImage(null, null, (String) getMeta("Version"), null); 
     336    store.setImage(currentId, null, (String) getMeta("Version"), null); 
    337337    for (int i=0; i<core.sizeC[0]; i++) { 
    338338      store.setLogicalChannel(i, null, null, null, null, null, null, null, null, 
  • trunk/loci/formats/in/ImageIOReader.java

    r3023 r3060  
    125125    // populate the metadata store 
    126126    MetadataStore store = getMetadataStore(); 
     127    store.setImage(currentId, null, null, null);  
    127128    store.setPixels( 
    128129      new Integer(core.sizeX[0]), 
  • trunk/loci/formats/in/ImarisReader.java

    r3023 r3060  
    203203    if (d == null || d.trim().length() == 0) d = null; 
    204204 
    205     store.setImage((String) getMeta("Image name"), d, 
    206       (String) getMeta("Image comment"), null); 
    207  
    208     store.setDimensions( 
    209       new Float(dx), 
    210       new Float(dy), 
    211       new Float(dz), 
    212       new Float(1), 
    213       new Float(1), 
    214       null); 
     205    String fname = (String) getMeta("Image name"); 
     206    if (fname == null) fname = currentId; 
     207    store.setImage(fname, d, (String) getMeta("Image comment"), null); 
     208 
     209    store.setDimensions(new Float(dx), new Float(dy), new Float(dz),  
     210      new Float(1), new Float(1), null); 
    215211 
    216212    store.setObjective(null, null, null, null, new Float(mag), null, null); 
  • trunk/loci/formats/in/KhorosReader.java

    r3046 r3060  
    198198 
    199199    MetadataStore store = getMetadataStore(); 
     200    store.setImage(currentId, null, null, null);  
    200201    store.setPixels(new Integer(core.sizeX[0]), new Integer(core.sizeY[0]), 
    201202      new Integer(core.sizeZ[0]), new Integer(core.sizeC[0]), 
  • trunk/loci/formats/in/LegacyPictReader.java

    r3023 r3060  
    108108 
    109109    MetadataStore store = getMetadataStore(); 
     110    store.setImage(currentId, null, null, null);  
    110111    store.setPixels(new Integer(core.sizeX[0]), new Integer(core.sizeY[0]), 
    111112      new Integer(core.sizeZ[0]), new Integer(core.sizeC[0]), 
  • trunk/loci/formats/in/LegacyQTReader.java

    r3023 r3060  
    223223 
    224224      MetadataStore store = getMetadataStore(); 
     225      store.setImage(currentId, null, null, null);  
    225226      store.setPixels(new Integer(core.sizeX[0]), new Integer(core.sizeY[0]), 
    226227        new Integer(core.sizeZ[0]), new Integer(core.sizeC[0]), 
  • trunk/loci/formats/in/LegacyZVIReader.java

    r3023 r3060  
    404404 
    405405      MetadataStore store = getMetadataStore(); 
     406      store.setImage(currentId, null, null, null);  
    406407 
    407408      store.setPixels( 
  • trunk/loci/formats/in/MNGReader.java

    r3046 r3060  
    175175 
    176176    MetadataStore store = getMetadataStore(); 
     177    store.setImage(currentId, null, null, null);  
    177178 
    178179    store.setPixels(new Integer(core.sizeX[0]), new Integer(core.sizeY[0]), 
  • trunk/loci/formats/in/MRCReader.java

    r3046 r3060  
    232232 
    233233    MetadataStore store = getMetadataStore(); 
    234     store.setPixels( 
    235       new Integer(core.sizeX[0]), 
    236       new Integer(core.sizeY[0]), 
    237       new Integer(core.sizeZ[0]), 
    238       new Integer(core.sizeC[0]), 
    239       new Integer(core.sizeT[0]), 
    240       new Integer(core.pixelType[0]), 
    241       new Boolean(!core.littleEndian[0]), 
    242       core.currentOrder[0], 
    243       null, 
    244       null); 
     234    store.setImage(currentId, null, null, null);  
     235    store.setPixels(new Integer(core.sizeX[0]), new Integer(core.sizeY[0]), 
     236      new Integer(core.sizeZ[0]), new Integer(core.sizeC[0]), 
     237      new Integer(core.sizeT[0]), new Integer(core.pixelType[0]), 
     238      new Boolean(!core.littleEndian[0]), core.currentOrder[0], null, null); 
    245239 
    246240    store.setDimensions(new Float(xlen / mx), new Float(ylen / my), 
  • trunk/loci/formats/in/MicromanagerReader.java

    r3023 r3060  
    233233 
    234234    MetadataStore store = getMetadataStore(); 
     235    store.setImage(currentId, null, null, null);  
    235236 
    236237    store.setPixels( 
  • trunk/loci/formats/in/ND2Reader.java

    r3048 r3060  
    670670 
    671671    MetadataStore store = getMetadataStore(); 
     672    store.setImage(currentId, null, null, null);  
    672673    store.setPixels( 
    673674      new Integer(core.sizeX[0]), 
  • trunk/loci/formats/in/NRRDReader.java

    r3046 r3060  
    232232 
    233233    MetadataStore store = getMetadataStore(); 
     234    store.setImage(currentId, null, null, null);  
    234235 
    235236    store.setPixels(new Integer(core.sizeX[0]), new Integer(core.sizeY[0]), 
  • trunk/loci/formats/in/OIFReader.java

    r3023 r3060  
    374374    // The metadata store we're working with. 
    375375    MetadataStore store = getMetadataStore(); 
     376    store.setImage(currentId, null, null, null);  
    376377 
    377378    switch (imageDepth) { 
  • trunk/loci/formats/in/PGMReader.java

    r3023 r3060  
    157157 
    158158    MetadataStore store = getMetadataStore(); 
     159    store.setImage(currentId, null, null, null);  
    159160    store.setPixels(new Integer(core.sizeX[0]), new Integer(core.sizeY[0]), 
    160161      new Integer(core.sizeZ[0]), new Integer(core.sizeC[0]), 
  • trunk/loci/formats/in/PerkinElmerReader.java

    r3046 r3060  
    600600      SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); 
    601601      time = fmt.format(date); 
    602  
    603       store.setImage(null, time, null, null); 
    604     } 
     602    } 
     603    store.setImage(currentId, time, null, null); 
    605604 
    606605    // populate Pixels element 
    607     store.setPixels( 
    608       new Integer(core.sizeX[0]), // SizeX 
    609       new Integer(core.sizeY[0]), // SizeY 
    610       new Integer(core.sizeZ[0]), // SizeZ 
    611       new Integer(core.sizeC[0]), // SizeC 
    612       new Integer(core.sizeT[0]), // SizeT 
    613       new Integer(core.pixelType[0]), // PixelType 
    614       new Boolean(!core.littleEndian[0]), // BigEndian 
    615       core.currentOrder[0], // DimensionOrder 
    616       null, // Use image index 0 
    617       null); // Use pixels index 0 
     606    store.setPixels(new Integer(core.sizeX[0]), new Integer(core.sizeY[0]), 
     607      new Integer(core.sizeZ[0]), new Integer(core.sizeC[0]), 
     608      new Integer(core.sizeT[0]), new Integer(core.pixelType[0]), 
     609      new Boolean(!core.littleEndian[0]), core.currentOrder[0], null, null); 
    618610 
    619611    // populate StageLabel element 
  • trunk/loci/formats/in/PictReader.java

    r3023 r3060  
    4747 
    4848  // opcodes that we need 
    49   private static final int PICT_CLIP_RGN = 0x1; 
     49  private static final int PICT_CLIP_RGN = 1; 
    5050  private static final int PICT_BITSRECT = 0x90; 
    5151  private static final int PICT_BITSRGN = 0x91; 
     
    6161 
    6262  // other stuff? 
    63   private static final int INFOAVAIL = 0x0002; 
    64   private static final int IMAGEAVAIL = 0x0004; 
     63  private static final int INFOAVAIL = 2; 
     64  private static final int IMAGEAVAIL = 4; 
    6565 
    6666  /** Table used in expanding pixels that use less than 8 bits. */ 
     
    330330    // The metadata store we're working with. 
    331331    MetadataStore store = getMetadataStore(); 
     332    store.setImage(currentId, null, null, null); 
    332333 
    333334    core.pixelType[0] = FormatTools.UINT8; 
  • trunk/loci/formats/in/PrairieReader.java

    r3023 r3060  
    365365          SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); 
    366366          date = fmt.format(d); 
    367  
    368           store.setImage(null, date, null, null); 
    369         } 
     367        } 
     368        store.setImage(currentId, date, null, null); 
    370369 
    371370        String laserPower = (String) getMeta("laserPower_0"); 
  • trunk/loci/formats/in/QTReader.java

    r3046 r3060  
    341341    // The metadata store we're working with. 
    342342    MetadataStore store = getMetadataStore(); 
     343    store.setImage(currentId, null, null, null); 
    343344 
    344345    store.setPixels( 
  • trunk/loci/formats/in/SDTReader.java

    r3023 r3060  
    212212 
    213213    MetadataStore store = getMetadataStore(); 
     214    store.setImage(currentId, null, null, null); 
    214215    store.setPixels(new Integer(core.sizeX[0]), new Integer(core.sizeY[0]), 
    215216      new Integer(core.sizeZ[0]), new Integer(core.sizeC[0]), 
  • trunk/loci/formats/in/SlidebookReader.java

    r3046 r3060  
    309309 
    310310    MetadataStore store = getMetadataStore(); 
     311    store.setImage(currentId, null, null, null); 
    311312 
    312313    for (int i=0; i<core.sizeX.length; i++) { 
  • trunk/loci/formats/in/VisitechReader.java

    r3023 r3060  
    202202 
    203203    MetadataStore store = getMetadataStore(); 
     204    store.setImage(currentId, null, null, null); 
    204205    store.setPixels(new Integer(core.sizeX[0]), new Integer(core.sizeY[0]), 
    205206      new Integer(core.sizeZ[0]), new Integer(core.sizeC[0]), 
     
    209210    for (int i=0; i<core.sizeC[0]; i++) { 
    210211      store.setLogicalChannel(i, null, null, null, null, null, null, null,  
    211         null, null, null, null, null, core.sizeC[i] == 1 ? "monochrome" :  
    212         "RGB", null, null, null, null, null, null, null, null, null, null, null); 
     212        null, null, null, null, null, core.sizeC[0] == 1 ?  
     213        "monochrome" : "RGB", null, null, null, null, null, null, null, null,  
     214        null, null, null); 
    213215    } 
    214216 
  • trunk/loci/formats/in/ZeissZVIReader.java

    r3047 r3060  
    394394    MetadataStore store = getMetadataStore(); 
    395395 
    396     store.setImage((String) getMeta("Title"), null, null, null); 
     396    String fname = (String) getMeta("Title"); 
     397    if (fname == null) fname = currentId; 
     398    store.setImage(fname, null, null, null); 
    397399 
    398400    if (bpp == 1 || bpp == 3) core.pixelType[0] = FormatTools.UINT8; 
Note: See TracChangeset for help on using the changeset viewer.