Changeset 2693


Ignore:
Timestamp:
04/27/07 10:29:07 (13 years ago)
Author:
melissa
Message:

Make better use of core metadata model.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/ome/OMEReader.java

    r2672 r2693  
    5050  /** String containing authentication information. */ 
    5151  private String loginString; 
    52  
    53   /** Number of images. */ 
    54   private int numImages; 
    5552 
    5653  /** Current server. */ 
     
    166163    core.currentOrder[0] = "XYZCT"; 
    167164 
    168     numImages = core.sizeZ[0] * core.sizeC[0] * core.sizeT[0]; 
     165    core.imageCount[0] = core.sizeZ[0] * core.sizeC[0] * core.sizeT[0]; 
     166    core.rgb[0] = false; 
     167 
     168    core.thumbSizeX[0] = thumb.getWidth(); 
     169    core.thumbSizeY[0] = thumb.getHeight(); 
     170 
     171    core.littleEndian[0] = true; 
     172    core.interleaved[0] = false; 
    169173 
    170174    MetadataStore store = getMetadataStore(); 
     
    176180      new Integer(core.sizeT[0]), 
    177181      new Integer(core.pixelType[0]), 
    178       new Boolean(!isLittleEndian()), 
     182      new Boolean(!core.littleEndian[0]), 
    179183      core.currentOrder[0], 
    180184      null, 
     
    192196  } 
    193197 
    194   /* @see loci.formats.IFormatReader#getImageCount() */ 
    195   public int getImageCount() { 
    196     return numImages; 
    197   } 
    198  
    199   /* @see loci.formats.IFormatReader#isRGB() */ 
    200   public boolean isRGB() { 
    201     return false; 
    202   } 
    203  
    204   /* @see loci.formats.IFormatReader#getThumbSizeX() */ 
    205   public int getThumbSizeX() { 
    206     return thumb.getWidth(); 
    207   } 
    208  
    209   /* @see loci.formats.IFormatReader#getThumbSizeY() */ 
    210   public int getThumbSizeY() { 
    211     return thumb.getHeight(); 
    212   } 
    213  
    214   /* @see loci.formats.IFormatReader#isLittleEndian() */ 
    215   public boolean isLittleEndian() { 
    216     return true; 
    217   } 
    218  
    219   /* @see loci.formats.IFormatReader#isInterleaved(int) */ 
    220   public boolean isInterleaved(int subC) { 
    221     return false; 
    222   } 
    223  
    224198  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    225199  public byte[] openBytes(int no) throws FormatException, IOException { 
    226     if (no < 0 || no >= numImages) { 
     200    if (no < 0 || no >= core.imageCount[0]) { 
    227201      throw new FormatException("Invalid image number: " + no); 
    228202    } 
     
    246220  /* @see loci.formats.IFormatReader#openThumbBytes(int) */ 
    247221  public byte[] openThumbBytes(int no) throws FormatException, IOException { 
    248     if (no < 0 || no >= numImages) { 
     222    if (no < 0 || no >= core.imageCount[0]) { 
    249223      throw new FormatException("Invalid image number: " + no); 
    250224    } 
     
    261235    throws FormatException, IOException 
    262236  { 
    263     if (no < 0 || no >= numImages) { 
     237    if (no < 0 || no >= core.imageCount[0]) { 
    264238      throw new FormatException("Invalid image number: " + no); 
    265239    } 
Note: See TracChangeset for help on using the changeset viewer.