Changeset 2601


Ignore:
Timestamp:
04/11/07 15:49:36 (13 years ago)
Author:
curtis
Message:

Style fixes.

Location:
trunk/loci/formats
Files:
1 added
68 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/AxisGuesser.java

    r2583 r2601  
    300300          System.out.print("Reading first file "); 
    301301          ImageReader reader = new ImageReader(); 
    302           reader.setId(id);  
     302          reader.setId(id); 
    303303          String dimOrder = reader.getDimensionOrder(); 
    304304          int sizeZ = reader.getSizeZ(); 
  • trunk/loci/formats/ChannelMerger.java

    r2583 r2601  
    4949  // -- IFormatReader API methods -- 
    5050 
    51   /* @see IFormatReader#getImageCount() */  
     51  /* @see IFormatReader#getImageCount() */ 
    5252  public int getImageCount() throws FormatException, IOException { 
    5353    int no = reader.getImageCount(); 
     
    7171  } 
    7272 
    73   /* @see IFormatReader#isRGB() */  
     73  /* @see IFormatReader#isRGB() */ 
    7474  public boolean isRGB() throws FormatException, IOException { 
    7575    return canMerge() || reader.isRGB(); 
    7676  } 
    7777 
    78   /* @see IFormatReader#openImage(int) */  
     78  /* @see IFormatReader#openImage(int) */ 
    7979  public BufferedImage openImage(int no) throws FormatException, IOException { 
    8080    if (!canMerge()) return super.openImage(no); 
     
    102102    if (!canMerge()) return super.openBytes(no); 
    103103    int sizeC = getSizeC(); 
    104     int[] nos = getZCTCoords( no); 
     104    int[] nos = getZCTCoords(no); 
    105105    int z = nos[0], t = nos[2]; 
    106106    String dimOrder = reader.getDimensionOrder(); 
     
    119119  } 
    120120 
    121   /* @see IFormatReader#openThumbImage(int) */  
     121  /* @see IFormatReader#openThumbImage(int) */ 
    122122  public BufferedImage openThumbImage(int no) 
    123123    throws FormatException, IOException 
     
    128128  } 
    129129 
    130   public int getIndex(int z, int c, int t) throws FormatException, IOException 
    131   { 
     130  public int getIndex(int z, int c, int t) throws FormatException, IOException { 
    132131    return FormatTools.getIndex(this, z, c, t); 
    133132  } 
  • trunk/loci/formats/ChannelSeparator.java

    r2583 r2601  
    5252  // -- IFormatReader API methods -- 
    5353 
    54   /* @see IFormatReader#getImageCount() */  
     54  /* @see IFormatReader#getImageCount() */ 
    5555  public int getImageCount() throws FormatException, IOException { 
    5656    return reader.isRGB() ? 
     
    5959  } 
    6060 
    61   /* @see IFormatReader#getDimensionOrder() */  
     61  /* @see IFormatReader#getDimensionOrder() */ 
    6262  public String getDimensionOrder() throws FormatException, IOException { 
    6363    String order = super.getDimensionOrder(); 
     
    7171  } 
    7272 
    73   /* @see IFormatReader#isRGB() */  
     73  /* @see IFormatReader#isRGB() */ 
    7474  public boolean isRGB() { return false; } 
    7575 
    76   /* @see IFormatReader#openImage(int) */  
     76  /* @see IFormatReader#openImage(int) */ 
    7777  public BufferedImage openImage(int no) throws FormatException, IOException { 
    7878    if (no < 0 || no >= getImageCount()) { 
     
    105105      float[] f = new float[b.length / 4]; 
    106106      for (int i=0; i<b.length; i+=4) { 
    107         f[i/4] = Float.intBitsToFloat(DataTools.bytesToInt(b, i, 4,  
     107        f[i/4] = Float.intBitsToFloat(DataTools.bytesToInt(b, i, 4, 
    108108          isLittleEndian())); 
    109109      } 
     
    116116  } 
    117117 
    118   /* @see IFormatReader#openBytes(int) */  
     118  /* @see IFormatReader#openBytes(int) */ 
    119119  public byte[] openBytes(int no) throws FormatException, IOException { 
    120120    if (no < 0 || no >= getImageCount()) { 
     
    140140  } 
    141141 
    142   /* @see IFormatReader#openThumbImage(int) */  
    143   public BufferedImage openThumbImage(int no)  
     142  /* @see IFormatReader#openThumbImage(int) */ 
     143  public BufferedImage openThumbImage(int no) 
    144144    throws FormatException, IOException 
    145145  { 
     
    154154  } 
    155155 
    156   public int getIndex(int z, int c, int t) throws FormatException, IOException 
    157   { 
     156  public int getIndex(int z, int c, int t) throws FormatException, IOException { 
    158157    return FormatTools.getIndex(this, z, c, t); 
    159158  } 
  • trunk/loci/formats/DimensionSwapper.java

    r2583 r2601  
    3030public class DimensionSwapper extends ReaderWrapper { 
    3131 
    32   // -- Constructors --  
     32  // -- Constructors -- 
    3333 
    3434  /** Constructs a DimensionSwapper around a new image reader. */ 
     
    4242  /* @see loci.formats.IFormatReader#getSizeX() */ 
    4343  public int getSizeX() throws FormatException, IOException { 
    44     return getCoreMetadata().sizeX[getSeries()];  
     44    return getCoreMetadata().sizeX[getSeries()]; 
    4545  } 
    4646 
    4747  /* @see loci.formats.IFormatReader#getSizeY() */ 
    4848  public int getSizeY() throws FormatException, IOException { 
    49     return getCoreMetadata().sizeY[getSeries()];  
     49    return getCoreMetadata().sizeY[getSeries()]; 
    5050  } 
    51    
     51 
    5252  /* @see loci.formats.IFormatReader#getSizeZ() */ 
    5353  public int getSizeZ() throws FormatException, IOException { 
    54     return getCoreMetadata().sizeZ[getSeries()];  
     54    return getCoreMetadata().sizeZ[getSeries()]; 
    5555  } 
    5656 
    5757  /* @see loci.formats.IFormatReader#getSizeC() */ 
    5858  public int getSizeC() throws FormatException, IOException { 
    59     return getCoreMetadata().sizeC[getSeries()];  
     59    return getCoreMetadata().sizeC[getSeries()]; 
    6060  } 
    6161 
    6262  /* @see loci.formats.IFormatReader#getSizeT() */ 
    6363  public int getSizeT() throws FormatException, IOException { 
    64     return getCoreMetadata().sizeT[getSeries()];  
     64    return getCoreMetadata().sizeT[getSeries()]; 
    6565  } 
    6666 
    6767  /* @see loci.formats.IFormatReader#getDimensionOrder() */ 
    6868  public String getDimensionOrder() throws FormatException, IOException { 
    69     return getCoreMetadata().currentOrder[getSeries()];  
     69    return getCoreMetadata().currentOrder[getSeries()]; 
    7070  } 
    7171 
    7272  // -- DimensionSwapper API methods -- 
    7373 
    74   /**  
     74  /** 
    7575   * Swaps the dimensions according to the given dimension order.  If the given 
    7676   * order is identical to the file's native order, then nothing happens. 
     
    7878   * positions 0 and 1 (although X and Y can be reversed). 
    7979   */ 
    80   public void swapDimensions(String order)  throws FormatException, IOException  
     80  public void swapDimensions(String order)  throws FormatException, IOException 
    8181  { 
    8282    if (order == null) return; 
    83      
    84     String oldOrder = getDimensionOrder();  
    85      
     83 
     84    String oldOrder = getDimensionOrder(); 
     85 
    8686    if (order.equals(oldOrder)) return; 
    8787 
     
    111111 
    112112    MetadataStore store = getMetadataStore(); 
    113     store.setPixels(new Integer(dims[xndx]), new Integer(dims[yndx]),  
    114       new Integer(dims[zndx]), new Integer(dims[cndx]),  
     113    store.setPixels(new Integer(dims[xndx]), new Integer(dims[yndx]), 
     114      new Integer(dims[zndx]), new Integer(dims[cndx]), 
    115115      new Integer(dims[tndx]), null, null, order, new Integer(series), null); 
    116116  } 
  • trunk/loci/formats/FileStitcher.java

    r2587 r2601  
    310310  } 
    311311 
    312   /* @see IFormatReader#getDimensionOrder() */  
     312  /* @see IFormatReader#getDimensionOrder() */ 
    313313  public String getDimensionOrder() throws FormatException, IOException { 
    314314    return order[getSeries()]; 
     
    330330  } 
    331331 
    332   /* @see IFormatReader#openImage(int) */  
     332  /* @see IFormatReader#openImage(int) */ 
    333333  public BufferedImage openImage(int no) throws FormatException, IOException { 
    334334    int[] q = computeIndices(no); 
    335335    int fno = q[0], ino = q[1]; 
    336     readers[fno].setId(files[fno]);  
     336    readers[fno].setId(files[fno]); 
    337337    if (ino < readers[fno].getImageCount()) { 
    338338      return readers[fno].openImage(ino); 
     
    347347    return blankImage[sno]; 
    348348  } 
    349   
     349 
    350350  /* @see IFormatReader#openBytes(int) */ 
    351351  public byte[] openBytes(int no) throws FormatException, IOException { 
    352352    int[] q = computeIndices(no); 
    353353    int fno = q[0], ino = q[1]; 
    354     readers[fno].setId(files[fno]);  
     354    readers[fno].setId(files[fno]); 
    355355    if (ino < readers[fno].getImageCount()) { 
    356356      return readers[fno].openBytes(ino); 
     
    373373    int[] q = computeIndices(no); 
    374374    int fno = q[0], ino = q[1]; 
    375     readers[fno].setId(files[fno]);  
     375    readers[fno].setId(files[fno]); 
    376376    return readers[fno].openBytes(ino, buf); 
    377377  } 
     
    383383    int[] q = computeIndices(no); 
    384384    int fno = q[0], ino = q[1]; 
    385     readers[fno].setId(files[fno]);  
     385    readers[fno].setId(files[fno]); 
    386386    if (ino < readers[fno].getImageCount()) { 
    387387      return readers[fno].openThumbImage(ino); 
     
    401401    int[] q = computeIndices(no); 
    402402    int fno = q[0], ino = q[1]; 
    403     readers[fno].setId(files[fno]);  
     403    readers[fno].setId(files[fno]); 
    404404    if (ino < readers[fno].getImageCount()) { 
    405405      return readers[fno].openThumbBytes(ino); 
     
    475475      for (int i=0; i<readers.length; i++) { 
    476476        readers[i].setMetadataCollected(collect); 
    477       }  
     477      } 
    478478    } 
    479479  } 
     
    498498        int total = 0; 
    499499        for (int i=0; i<files.length; i++) { 
    500           readers[i].setId(files[i]);  
     500          readers[i].setId(files[i]); 
    501501          used[i] = readers[i].getUsedFiles(); 
    502502          total += used[i].length; 
     
    520520 
    521521  /* @see IFormatReader#getIndex(int, int, int) */ 
    522   public int getIndex(int z, int c, int t) throws FormatException, IOException 
    523   { 
     522  public int getIndex(int z, int c, int t) throws FormatException, IOException { 
    524523    return FormatTools.getIndex(this, z, c, t); 
    525524  } 
     
    563562 
    564563  /* @see IFormatReader#getMetadataStore() */ 
    565   public MetadataStore getMetadataStore() throws FormatException, IOException 
    566   { 
     564  public MetadataStore getMetadataStore() throws FormatException, IOException { 
    567565    return reader.getMetadataStore(); 
    568566  } 
     
    690688    boolean normalized = reader.isNormalized(); 
    691689    boolean metadataFiltered = reader.isMetadataFiltered(); 
    692     boolean metadataCollected = reader.isMetadataCollected();  
     690    boolean metadataCollected = reader.isMetadataCollected(); 
    693691    StatusListener[] statusListeners = reader.getStatusListeners(); 
    694692    for (int i=1; i<readers.length; i++) { 
    695693      readers[i].setNormalized(normalized); 
    696694      readers[i].setMetadataFiltered(metadataFiltered); 
    697       readers[i].setMetadataCollected(metadataCollected);  
     695      readers[i].setMetadataCollected(metadataCollected); 
    698696      for (int j=0; j<statusListeners.length; j++) { 
    699697        readers[i].addStatusListener(statusListeners[j]); 
     
    757755    // initialize used files list only when requested 
    758756    usedFiles = null; 
    759    
    760     computeAxisLengths();  
     757 
     758    computeAxisLengths(); 
    761759  } 
    762760 
     
    847845 
    848846    // configure the reader, in case we haven't done this one yet 
    849     readers[fno].setId(files[fno]);  
     847    readers[fno].setId(files[fno]); 
    850848    readers[fno].setSeries(reader.getSeries()); 
    851849 
     
    858856   *   values indicating the internal channel index to use for that reader. 
    859857   */ 
    860   protected int[] getIncludeList(int theC) throws FormatException, IOException 
    861   { 
     858  protected int[] getIncludeList(int theC) throws FormatException, IOException { 
    862859    int[] include = new int[readers.length]; 
    863860    Arrays.fill(include, -1); 
     
    878875  public int getImageCount(String id) throws FormatException, IOException { 
    879876    if (!id.equals(currentId)) setId(id); 
    880     return getImageCount();  
     877    return getImageCount(); 
    881878  } 
    882879 
     
    884881  public boolean isRGB(String id) throws FormatException, IOException { 
    885882    if (!id.equals(currentId)) setId(id); 
    886     return isRGB();  
     883    return isRGB(); 
    887884  } 
    888885 
     
    890887  public int getSizeX(String id) throws FormatException, IOException { 
    891888    if (!id.equals(currentId)) setId(id); 
    892     return getSizeX();  
     889    return getSizeX(); 
    893890  } 
    894891 
     
    896893  public int getSizeY(String id) throws FormatException, IOException { 
    897894    if (!id.equals(currentId)) setId(id); 
    898     return getSizeY();  
     895    return getSizeY(); 
    899896  } 
    900897 
     
    902899  public int getSizeZ(String id) throws FormatException, IOException { 
    903900    if (!id.equals(currentId)) setId(id); 
    904     return getSizeZ();  
     901    return getSizeZ(); 
    905902  } 
    906903 
     
    908905  public int getSizeC(String id) throws FormatException, IOException { 
    909906    if (!id.equals(currentId)) setId(id); 
    910     return getSizeC();  
     907    return getSizeC(); 
    911908  } 
    912909 
     
    914911  public int getSizeT(String id) throws FormatException, IOException { 
    915912    if (!id.equals(currentId)) setId(id); 
    916     return getSizeT();  
     913    return getSizeT(); 
    917914  } 
    918915 
     
    920917  public int getPixelType(String id) throws FormatException, IOException { 
    921918    if (!id.equals(currentId)) setId(id); 
    922     return getPixelType();   
     919    return getPixelType(); 
    923920  } 
    924921 
     
    977974  } 
    978975 
    979   /** @deprecated Replaced by {@link getDimensionOrder()} */  
     976  /** @deprecated Replaced by {@link getDimensionOrder()} */ 
    980977  public String getDimensionOrder(String id) 
    981978    throws FormatException, IOException 
     
    10051002  } 
    10061003 
    1007   /** @deprecated Replaced by {@link openImage(int)} */  
     1004  /** @deprecated Replaced by {@link openImage(int)} */ 
    10081005  public BufferedImage openImage(String id, int no) 
    10091006    throws FormatException, IOException 
    10101007  { 
    10111008    if (!id.equals(currentId)) setId(id); 
    1012     return openImage(no);  
    1013   } 
    1014  
    1015   /** @deprecated Replaced by {@link openBytes(int)} */  
     1009    return openImage(no); 
     1010  } 
     1011 
     1012  /** @deprecated Replaced by {@link openBytes(int)} */ 
    10161013  public byte[] openBytes(String id, int no) 
    10171014    throws FormatException, IOException 
    10181015  { 
    10191016    if (!id.equals(currentId)) setId(id); 
    1020     return openBytes(no);  
     1017    return openBytes(no); 
    10211018  } 
    10221019 
     
    10261023  { 
    10271024    if (!id.equals(currentId)) setId(id); 
    1028     return openBytes(no, buf);  
     1025    return openBytes(no, buf); 
    10291026  } 
    10301027 
     
    10341031  { 
    10351032    if (!id.equals(currentId)) setId(id); 
    1036     return openThumbImage(no);  
     1033    return openThumbImage(no); 
    10371034  } 
    10381035 
     
    10421039  { 
    10431040    if (!id.equals(currentId)) setId(id); 
    1044     return openThumbBytes(no);  
     1041    return openThumbBytes(no); 
    10451042  } 
    10461043 
  • trunk/loci/formats/FormatReader.java

    r2587 r2601  
    325325    throws FormatException, IOException 
    326326  { 
    327     return ImageTools.scale(openImage(no), getThumbSizeX(),  
     327    return ImageTools.scale(openImage(no), getThumbSizeX(), 
    328328      getThumbSizeY(), false); 
    329329  } 
     
    388388      else System.err.println("Warning: " + s); 
    389389    } 
    390     collectMetadata = collect;  
     390    collectMetadata = collect; 
    391391  } 
    392392 
     
    419419 
    420420  /* @see IFormatReader#getMetadataValue(String) */ 
    421   public Object getMetadataValue(String field)  
     421  public Object getMetadataValue(String field) 
    422422    throws FormatException, IOException 
    423423  { 
     
    492492  // -- Deprecated IFormatReader API methods -- 
    493493 
    494   /** @deprecated Replaced by {@link getImageCount()} */  
     494  /** @deprecated Replaced by {@link getImageCount()} */ 
    495495  public int getImageCount(String id) throws FormatException, IOException { 
    496     if (!id.equals(currentId)) setId(id);  
     496    if (!id.equals(currentId)) setId(id); 
    497497    return getImageCount(); 
    498498  } 
    499499 
    500   /** @deprecated Replaced by {@link isRGB()} */  
     500  /** @deprecated Replaced by {@link isRGB()} */ 
    501501  public boolean isRGB(String id) throws FormatException, IOException { 
    502502    return getRGBChannelCount(id) > 1; 
    503503  } 
    504504 
    505   /** @deprecated Replaced by {@link getSizeX()} */  
     505  /** @deprecated Replaced by {@link getSizeX()} */ 
    506506  public int getSizeX(String id) throws FormatException, IOException { 
    507     if (!id.equals(currentId)) setId(id);  
     507    if (!id.equals(currentId)) setId(id); 
    508508    return core.sizeX[series]; 
    509509  } 
    510510 
    511   /** @deprecated Replaced by {@link getSizeY()} */  
     511  /** @deprecated Replaced by {@link getSizeY()} */ 
    512512  public int getSizeY(String id) throws FormatException, IOException { 
    513     if (!id.equals(currentId)) setId(id);  
     513    if (!id.equals(currentId)) setId(id); 
    514514    return core.sizeY[series]; 
    515515  } 
    516516 
    517   /** @deprecated Replaced by {@link getSizeZ()} */  
     517  /** @deprecated Replaced by {@link getSizeZ()} */ 
    518518  public int getSizeZ(String id) throws FormatException, IOException { 
    519     if (!id.equals(currentId)) setId(id);  
     519    if (!id.equals(currentId)) setId(id); 
    520520    return core.sizeZ[series]; 
    521521  } 
    522522 
    523   /** @deprecated Replaced by {@link getSizeC()} */  
     523  /** @deprecated Replaced by {@link getSizeC()} */ 
    524524  public int getSizeC(String id) throws FormatException, IOException { 
    525     if (!id.equals(currentId)) setId(id);  
     525    if (!id.equals(currentId)) setId(id); 
    526526    return core.sizeC[series]; 
    527527  } 
    528528 
    529   /** @deprecated Replaced by {@link getSizeT()} */  
     529  /** @deprecated Replaced by {@link getSizeT()} */ 
    530530  public int getSizeT(String id) throws FormatException, IOException { 
    531     if (!id.equals(currentId)) setId(id);  
     531    if (!id.equals(currentId)) setId(id); 
    532532    return core.sizeT[series]; 
    533533  } 
    534534 
    535   /** @deprecated Replaced by {@link getPixelType()} */  
     535  /** @deprecated Replaced by {@link getPixelType()} */ 
    536536  public int getPixelType(String id) throws FormatException, IOException { 
    537     if (!id.equals(currentId)) setId(id);  
     537    if (!id.equals(currentId)) setId(id); 
    538538    return core.pixelType[series]; 
    539539  } 
    540540 
    541   /** @deprecated Replaced by {@link getEffectiveSizeC()} */  
     541  /** @deprecated Replaced by {@link getEffectiveSizeC()} */ 
    542542  public int getEffectiveSizeC(String id) throws FormatException, IOException { 
    543543    // NB: by definition, imageCount == effectiveSizeC * sizeZ * sizeT 
     
    545545  } 
    546546 
    547   /** @deprecated Replaced by {@link getRGBChannelCount()} */  
     547  /** @deprecated Replaced by {@link getRGBChannelCount()} */ 
    548548  public int getRGBChannelCount(String id) throws FormatException, IOException { 
    549549    return getSizeC(id) / getEffectiveSizeC(id); 
    550550  } 
    551551 
    552   /** @deprecated Replaced by {@link getChannelDimLengths()} */  
     552  /** @deprecated Replaced by {@link getChannelDimLengths()} */ 
    553553  public int[] getChannelDimLengths(String id) 
    554554    throws FormatException, IOException 
    555555  { 
    556     if (!id.equals(currentId)) setId(id);  
     556    if (!id.equals(currentId)) setId(id); 
    557557    if (core.cLengths[series] == null) { 
    558558      core.cLengths[series] = new int[] {core.sizeC[series]}; 
     
    561561  } 
    562562 
    563   /** @deprecated Replaced by {@link getChannelDimTypes()} */  
     563  /** @deprecated Replaced by {@link getChannelDimTypes()} */ 
    564564  public String[] getChannelDimTypes(String id) 
    565565    throws FormatException, IOException 
    566566  { 
    567     if (!id.equals(currentId)) setId(id);  
     567    if (!id.equals(currentId)) setId(id); 
    568568    if (core.cTypes[series] == null) { 
    569569      core.cTypes[series] = new String[] {FormatTools.CHANNEL}; 
     
    572572  } 
    573573 
    574   /** @deprecated Replaced by {@link getThumbSizeX()} */  
     574  /** @deprecated Replaced by {@link getThumbSizeX()} */ 
    575575  public int getThumbSizeX(String id) throws FormatException, IOException { 
    576576    int sx = getSizeX(id); 
     
    579579  } 
    580580 
    581   /** @deprecated Replaced by {@link getThumbSizeY()} */  
     581  /** @deprecated Replaced by {@link getThumbSizeY()} */ 
    582582  public int getThumbSizeY(String id) throws FormatException, IOException { 
    583583    int sx = getSizeX(id); 
     
    586586  } 
    587587 
    588   /** @deprecated Replaced by {@link isLittleEndian()} */  
     588  /** @deprecated Replaced by {@link isLittleEndian()} */ 
    589589  public boolean isLittleEndian(String id) throws FormatException, IOException { 
    590590    if (!id.equals(currentId)) setId(id); 
     
    592592  } 
    593593 
    594   /** @deprecated Replaced by {@link getDimensionOrder()} */  
     594  /** @deprecated Replaced by {@link getDimensionOrder()} */ 
    595595  public String getDimensionOrder(String id) throws FormatException, IOException 
    596596  { 
    597     if (!id.equals(currentId)) setId(id);  
     597    if (!id.equals(currentId)) setId(id); 
    598598    return core.currentOrder[series]; 
    599599  } 
    600600 
    601   /** @deprecated Replaced by {@link isOrderCertain()} */  
     601  /** @deprecated Replaced by {@link isOrderCertain()} */ 
    602602  public boolean isOrderCertain(String id) throws FormatException, IOException { 
    603     if (!id.equals(currentId)) setId(id);  
     603    if (!id.equals(currentId)) setId(id); 
    604604    return core.orderCertain[series]; 
    605605  } 
    606606 
    607   /** @deprecated Replaced by {@link isInterleaved()} */  
     607  /** @deprecated Replaced by {@link isInterleaved()} */ 
    608608  public boolean isInterleaved(String id) 
    609609    throws FormatException, IOException 
     
    612612  } 
    613613 
    614   /** @deprecated Replaced by {@link isInterleaved(int)} */  
    615   public boolean isInterleaved(String id, int subC)  
     614  /** @deprecated Replaced by {@link isInterleaved(int)} */ 
     615  public boolean isInterleaved(String id, int subC) 
    616616    throws FormatException, IOException 
    617617  { 
     
    620620  } 
    621621 
    622   /** @deprecated Replaced by {@link openImage(int)} */  
     622  /** @deprecated Replaced by {@link openImage(int)} */ 
    623623  public BufferedImage openImage(String id, int no) 
    624624    throws FormatException, IOException 
     
    628628  } 
    629629 
    630   /** @deprecated Replaced by {@link openBytes(int)} */  
     630  /** @deprecated Replaced by {@link openBytes(int)} */ 
    631631  public byte[] openBytes(String id, int no) 
    632632    throws FormatException, IOException 
     
    636636  } 
    637637 
    638   /** @deprecated Replaced by {@link openBytes(int, byte[])} */  
     638  /** @deprecated Replaced by {@link openBytes(int, byte[])} */ 
    639639  public byte[] openBytes(String id, int no, byte[] buf) 
    640640    throws FormatException, IOException 
     
    643643  } 
    644644 
    645   /** @deprecated Replaced by {@link openThumbImage(int)} */  
     645  /** @deprecated Replaced by {@link openThumbImage(int)} */ 
    646646  public BufferedImage openThumbImage(String id, int no) 
    647647    throws FormatException, IOException 
     
    651651  } 
    652652 
    653   /** @deprecated Replaced by {@link openThumbBytes(int)} */  
     653  /** @deprecated Replaced by {@link openThumbBytes(int)} */ 
    654654  public byte[] openThumbBytes(String id, int no) 
    655655    throws FormatException, IOException 
     
    665665  } 
    666666 
    667   /** @deprecated Replaced by {@link getSeriesCount()} */  
     667  /** @deprecated Replaced by {@link getSeriesCount()} */ 
    668668  public int getSeriesCount(String id) throws FormatException, IOException { 
    669     if (!id.equals(currentId)) setId(id);  
     669    if (!id.equals(currentId)) setId(id); 
    670670    return 1; 
    671671  } 
    672672 
    673   /** @deprecated Replaced by {@link setSeries(int)} */  
     673  /** @deprecated Replaced by {@link setSeries(int)} */ 
    674674  public void setSeries(String id, int no) throws FormatException, IOException { 
    675675    if (no < 0 || no >= getSeriesCount(id)) { 
     
    681681  /** @deprecated Replaced by {@link getSeries()} */ 
    682682  public int getSeries(String id) throws FormatException, IOException { 
    683     if (!id.equals(currentId)) setId(id);  
     683    if (!id.equals(currentId)) setId(id); 
    684684    return series; 
    685685  } 
    686686 
    687   /** @deprecated Replaced by {@link getUsedFiles()} */  
     687  /** @deprecated Replaced by {@link getUsedFiles()} */ 
    688688  public String[] getUsedFiles(String id) throws FormatException, IOException { 
    689     if (!id.equals(currentId)) setId(id);  
     689    if (!id.equals(currentId)) setId(id); 
    690690    return new String[] {id}; 
    691691  } 
    692692 
    693   /** @deprecated Replaced by {@link getIndex(int, int, int)} */  
     693  /** @deprecated Replaced by {@link getIndex(int, int, int)} */ 
    694694  public int getIndex(String id, int z, int c, int t) 
    695695    throws FormatException, IOException 
     
    699699  } 
    700700 
    701   /** @deprecated Replaced by {@link getZCTCoords(int)} */  
     701  /** @deprecated Replaced by {@link getZCTCoords(int)} */ 
    702702  public int[] getZCTCoords(String id, int index) 
    703703    throws FormatException, IOException 
     
    707707  } 
    708708 
    709   /** @deprecated Replaced by {@link getMetadataValue(String)} */  
     709  /** @deprecated Replaced by {@link getMetadataValue(String)} */ 
    710710  public Object getMetadataValue(String id, String field) 
    711711    throws FormatException, IOException 
    712712  { 
    713     if (!id.equals(currentId)) setId(id);  
     713    if (!id.equals(currentId)) setId(id); 
    714714    return getMeta(field); 
    715715  } 
    716716 
    717   /** @deprecated Replaced by {@link getMetadata()} */  
     717  /** @deprecated Replaced by {@link getMetadata()} */ 
    718718  public Hashtable getMetadata(String id) throws FormatException, IOException { 
    719     if (!id.equals(currentId)) setId(id);  
     719    if (!id.equals(currentId)) setId(id); 
    720720    return metadata; 
    721721  } 
    722722 
    723   /** @deprecated Replaced by {@link getCoreMetadata()} */  
    724   public CoreMetadata getCoreMetadata(String id)  
    725     throws FormatException, IOException 
    726   { 
    727     if (!id.equals(currentId)) setId(id);  
     723  /** @deprecated Replaced by {@link getCoreMetadata()} */ 
     724  public CoreMetadata getCoreMetadata(String id) 
     725    throws FormatException, IOException 
     726  { 
     727    if (!id.equals(currentId)) setId(id); 
    728728    return core; 
    729729  } 
    730730 
    731   /** @deprecated Replaced by {@link getMetadataStore()} */  
     731  /** @deprecated Replaced by {@link getMetadataStore()} */ 
    732732  public MetadataStore getMetadataStore(String id) 
    733733    throws FormatException, IOException 
    734734  { 
    735     if (!id.equals(currentId)) setId(id);  
     735    if (!id.equals(currentId)) setId(id); 
    736736    return metadataStore; 
    737737  } 
    738738 
    739   /** @deprecated Replaced by {@link getMetadataStoreRoot()} */  
     739  /** @deprecated Replaced by {@link getMetadataStoreRoot()} */ 
    740740  public Object getMetadataStoreRoot(String id) 
    741741    throws FormatException, IOException 
    742742  { 
    743     if (!id.equals(currentId)) setId(id);  
     743    if (!id.equals(currentId)) setId(id); 
    744744    return getMetadataStore().getRoot(); 
    745745  } 
  • trunk/loci/formats/FormatTools.java

    r2586 r2601  
    247247    reader.setNormalized(normalize); 
    248248    reader.setMetadataFiltered(true); 
    249     reader.setMetadataCollected(doMeta);  
     249    reader.setMetadataCollected(doMeta); 
    250250    reader.setId(id); 
    251251    if (minMaxCalc != null) minMaxCalc.setId(id); 
     
    602602 
    603603    ImageReader reader = new ImageReader(); 
    604     reader.setId(in);  
     604    reader.setId(in); 
    605605 
    606606    long start = System.currentTimeMillis(); 
     
    638638   * to the given Z, C and T coordinates. 
    639639   */ 
    640   public static int getIndex(IFormatReader reader, int z, int c, int t)  
     640  public static int getIndex(IFormatReader reader, int z, int c, int t) 
    641641    throws FormatException, IOException 
    642642  { 
     
    713713   * to the given rasterized index value. 
    714714   */ 
    715   public static int[] getZCTCoords(IFormatReader reader, int index)  
     715  public static int[] getZCTCoords(IFormatReader reader, int index) 
    716716    throws FormatException, IOException 
    717717  { 
  • trunk/loci/formats/IFormatReader.java

    r2586 r2601  
    6161  /** 
    6262   * Gets the pixel type. 
    63    * @param id the image's filename. 
    6463   * @return the pixel type as an enumeration from <code>FormatTools</code> 
    6564   * <i>static</i> pixel types such as <code>INT8</code>. 
     
    151150   * Obtains the specified image from the current file into a pre-allocated byte 
    152151   * array of (sizeX * sizeY * bytesPerPixel). 
    153    * @param id the filename of the base image. 
    154152   * @param no the image index within the file. 
    155153   * @param buf a pre-allocated buffer. 
     
    225223  /** 
    226224   * Obtains the specified metadata field's value for the current file. 
    227    * 
    228225   * @param field the name associated with the metadata field 
    229226   * @return the value, or null if the field doesn't exist 
     
    234231   * Obtains the hashtable containing the metadata field/value pairs from 
    235232   * the current file. 
    236    * 
    237    * @param id the filename 
    238233   * @return the hashtable containing all metadata from the file 
    239234   */ 
     
    257252  /** 
    258253   * Sets the default metadata store for this reader. 
    259    * 
    260254   * @param store a metadata store implementation. 
    261255   */ 
     
    274268   * all file parsing has been performed by the reader prior to retrieval. 
    275269   * Requests for a full populated root object should be made using this method. 
    276    * @param id a fully qualified path to the file. 
    277270   * @return current metadata store's root object fully populated. 
    278271   * @throws IOException if there is an IO error when reading the file specified 
     
    291284  // -- Deprecated API methods -- 
    292285 
    293   /** @deprecated Replaced by {@link getImageCount()} */  
     286  /** @deprecated Replaced by {@link getImageCount()} */ 
    294287  int getImageCount(String id) throws FormatException, IOException; 
    295288 
    296   /** @deprecated Replaced by {@link isRGB()} */  
     289  /** @deprecated Replaced by {@link isRGB()} */ 
    297290  boolean isRGB(String id) throws FormatException, IOException; 
    298291 
     
    312305  int getSizeT(String id) throws FormatException, IOException; 
    313306 
    314   /** @deprecated Replaced by {@link getPixelType()} */  
     307  /** @deprecated Replaced by {@link getPixelType()} */ 
    315308  int getPixelType(String id) throws FormatException, IOException; 
    316309 
    317   /** @deprecated Replaced by {@link getEffectiveSizeC()} */  
     310  /** @deprecated Replaced by {@link getEffectiveSizeC()} */ 
    318311  int getEffectiveSizeC(String id) throws FormatException, IOException; 
    319312 
    320   /** @deprecated Replaced by {@link getRGBChannelCount()} */  
     313  /** @deprecated Replaced by {@link getRGBChannelCount()} */ 
    321314  int getRGBChannelCount(String id) throws FormatException, IOException; 
    322315 
    323   /** @deprecated Replaced by {@link getChannelDimLengths()} */  
     316  /** @deprecated Replaced by {@link getChannelDimLengths()} */ 
    324317  int[] getChannelDimLengths(String id) throws FormatException, IOException; 
    325318 
    326   /** @deprecated Replaced by {@link getChannelDimTypes()} */  
     319  /** @deprecated Replaced by {@link getChannelDimTypes()} */ 
    327320  String[] getChannelDimTypes(String id) throws FormatException, IOException; 
    328321 
    329   /** @deprecated Replaced by {@link getThumbSizeX()} */  
     322  /** @deprecated Replaced by {@link getThumbSizeX()} */ 
    330323  int getThumbSizeX(String id) throws FormatException, IOException; 
    331324 
    332   /** @deprecated Replaced by {@link getThumbSizeY()} */  
     325  /** @deprecated Replaced by {@link getThumbSizeY()} */ 
    333326  int getThumbSizeY(String id) throws FormatException, IOException; 
    334327 
    335   /** @deprecated Replaced by {@link isLittleEndian()} */  
     328  /** @deprecated Replaced by {@link isLittleEndian()} */ 
    336329  boolean isLittleEndian(String id) throws FormatException, IOException; 
    337330 
    338   /** @deprecated Replaced by {@link getDimensionOrder()} */  
     331  /** @deprecated Replaced by {@link getDimensionOrder()} */ 
    339332  String getDimensionOrder(String id) throws FormatException, IOException; 
    340333 
    341   /** @deprecated Replaced by {@link isOrderCertain()} */  
     334  /** @deprecated Replaced by {@link isOrderCertain()} */ 
    342335  boolean isOrderCertain(String id) throws FormatException, IOException; 
    343336 
    344   /** @deprecated Replaced by {@link isInterleaved()} */  
     337  /** @deprecated Replaced by {@link isInterleaved()} */ 
    345338  boolean isInterleaved(String id) throws FormatException, IOException; 
    346339 
    347   /** @deprecated Replaced by {@link isInterleaved(int)} */  
     340  /** @deprecated Replaced by {@link isInterleaved(int)} */ 
    348341  boolean isInterleaved(String id, int subC) 
    349342    throws FormatException, IOException; 
    350343 
    351   /** @deprecated Replaced by {@link openImage(int)} */  
     344  /** @deprecated Replaced by {@link openImage(int)} */ 
    352345  BufferedImage openImage(String id, int no) 
    353346    throws FormatException, IOException; 
    354347 
    355   /** @deprecated Replaced by {@link openBytes(int)} */  
     348  /** @deprecated Replaced by {@link openBytes(int)} */ 
    356349  byte[] openBytes(String id, int no) throws FormatException, IOException; 
    357350 
    358   /** @deprecated Replaced by {@link openBytes(int, byte[])} */  
     351  /** @deprecated Replaced by {@link openBytes(int, byte[])} */ 
    359352  byte[] openBytes(String id, int no, byte[] buf) 
    360353    throws FormatException, IOException; 
    361354 
    362   /** @deprecated Replaced by {@link openThumbImage(int)} */  
     355  /** @deprecated Replaced by {@link openThumbImage(int)} */ 
    363356  BufferedImage openThumbImage(String id, int no) 
    364357    throws FormatException, IOException; 
    365358 
    366   /** @deprecated Replaced by {@link openThumbBytes(int)} */  
     359  /** @deprecated Replaced by {@link openThumbBytes(int)} */ 
    367360  byte[] openThumbBytes(String id, int no) throws FormatException, IOException; 
    368361 
    369   /** @deprecated Replaced by {@link getSeriesCount()} */  
     362  /** @deprecated Replaced by {@link getSeriesCount()} */ 
    370363  int getSeriesCount(String id) throws FormatException, IOException; 
    371364 
    372   /** @deprecated Replaced by {@link setSeries(int)} */  
     365  /** @deprecated Replaced by {@link setSeries(int)} */ 
    373366  void setSeries(String id, int no) throws FormatException, IOException; 
    374367 
    375   /** @deprecated Replaced by {@link getSeries()} */  
     368  /** @deprecated Replaced by {@link getSeries()} */ 
    376369  int getSeries(String id) throws FormatException, IOException; 
    377370 
    378   /** @deprecated Replaced by {@link getUsedFiles()} */  
     371  /** @deprecated Replaced by {@link getUsedFiles()} */ 
    379372  String[] getUsedFiles(String id) throws FormatException, IOException; 
    380373 
    381   /** @deprecated Replaced by {@link getIndex(int, int, int)} */  
     374  /** @deprecated Replaced by {@link getIndex(int, int, int)} */ 
    382375  int getIndex(String id, int z, int c, int t) 
    383376    throws FormatException, IOException; 
    384377 
    385   /** @deprecated Replaced by {@link getZCTCoords(int)} */  
     378  /** @deprecated Replaced by {@link getZCTCoords(int)} */ 
    386379  int[] getZCTCoords(String id, int index) 
    387380    throws FormatException, IOException; 
    388381 
    389   /** @deprecated Replaced by {@link getMetadataValue(String)} */  
     382  /** @deprecated Replaced by {@link getMetadataValue(String)} */ 
    390383  Object getMetadataValue(String id, String field) 
    391384    throws FormatException, IOException; 
    392385 
    393   /** @deprecated Replaced by {@link getMetadata()} */  
     386  /** @deprecated Replaced by {@link getMetadata()} */ 
    394387  Hashtable getMetadata(String id) throws FormatException, IOException; 
    395388 
    396   /** @deprecated Replaced by {@link getCoreMetadata()} */  
     389  /** @deprecated Replaced by {@link getCoreMetadata()} */ 
    397390  CoreMetadata getCoreMetadata(String id) throws FormatException, IOException; 
    398391 
    399   /** @deprecated Replaced by {@link getMetadataStore()} */  
     392  /** @deprecated Replaced by {@link getMetadataStore()} */ 
    400393  MetadataStore getMetadataStore(String id) throws FormatException, IOException; 
    401394 
    402   /** @deprecated Replaced by {@link getMetadataStoreRoot()} */  
     395  /** @deprecated Replaced by {@link getMetadataStoreRoot()} */ 
    403396  Object getMetadataStoreRoot(String id) throws FormatException, IOException; 
    404397 
  • trunk/loci/formats/IFormatWriter.java

    r2587 r2601  
    3838  void saveImage(String id, Image image, boolean last) 
    3939    throws FormatException, IOException; 
    40    
     40 
    4141  /** Closes open files. */ 
    4242  void close() throws FormatException, IOException; 
  • trunk/loci/formats/ImageReader.java

    r2587 r2601  
    165165  /* @see IFormatReader#setId(String) */ 
    166166  public void setId(String id) throws FormatException, IOException { 
    167     getReader(id).setId(id);  
     167    getReader(id).setId(id); 
    168168  } 
    169169 
     
    181181  public int getSizeX() throws FormatException, IOException { 
    182182    return getReader().getSizeX(); 
    183   }  
     183  } 
    184184 
    185185  /* @see IFormatReader#getSizeY() */ 
    186186  public int getSizeY() throws FormatException, IOException { 
    187187    return getReader().getSizeY(); 
    188   }  
     188  } 
    189189 
    190190  /* @see IFormatReader#getSizeC() */ 
    191191  public int getSizeC() throws FormatException, IOException { 
    192192    return getReader().getSizeC(); 
    193   }  
     193  } 
    194194 
    195195  /* @see IFormatReader#getSizeZ() */ 
    196196  public int getSizeZ() throws FormatException, IOException { 
    197197    return getReader().getSizeZ(); 
    198   }  
     198  } 
    199199 
    200200  /* @see IFormatReader#getSizeT() */ 
    201201  public int getSizeT() throws FormatException, IOException { 
    202202    return getReader().getSizeT(); 
    203   }  
     203  } 
    204204 
    205205  /* @see IFormatReader#getPixelType() */ 
     
    313313 
    314314  /* @see IFormatReader#getIndex(int, int, int) */ 
    315   public int getIndex(int z, int c, int t) throws FormatException, IOException 
    316   { 
     315  public int getIndex(int z, int c, int t) throws FormatException, IOException { 
    317316    return getReader().getIndex(z, c, t); 
    318317  } 
     
    364363    for (int i=0; i<readers.length; i++) readers[i].setNormalized(normalize); 
    365364  } 
    366    
     365 
    367366  /* @see IFormatReader#isNormalized() */ 
    368367  public boolean isNormalized() { 
    369368    // NB: all readers should have the same normalization setting 
    370369    return readers[0].isNormalized(); 
    371   }  
     370  } 
    372371 
    373372  /* @see IFormatReader#setMetadataCollected(boolean) */ 
  • trunk/loci/formats/MinMaxCalculator.java

    r2587 r2601  
    6969      throw new FormatException("Invalid channel index: " + theC); 
    7070    } 
    71    
    72     // check that all planes have been reade  
    73     if (minMaxDone == null || minMaxDone[getSeries()] < getImageCount()) { 
    74       return null; 
    75     } 
    76     return new Double(chanMin[getSeries()][theC]); 
    77   } 
    78  
    79   /** 
    80    * Retrieves a specified channel's global maximum. 
    81    * Returns null if some of the image planes have not been read. 
    82    */ 
    83   public Double getChannelGlobalMaximum(int theC) 
    84     throws FormatException, IOException 
    85   { 
    86     if (theC < 0 || theC >= getSizeC()) { 
    87       throw new FormatException("Invalid channel index: " + theC); 
    88     } 
    89    
     71 
    9072    // check that all planes have been reade 
    9173    if (minMaxDone == null || minMaxDone[getSeries()] < getImageCount()) { 
    9274      return null; 
    9375    } 
    94     return new Double(chanMax[getSeries()][theC]);  
     76    return new Double(chanMin[getSeries()][theC]); 
     77  } 
     78 
     79  /** 
     80   * Retrieves a specified channel's global maximum. 
     81   * Returns null if some of the image planes have not been read. 
     82   */ 
     83  public Double getChannelGlobalMaximum(int theC) 
     84    throws FormatException, IOException 
     85  { 
     86    if (theC < 0 || theC >= getSizeC()) { 
     87      throw new FormatException("Invalid channel index: " + theC); 
     88    } 
     89 
     90    // check that all planes have been reade 
     91    if (minMaxDone == null || minMaxDone[getSeries()] < getImageCount()) { 
     92      return null; 
     93    } 
     94    return new Double(chanMax[getSeries()][theC]); 
    9595  } 
    9696 
     
    128128    if (planeMin[getSeries()][pBase] != planeMin[getSeries()][pBase]) { 
    129129      return null; 
    130     }  
     130    } 
    131131 
    132132    Double[] min = new Double[numRGB]; 
     
    134134      min[c] = new Double(planeMin[getSeries()][pBase + c]); 
    135135    } 
    136     return min;  
     136    return min; 
    137137  } 
    138138 
     
    150150    if (planeMax[getSeries()][pBase] != planeMax[getSeries()][pBase]) { 
    151151      return null; 
    152     }  
     152    } 
    153153 
    154154    Double[] max = new Double[numRGB]; 
     
    156156      max[c] = new Double(planeMax[getSeries()][pBase + c]); 
    157157    } 
    158     return max;  
    159   } 
    160  
    161   /**  
    162    * Returns true if the values returned by  
     158    return max; 
     159  } 
     160 
     161  /** 
     162   * Returns true if the values returned by 
    163163   * getChannelGlobalMinimum/Maximum can be trusted. 
    164164   */ 
     
    167167  } 
    168168 
    169   // -- IFormatReader API methods --  
     169  // -- IFormatReader API methods -- 
    170170 
    171171  /* @see IFormatReader#openImage(int) */ 
     
    212212      planeMax[getSeries()][pBase + c] = Double.NEGATIVE_INFINITY; 
    213213    } 
    214   
     214 
    215215    WritableRaster pixels = b.getRaster(); 
    216216    for (int x=0; x<b.getWidth(); x++) { 
     
    220220          if (v > chanMax[getSeries()][cBase + c]) { 
    221221            chanMax[getSeries()][cBase + c] = v; 
    222           }  
     222          } 
    223223          if (v < chanMin[getSeries()][cBase + c]) { 
    224224            chanMin[getSeries()][cBase + c] = v; 
    225           }  
     225          } 
    226226          if (v > planeMax[getSeries()][pBase + c]) { 
    227227            planeMax[getSeries()][pBase + c] = v; 
    228           }  
     228          } 
    229229          if (v < planeMin[getSeries()][pBase + c]) { 
    230230            planeMin[getSeries()][pBase + c] = v; 
    231           }  
    232         } 
    233       } 
    234     } 
    235    
    236     minMaxDone[getSeries()]++;  
    237    
     231          } 
     232        } 
     233      } 
     234    } 
     235 
     236    minMaxDone[getSeries()]++; 
     237 
    238238    if (minMaxDone[getSeries()] == getImageCount()) { 
    239239      MetadataStore store = getMetadataStore(); 
    240       for (int c=0; c<getSizeC(); c++) {  
    241         store.setChannelGlobalMinMax(c, new Double(chanMin[getSeries()][c]),  
     240      for (int c=0; c<getSizeC(); c++) { 
     241        store.setChannelGlobalMinMax(c, new Double(chanMin[getSeries()][c]), 
    242242          new Double(chanMax[getSeries()][c]), new Integer(getSeries())); 
    243       }  
    244     } 
    245   } 
    246    
     243      } 
     244    } 
     245  } 
     246 
    247247  /** Updates min/max values based on the given byte array. */ 
    248248  private void updateMinMax(byte[] b, int ndx) 
     
    268268      planeMax[getSeries()][pBase + c] = Double.NEGATIVE_INFINITY; 
    269269    } 
    270     
     270 
    271271    byte[] value = new byte[bytes]; 
    272272    for (int i=0; i<pixels; i++) { 
     
    278278        if (v > chanMax[getSeries()][cBase + c]) { 
    279279          chanMax[getSeries()][cBase + c] = v; 
    280         }  
     280        } 
    281281        if (v < chanMin[getSeries()][cBase + c]) { 
    282282          chanMin[getSeries()][cBase + c] = v; 
    283         }  
     283        } 
    284284        if (v > planeMax[getSeries()][pBase + c]) { 
    285285          planeMax[getSeries()][pBase + c] = v; 
    286         }  
     286        } 
    287287        if (v < planeMin[getSeries()][pBase + c]) { 
    288288          planeMin[getSeries()][pBase + c] = v; 
    289         }  
    290      } 
    291     } 
    292    
    293     minMaxDone[getSeries()]++;  
    294    
     289        } 
     290      } 
     291    } 
     292 
     293    minMaxDone[getSeries()]++; 
     294 
    295295    if (minMaxDone[getSeries()] == getImageCount()) { 
    296296      MetadataStore store = getMetadataStore(); 
    297       for (int c=0; c<getSizeC(); c++) {  
    298         store.setChannelGlobalMinMax(c, new Double(chanMin[getSeries()][c]),  
     297      for (int c=0; c<getSizeC(); c++) { 
     298        store.setChannelGlobalMinMax(c, new Double(chanMin[getSeries()][c]), 
    299299          new Double(chanMax[getSeries()][c]), new Integer(getSeries())); 
    300       }  
     300      } 
    301301    } 
    302302  } 
     
    320320      } 
    321321    } 
    322     if (planeMin == null) {  
     322    if (planeMin == null) { 
    323323      planeMin = new double[seriesCount][]; 
    324324      int oldSeries = getSeries(); 
     
    329329        Arrays.fill(planeMin[i], Double.NaN); 
    330330      } 
    331       setSeries(oldSeries);  
    332     } 
    333     if (planeMax == null) {  
     331      setSeries(oldSeries); 
     332    } 
     333    if (planeMax == null) { 
    334334      planeMax = new double[seriesCount][]; 
    335335      int oldSeries = getSeries(); 
     
    340340        Arrays.fill(planeMax[i], Double.NaN); 
    341341      } 
    342       setSeries(oldSeries);  
     342      setSeries(oldSeries); 
    343343    } 
    344344    if (minMaxDone == null) minMaxDone = new int[seriesCount]; 
  • trunk/loci/formats/RandomAccessStream.java

    r2527 r2601  
    114114      raf.readFully(buf); 
    115115      raf.seek(0); 
    116       bufferSizes[0] = MAX_OVERHEAD / 2;  
    117       lastValid = 1;  
     116      bufferSizes[0] = MAX_OVERHEAD / 2; 
     117      lastValid = 1; 
    118118      nextMark = MAX_OVERHEAD; 
    119119    } 
     
    412412 
    413413    while ((ndx < lastValid) && (ndx < MAX_HISTORY)) { 
    414       int size = bufferSizes[ndx];  
     414      int size = bufferSizes[ndx]; 
    415415      sum += (size * ((ndx / (MAX_HISTORY / 5)) + 1)); 
    416416      div += (ndx / (MAX_HISTORY / 5)) + 1; 
     
    425425    } 
    426426    else { 
    427       bufferSizes[0] = newSize;  
     427      bufferSizes[0] = newSize; 
    428428    } 
    429429 
     
    467467      } 
    468468      else { 
    469         bufferSizes[0] = MAX_OVERHEAD;  
     469        bufferSizes[0] = MAX_OVERHEAD; 
    470470      } 
    471471 
  • trunk/loci/formats/ReaderWrapper.java

    r2587 r2601  
    286286  /** @deprecated Replaced by IFormatReader#getImageCount() */ 
    287287  public int getImageCount(String id) throws FormatException, IOException { 
    288     reader.setId(id);  
     288    reader.setId(id); 
    289289    return reader.getImageCount(); 
    290290  } 
     
    292292  /** @deprecated Replaced by IFormatReader#isRGB() */ 
    293293  public boolean isRGB(String id) throws FormatException, IOException { 
    294     reader.setId(id);  
     294    reader.setId(id); 
    295295    return reader.isRGB(); 
    296296  } 
     
    298298  /** @deprecated Replaced by IFormatReader#getSizeX() */ 
    299299  public int getSizeX(String id) throws FormatException, IOException { 
    300     reader.setId(id);  
     300    reader.setId(id); 
    301301    return reader.getSizeX(); 
    302302  } 
     
    304304  /** @deprecated Replaced by IFormatReader#getSizeY() */ 
    305305  public int getSizeY(String id) throws FormatException, IOException { 
    306     reader.setId(id);  
     306    reader.setId(id); 
    307307    return reader.getSizeY(); 
    308308  } 
     
    310310  /** @deprecated Replaced by IFormatReader#getSizeZ() */ 
    311311  public int getSizeZ(String id) throws FormatException, IOException { 
    312     reader.setId(id);  
     312    reader.setId(id); 
    313313    return reader.getSizeZ(); 
    314314  } 
     
    316316  /** @deprecated Replaced by IFormatReader#getSizeC() */ 
    317317  public int getSizeC(String id) throws FormatException, IOException { 
    318     reader.setId(id);  
     318    reader.setId(id); 
    319319    return reader.getSizeC(); 
    320320  } 
     
    322322  /** @deprecated Replaced by IFormatReader#getSizeT() */ 
    323323  public int getSizeT(String id) throws FormatException, IOException { 
    324     reader.setId(id);  
     324    reader.setId(id); 
    325325    return reader.getSizeT(); 
    326326  } 
     
    328328  /** @deprecated Replaced by IFormatReader#getPixelType() */ 
    329329  public int getPixelType(String id) throws FormatException, IOException { 
    330     reader.setId(id);  
     330    reader.setId(id); 
    331331    return reader.getPixelType(); 
    332332  } 
     
    334334  /** @deprecated Replaced by IFormatReader#getEffectiveSizeC() */ 
    335335  public int getEffectiveSizeC(String id) throws FormatException, IOException { 
    336     reader.setId(id);  
     336    reader.setId(id); 
    337337    return getImageCount() / (getSizeZ() * getSizeT()); 
    338338  } 
     
    340340  /** @deprecated Replaced by IFormatReader#getRGBChannelCount() */ 
    341341  public int getRGBChannelCount(String id) throws FormatException, IOException { 
    342     reader.setId(id);  
     342    reader.setId(id); 
    343343    return getSizeC() / getEffectiveSizeC(); 
    344344  } 
     
    348348    throws FormatException, IOException 
    349349  { 
    350     reader.setId(id);  
     350    reader.setId(id); 
    351351    return reader.getChannelDimLengths(); 
    352352  } 
     
    356356    throws FormatException, IOException 
    357357  { 
    358     reader.setId(id);  
     358    reader.setId(id); 
    359359    return reader.getChannelDimTypes(); 
    360360  } 
     
    362362  /** @deprecated Replaced by IFormatReader#getThumbSizeX() */ 
    363363  public int getThumbSizeX(String id) throws FormatException, IOException { 
    364     reader.setId(id);  
     364    reader.setId(id); 
    365365    return reader.getThumbSizeX(); 
    366366  } 
     
    368368  /** @deprecated Replaced by IFormatReader#getThumbSizeY() */ 
    369369  public int getThumbSizeY(String id) throws FormatException, IOException { 
    370     reader.setId(id);  
     370    reader.setId(id); 
    371371    return reader.getThumbSizeY(); 
    372372  } 
     
    374374  /** @deprecated Replaced by IFormatReader#isLittleEndian() */ 
    375375  public boolean isLittleEndian(String id) throws FormatException, IOException { 
    376     reader.setId(id);  
     376    reader.setId(id); 
    377377    return reader.isLittleEndian(); 
    378378  } 
     
    382382    throws FormatException, IOException 
    383383  { 
    384     reader.setId(id);  
     384    reader.setId(id); 
    385385    return reader.getDimensionOrder(); 
    386386  } 
     
    388388  /** @deprecated Replaced by IFormatReader#isOrderCertain() */ 
    389389  public boolean isOrderCertain(String id) throws FormatException, IOException { 
    390     reader.setId(id);  
     390    reader.setId(id); 
    391391    return reader.isOrderCertain(); 
    392392  } 
     
    394394  /** @deprecated Replaced by IFormatReader#isInterleaved() */ 
    395395  public boolean isInterleaved(String id) throws FormatException, IOException { 
    396     reader.setId(id);  
     396    reader.setId(id); 
    397397    return reader.isInterleaved(); 
    398398  } 
     
    402402    throws FormatException, IOException 
    403403  { 
    404     reader.setId(id);  
     404    reader.setId(id); 
    405405    return reader.isInterleaved(subC); 
    406406  } 
     
    410410    throws FormatException, IOException 
    411411  { 
    412     reader.setId(id);  
     412    reader.setId(id); 
    413413    return reader.openImage(no); 
    414414  } 
     
    418418    throws FormatException, IOException 
    419419  { 
    420     reader.setId(id);  
     420    reader.setId(id); 
    421421    return reader.openBytes(no); 
    422422  } 
     
    426426    throws FormatException, IOException 
    427427  { 
    428     reader.setId(id);  
     428    reader.setId(id); 
    429429    return reader.openBytes(no, buf); 
    430430  } 
     
    434434    throws FormatException, IOException 
    435435  { 
    436     reader.setId(id);  
     436    reader.setId(id); 
    437437    return reader.openThumbImage(no); 
    438438  } 
     
    442442    throws FormatException, IOException 
    443443  { 
    444     reader.setId(id);  
     444    reader.setId(id); 
    445445    return reader.openThumbBytes(no); 
    446446  } 
     
    448448  /** @deprecated Replaced by IFormatReader#getSeriesCount() */ 
    449449  public int getSeriesCount(String id) throws FormatException, IOException { 
    450     reader.setId(id);  
     450    reader.setId(id); 
    451451    return reader.getSeriesCount(); 
    452452  } 
     
    454454  /** @deprecated Replaced by IFormatReader#setSeries(int) */ 
    455455  public void setSeries(String id, int no) throws FormatException, IOException { 
    456     reader.setId(id);  
     456    reader.setId(id); 
    457457    reader.setSeries(no); 
    458458  } 
     
    460460  /** @deprecated Replaced by IFormatReader#getSeries() */ 
    461461  public int getSeries(String id) throws FormatException, IOException { 
    462     reader.setId(id);  
     462    reader.setId(id); 
    463463    return reader.getSeries(); 
    464464  } 
     
    466466  /** @deprecated Replaced by IFormatReader#getUsedFiles() */ 
    467467  public String[] getUsedFiles(String id) throws FormatException, IOException { 
    468     reader.setId(id);  
     468    reader.setId(id); 
    469469    return reader.getUsedFiles(); 
    470470  } 
     
    474474    throws FormatException, IOException 
    475475  { 
    476     reader.setId(id);  
     476    reader.setId(id); 
    477477    return reader.getIndex(z, c, t); 
    478478  } 
     
    482482    throws FormatException, IOException 
    483483  { 
    484     reader.setId(id);  
     484    reader.setId(id); 
    485485    return reader.getZCTCoords(index); 
    486486  } 
     
    490490    throws FormatException, IOException 
    491491  { 
    492     reader.setId(id);  
     492    reader.setId(id); 
    493493    return reader.getMetadataValue(field); 
    494494  } 
     
    496496  /** @deprecated Replaced by IFormatReader#getMetadata() */ 
    497497  public Hashtable getMetadata(String id) throws FormatException, IOException { 
    498     reader.setId(id);  
     498    reader.setId(id); 
    499499    return reader.getMetadata(); 
    500500  } 
     
    504504    throws FormatException, IOException 
    505505  { 
    506     reader.setId(id);  
     506    reader.setId(id); 
    507507    return reader.getCoreMetadata(); 
    508508  } 
     
    512512    throws FormatException, IOException 
    513513  { 
    514     reader.setId(id);  
     514    reader.setId(id); 
    515515    return reader.getMetadataStore(); 
    516516  } 
     
    520520    throws FormatException, IOException 
    521521  { 
    522     reader.setId(id);  
     522    reader.setId(id); 
    523523    return reader.getMetadataStoreRoot(); 
    524524  } 
  • trunk/loci/formats/TiffTools.java

    r2586 r2601  
    13721372    int samplesPerPixel = getSamplesPerPixel(ifd); 
    13731373    int photoInterp = getPhotometricInterpretation(ifd); 
    1374      
     1374 
    13751375    int[] validBits = getIFDIntArray(ifd, VALID_BITS, false); 
    13761376 
  • trunk/loci/formats/codec/Base64Codec.java

    r2589 r2601  
    3030 * Implements encoding (compress) and decoding (decompress) methods 
    3131 * for Base64.  This code was adapted from the Jakarta Commons Codec source, 
    32  * http://jakarta.apache.org/commons  
     32 * http://jakarta.apache.org/commons 
    3333 * 
    3434 * @author Melissa Linkert linkert at wisc.edu 
  • trunk/loci/formats/codec/JPEGCodec.java

    r2455 r2601  
    5858   * Decodes an image strip using JPEG compression algorithm. 
    5959   * 
    60    * @param b input data to be decompressed 
     60   * @param input input data to be decompressed 
    6161   * @return The decompressed data 
    6262   * @throws FormatException if data is not valid compressed data for this 
  • trunk/loci/formats/gui/ImageViewer.java

    r2583 r2601  
    203203      Location f = new Location(id); 
    204204      id = f.getAbsolutePath(); 
    205       myReader.setId(id);  
     205      myReader.setId(id); 
    206206      int num = myReader.getImageCount(); 
    207207      ProgressMonitor progress = new ProgressMonitor(this, 
  • trunk/loci/formats/in/AVIReader.java

    r2584 r2601  
    7070  // -- FormatReader API methods -- 
    7171 
    72   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     72  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    7373  public boolean isThisType(byte[] block) { 
    7474    return false; 
    7575  } 
    7676 
    77   /* @see loci.formats.IFormatReader#openBytes(int) */  
     77  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    7878  public byte[] openBytes(int no) throws FormatException, IOException { 
    79     byte[] buf =  
     79    byte[] buf = 
    8080      new byte[core.sizeX[0] * bmpScanLineSize * (bmpBitsPerPixel / 8)]; 
    8181    return openBytes(no, buf); 
     
    114114  } 
    115115 
    116   /* @see loci.formats.IFormatReader#openImage(int) */  
     116  /* @see loci.formats.IFormatReader#openImage(int) */ 
    117117  public BufferedImage openImage(int no) throws FormatException, IOException { 
    118118    return ImageTools.makeImage(openBytes(no), 
     
    191191                addMeta("Max. bytes per second", new Integer(in.readInt())); 
    192192 
    193                 in.skipBytes(8);  
    194                 
     193                in.skipBytes(8); 
     194 
    195195                addMeta("Total frames", new Integer(in.readInt())); 
    196196                addMeta("Initial frames", new Integer(in.readInt())); 
    197197 
    198                 in.skipBytes(8);  
     198                in.skipBytes(8); 
    199199                core.sizeX[0] = in.readInt(); 
    200                  
     200 
    201201                addMeta("Frame height", new Integer(in.readInt())); 
    202202                addMeta("Scale factor", new Integer(in.readInt())); 
     
    251251                spos = in.getFilePointer(); 
    252252 
    253                 in.skipBytes(4);  
     253                in.skipBytes(4); 
    254254                bmpWidth = in.readInt(); 
    255255                core.sizeY[0] = in.readInt(); 
    256                 in.skipBytes(2);  
     256                in.skipBytes(2); 
    257257                bmpBitsPerPixel = in.readShort(); 
    258258                bmpCompression = in.readInt(); 
    259259                bmpSizeOfBitmap = in.readInt(); 
    260                  
    261                 addMeta("Horizontal resolution", new Integer(in.readInt()));  
    262                 addMeta("Vertical resolution", new Integer(in.readInt()));  
    263                  
     260 
     261                addMeta("Horizontal resolution", new Integer(in.readInt())); 
     262                addMeta("Vertical resolution", new Integer(in.readInt())); 
     263 
    264264                bmpColorsUsed = in.readInt(); 
    265265                in.skipBytes(4); 
     
    409409      pos = in.getFilePointer(); 
    410410    } 
    411     status("Populating metadata");   
    412      
     411    status("Populating metadata"); 
     412 
    413413    core.imageCount[0] = offsets.size(); 
    414414 
  • trunk/loci/formats/in/AliconaReader.java

    r2584 r2601  
    4848  // -- FormatReader API methods -- 
    4949 
    50   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     50  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    5151  public boolean isThisType(byte[] block) { 
    5252    return (new String(block)).indexOf("Alicona") != -1; 
    5353  } 
    54   
    55   /* @see loci.formats.IFormatReader#openBytes(int) */  
     54 
     55  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    5656  public byte[] openBytes(int no) throws FormatException, IOException { 
    5757    byte[] buf = new byte[core.sizeX[0] * core.sizeY[0] * numBytes]; 
     
    6060 
    6161  /* @see loci.formats.IFormatReader#openBytes(int, byte[]) */ 
    62   public byte[] openBytes(int no, byte[] buf)  
     62  public byte[] openBytes(int no, byte[] buf) 
    6363    throws FormatException, IOException 
    6464  { 
     
    8484  } 
    8585 
    86   /* @see loci.formats.IFormatReader#openImage(int) */  
     86  /* @see loci.formats.IFormatReader#openImage(int) */ 
    8787  public BufferedImage openImage(int no) throws FormatException, IOException { 
    88     return ImageTools.makeImage(openBytes( no), core.sizeX[0], core.sizeY[0], 
     88    return ImageTools.makeImage(openBytes(no), core.sizeX[0], core.sizeY[0], 
    8989      1, false, numBytes, true); 
    9090  } 
     
    147147    status("Populating metadata"); 
    148148 
    149     numBytes = (int) (in.length() - textureOffset) /  
     149    numBytes = (int) (in.length() - textureOffset) / 
    150150      (core.sizeX[0] * core.sizeY[0] * core.imageCount[0]); 
    151151 
     
    170170      new Integer(core.sizeT[0]), 
    171171      new Integer(core.pixelType[0]), 
    172       new Boolean(!core.littleEndian[0]),  
     172      new Boolean(!core.littleEndian[0]), 
    173173      core.currentOrder[0], 
    174174      null, 
  • trunk/loci/formats/in/BMPReader.java

    r2586 r2601  
    6868  // -- FormatReader API methods -- 
    6969 
    70   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     70  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    7171  public boolean isThisType(byte[] block) { 
    7272    if (block.length != 14) { 
     
    131131  } 
    132132 
    133   /* @see loci.formats.IFormatReader#openBytes(int) */  
     133  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    134134  public byte[] openBytes(int no) throws FormatException, IOException { 
    135135    byte[] buf = new byte[core.sizeX[0] * core.sizeY[0] * core.sizeC[0]]; 
     
    137137  } 
    138138 
    139   /* @see loci.formats.IFormatReader#openImage(int) */  
     139  /* @see loci.formats.IFormatReader#openImage(int) */ 
    140140  public BufferedImage openImage(int no) throws FormatException, IOException { 
    141     return ImageTools.makeImage(openBytes(no), core.sizeX[0], core.sizeY[0],  
     141    return ImageTools.makeImage(openBytes(no), core.sizeX[0], core.sizeY[0], 
    142142      core.sizeC[0], false); 
    143143  } 
     
    251251    } 
    252252 
    253     if (core.sizeX[0] % 2 == 1) core.sizeX[0]++;  
    254     core.rgb[0] = core.sizeC[0] > 1;  
     253    if (core.sizeX[0] % 2 == 1) core.sizeX[0]++; 
     254    core.rgb[0] = core.sizeC[0] > 1; 
    255255    core.littleEndian[0] = true; 
    256256    core.interleaved[0] = true; 
    257     core.imageCount[0] = 1;  
     257    core.imageCount[0] = 1; 
    258258    core.sizeZ[0] = 1; 
    259259    //core.sizeC[0] = core.rgb[0] ? 3 : 1; 
  • trunk/loci/formats/in/BaseTiffReader.java

    r2584 r2601  
    6565      TiffTools.getIFDIntValue(ifds[0], TiffTools.IMAGE_WIDTH, false, -1), 
    6666      TiffTools.getIFDIntValue(ifds[0], TiffTools.IMAGE_LENGTH, false, -1), 
    67       core.imageCount[0]  
     67      core.imageCount[0] 
    6868    }; 
    6969  } 
     
    439439    } 
    440440 
    441     int samples = TiffTools.getIFDIntValue(ifds[0],  
     441    int samples = TiffTools.getIFDIntValue(ifds[0], 
    442442      TiffTools.SAMPLES_PER_PIXEL, false, 1); 
    443443    core.rgb[0] = samples > 1 || p == TiffTools.RGB_PALETTE || 
     
    539539      try { 
    540540        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); 
    541         SimpleDateFormat parse = new SimpleDateFormat("yyyy:MM:dd HH:mm:ss");  
     541        SimpleDateFormat parse = new SimpleDateFormat("yyyy:MM:dd HH:mm:ss"); 
    542542        Date date = parse.parse(creationDate, new ParsePosition(0)); 
    543543        creationDate = sdf.format(date); 
     
    675675  // -- FormatReader API methods -- 
    676676 
    677   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     677  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    678678  public boolean isThisType(byte[] block) { 
    679679    return TiffTools.isValidHeader(block); 
    680680  } 
    681681 
    682   /* @see loci.formats.IFormatReader#getMetadataValue(String) */  
     682  /* @see loci.formats.IFormatReader#getMetadataValue(String) */ 
    683683  public Object getMetadataValue(String field) 
    684684    throws FormatException, IOException 
     
    688688 
    689689  /* @see loci.formats.FormatReader#openBytes(int, byte[]) */ 
    690   public byte[] openBytes(int no, byte[] buf)  
     690  public byte[] openBytes(int no, byte[] buf) 
    691691    throws FormatException, IOException 
    692692  { 
     
    711711  } 
    712712 
    713   /* @see loci.formats.IFormatReader#openImage(int) */  
     713  /* @see loci.formats.IFormatReader#openImage(int) */ 
    714714  public BufferedImage openImage(int no) throws FormatException, IOException { 
    715715    if (no < 0 || no >= getImageCount()) { 
     
    737737    ifds = TiffTools.getIFDs(in); 
    738738    if (ifds == null) throw new FormatException("No IFDs found"); 
    739      
    740     status("Populating metadata");  
     739 
     740    status("Populating metadata"); 
    741741 
    742742    core.imageCount[0] = ifds.length; 
  • trunk/loci/formats/in/BioRadReader.java

    r2586 r2601  
    7575  // -- FormatReader API methods -- 
    7676 
    77   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     77  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    7878  public boolean isThisType(byte[] block) { 
    7979    if (block.length < 56) return false; 
     
    8181  } 
    8282 
    83   /* @see loci.formats.IFormatReader#openBytes(int) */  
     83  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    8484  public byte[] openBytes(int no) throws FormatException, IOException { 
    8585    byte[] buf = new byte[core.sizeX[0] * core.sizeY[0] * (byteFormat ? 1 : 2)]; 
     
    8888 
    8989  /* @see loci.formats.IFormatReader#openBytes(int, byte[]) */ 
    90   public byte[] openBytes(int no, byte[] buf)  
     90  public byte[] openBytes(int no, byte[] buf) 
    9191    throws FormatException, IOException 
    9292  { 
     
    104104  } 
    105105 
    106   /* @see loci.formats.IFormatReader#openImage(int) */  
     106  /* @see loci.formats.IFormatReader#openImage(int) */ 
    107107  public BufferedImage openImage(int no) throws FormatException, IOException { 
    108     BufferedImage b = ImageTools.makeImage(openBytes(no), core.sizeX[0],  
     108    BufferedImage b = ImageTools.makeImage(openBytes(no), core.sizeX[0], 
    109109      core.sizeY[0], 1, false, byteFormat ? 1 : 2, LITTLE_ENDIAN); 
    110110    return b; 
     
    583583    // populate Pixels element 
    584584    in.seek(14); 
    585     core.pixelType[0] = in.readShort() == 1 ? FormatTools.UINT8 :  
    586       FormatTools.UINT16;  
     585    core.pixelType[0] = in.readShort() == 1 ? FormatTools.UINT8 : 
     586      FormatTools.UINT16; 
    587587 
    588588    core.currentOrder[0] = "XY"; 
     
    600600    int[] orderedDims = new int[] {max, median, min}; 
    601601    for (int i=0; i<orderedDims.length; i++) { 
    602       if (orderedDims[i] == core.sizeZ[0] &&  
    603         core.currentOrder[0].indexOf("Z") == -1)  
     602      if (orderedDims[i] == core.sizeZ[0] && 
     603        core.currentOrder[0].indexOf("Z") == -1) 
    604604      { 
    605605        core.currentOrder[0] += "Z"; 
    606606      } 
    607       else if (orderedDims[i] == core.sizeC[0] &&  
    608         core.currentOrder[0].indexOf("C") == -1)  
     607      else if (orderedDims[i] == core.sizeC[0] && 
     608        core.currentOrder[0].indexOf("C") == -1) 
    609609      { 
    610610        core.currentOrder[0] += "C"; 
     
    638638      store.setLogicalChannel(i, null, null, null, null, null, null, null); 
    639639      String black = (String) getMeta("PMT " + i + " Black level"); 
     640      int bits = core.pixelType[0] == FormatTools.UINT8 ? 8 : 16; 
    640641      store.setDisplayChannel(new Integer(i), black == null ? null : 
    641         new Double(black), new Double(Math.pow(2,  
    642         core.pixelType[0] == FormatTools.UINT8 ? 8 : 16)), 
    643         null, null); 
     642        new Double(black), new Double(Math.pow(2, bits)), null, null); 
    644643    } 
    645644    String zoom = (String) getMeta("Zoom factor (user selected)"); 
     
    655654      core.sizeC[0] > 1 ? new Integer(1) : null, 
    656655      core.sizeC[0] > 1 ? new Integer(2) : null, new Integer(0)); 
    657      
     656 
    658657    for (int i=0; i<3; i++) { 
    659658      String prefix = "Transmission detector " + (i+1) + " - "; 
  • trunk/loci/formats/in/DeltavisionReader.java

    r2584 r2601  
    8282  // -- FormatReader API methods -- 
    8383 
    84   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     84  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    8585  public boolean isThisType(byte[] block) { 
    86     return (DataTools.bytesToShort(block, 0, 2, core.littleEndian[0]) ==  
     86    return (DataTools.bytesToShort(block, 0, 2, core.littleEndian[0]) == 
    8787      LITTLE_ENDIAN); 
    8888  } 
    8989 
    90   /* @see loci.formats.IFormatReader#openBytes(int) */  
     90  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    9191  public byte[] openBytes(int no) throws FormatException, IOException { 
    9292    byte[] buf = new byte[core.sizeX[0] * core.sizeY[0] * bytesPerPixel]; 
     
    111111  } 
    112112 
    113   /* @see loci.formats.IFormatReader#openImage(int) */  
     113  /* @see loci.formats.IFormatReader#openImage(int) */ 
    114114  public BufferedImage openImage(int no) 
    115115    throws FormatException, IOException 
    116116  { 
    117     return ImageTools.makeImage(openBytes(no), core.sizeX[0],  
     117    return ImageTools.makeImage(openBytes(no), core.sizeX[0], 
    118118      core.sizeY[0], 1, false, bytesPerPixel, core.littleEndian[0]); 
    119119  } 
     
    222222    addMeta("Wavelength 1 mean intensity", new Float(hstream.readFloat())); 
    223223    addMeta("Space group number", new Integer(hstream.readInt())); 
    224      
    225     hstream.seek(132);  
     224 
     225    hstream.seek(132); 
    226226    addMeta("Number of Sub-resolution sets", new Integer(hstream.readShort())); 
    227227    addMeta("Z axis reduction quotient", new Integer(hstream.readShort())); 
     
    267267    addMeta("Image Type", imageType); 
    268268    addMeta("Lens ID Number", new Integer(hstream.readShort())); 
    269      
    270     hstream.seek(172);  
     269 
     270    hstream.seek(172); 
    271271    Float wave5Min = new Float(hstream.readFloat()); 
    272272    addMeta("Wavelength 5 min. intensity", wave5Min); 
     
    309309    core.rgb[0] = false; 
    310310    core.interleaved[0] = false; 
    311      
     311 
    312312    addMeta("Wavelength 1 (in nm)", new Integer(hstream.readShort())); 
    313313    addMeta("Wavelength 2 (in nm)", new Integer(hstream.readShort())); 
     
    337337    numFloatsPerSection = hstream.readShort(); 
    338338    setOffsetInfo(sequence, core.sizeZ[0], core.sizeC[0], core.sizeT[0]); 
    339     extHdrFields =  
     339    extHdrFields = 
    340340      new DVExtHdrFields[core.sizeZ[0]][core.sizeC[0]][core.sizeT[0]]; 
    341341 
    342     store.setPixels(new Integer(core.sizeX[0]), new Integer(core.sizeY[0]),  
    343       new Integer(core.sizeZ[0]), new Integer(core.sizeC[0]),  
     342    store.setPixels(new Integer(core.sizeX[0]), new Integer(core.sizeY[0]), 
     343      new Integer(core.sizeZ[0]), new Integer(core.sizeC[0]), 
    344344      new Integer(core.sizeT[0]), new Integer(core.pixelType[0]), 
    345345      new Boolean(!core.littleEndian[0]), core.currentOrder[0], null, null); 
  • trunk/loci/formats/in/DicomReader.java

    r2584 r2601  
    9898  // -- FormatReader API methods -- 
    9999 
    100   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     100  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    101101  public boolean isThisType(byte[] block) { 
    102102    return false; 
    103103  } 
    104104 
    105   /* @see loci.formats.IFormatReader#openBytes(int) */  
     105  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    106106  public byte[] openBytes(int no) throws FormatException, IOException { 
    107107    byte[] buf = new byte[core.sizeX[0] * core.sizeY[0] * (bitsPerPixel / 8)]; 
     
    116116      throw new FormatException("Invalid image number: " + no); 
    117117    } 
    118      
    119     int bytes = core.sizeX[0] * core.sizeY[0] * (bitsPerPixel / 8);  
    120      
     118 
     119    int bytes = core.sizeX[0] * core.sizeY[0] * (bitsPerPixel / 8); 
     120 
    121121    if (buf.length < bytes) { 
    122122      throw new FormatException("Buffer too small."); 
     
    128128  } 
    129129 
    130   /* @see loci.formats.IFormatReader#openImage(int) */  
     130  /* @see loci.formats.IFormatReader#openImage(int) */ 
    131131  public BufferedImage openImage(int no) throws FormatException, IOException { 
    132132    return ImageTools.makeImage(openBytes(no), core.sizeX[0], core.sizeY[0], 
     
    329329    if (date != null && time != null) { 
    330330      stamp = date + " " + time; 
    331       SimpleDateFormat parse =  
     331      SimpleDateFormat parse = 
    332332        new SimpleDateFormat("yyyy.MM.dd HH:mm:ss.SSSSSS"); 
    333333      Date d = parse.parse(stamp, new ParsePosition(0)); 
     
    335335      stamp = fmt.format(d); 
    336336    } 
    337      
     337 
    338338    store.setImage( 
    339339      null, // name 
    340       stamp,  
     340      stamp, 
    341341      (String) getMeta("Image Type"), 
    342342      null); // Use index 0 
     
    470470        if (core.littleEndian[0]) { 
    471471          return (b[3] << 24) + (b[2] << 16) + (b[1] << 8) + b[0]; 
    472         }  
     472        } 
    473473        return (b[0] << 24) + (b[1] << 16) + (b[2] << 8) + b[3]; 
    474474      case AE: 
     
    502502        if (core.littleEndian[0]) { 
    503503          return (b[3] << 24) + (b[2] << 16) + (b[1] << 8) + b[0]; 
    504         }  
     504        } 
    505505        return (b[0] << 24) + (b[1] << 16) + (b[2] << 8) + b[3]; 
    506506    } 
  • trunk/loci/formats/in/EPSReader.java

    r2584 r2601  
    5858  // -- FormatReader API methods -- 
    5959 
    60   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     60  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    6161  public boolean isThisType(byte[] block) { 
    6262    return false; 
    6363  } 
    6464 
    65   /* @see loci.formats.IFormatRaeder#openBytes(int) */  
     65  /* @see loci.formats.IFormatRaeder#openBytes(int) */ 
    6666  public byte[] openBytes(int no) throws FormatException, IOException { 
    67     byte[] buf =  
     67    byte[] buf = 
    6868      new byte[core.sizeX[0] * core.sizeY[0] * core.sizeC[0] * (bps / 8)]; 
    6969    return openBytes(no, buf); 
     
    113113  } 
    114114 
    115   /* @see loci.formats.IFormatReader#openImage(int) */  
     115  /* @see loci.formats.IFormatReader#openImage(int) */ 
    116116  public BufferedImage openImage(int no) throws FormatException, IOException { 
    117117    return ImageTools.makeImage(openBytes(no), core.sizeX[0], core.sizeY[0], 
     
    130130    super.initFile(id); 
    131131    in = new RandomAccessStream(id); 
    132      
    133     status("Verifying EPS format");   
    134      
     132 
     133    status("Verifying EPS format"); 
     134 
    135135    String line = in.readLine(); 
    136136    if (!line.trim().startsWith("%!PS")) { 
     
    236236      new Integer(core.sizeT[0]), 
    237237      new Integer(core.pixelType[0]), 
    238       Boolean.FALSE,  
    239       core.currentOrder[0],  
     238      Boolean.FALSE, 
     239      core.currentOrder[0], 
    240240      null, 
    241241      null); 
  • trunk/loci/formats/in/FluoviewReader.java

    r2584 r2601  
    6969  // -- FormatReader API methods -- 
    7070 
    71   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     71  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    7272  public boolean isThisType(byte[] block) { 
    7373    if (!TiffTools.isValidHeader(block)) return false; 
     
    100100  // -- IFormatHandler API methods -- 
    101101 
    102   /* @see loci.formats.IFormatHandler#isThisType(String, boolean) */  
     102  /* @see loci.formats.IFormatHandler#isThisType(String, boolean) */ 
    103103  public boolean isThisType(String name, boolean open) { 
    104104    if (!super.isThisType(name, open)) return false; // check extension 
     
    238238        if (core.currentOrder[0].indexOf("Z") == -1) { 
    239239          core.currentOrder[0] += "Z"; 
    240         }  
     240        } 
    241241        if (voxel != null) voxelZ = voxel.floatValue(); 
    242242      } 
     
    245245        if (core.currentOrder[0].indexOf("C") == -1) { 
    246246          core.currentOrder[0] += "C"; 
    247         }  
     247        } 
    248248        if (voxel != null) voxelC = voxel.floatValue(); 
    249249      } 
     
    252252        if (core.currentOrder[0].indexOf("T") == -1) { 
    253253          core.currentOrder[0] += "T"; 
    254         }  
     254        } 
    255255        if (voxel != null) voxelT = voxel.floatValue(); 
    256256      } 
  • trunk/loci/formats/in/GIFReader.java

    r2584 r2601  
    132132  // -- FormatReader API methods -- 
    133133 
    134   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     134  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    135135  public boolean isThisType(byte[] block) { return false; } 
    136136 
    137   /* @see loci.formats.IFormatReader#openBytes(int) */  
     137  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    138138  public byte[] openBytes(int no) throws FormatException, IOException { 
    139139    byte[] buf = new byte[core.sizeX[0] * core.sizeY[0] * core.sizeC[0]]; 
     
    162162  } 
    163163 
    164   /* @see loci.formats.IFormatReader#openImage(int) */  
     164  /* @see loci.formats.IFormatReader#openImage(int) */ 
    165165  public BufferedImage openImage(int no) 
    166166    throws FormatException, IOException 
     
    215215      int i = 0; 
    216216      int j = 0; 
    217       int r, g, b;  
     217      int r, g, b; 
    218218      while (i < gctSize) { 
    219219        r = ((int) c[j++]) & 0xff; 
  • trunk/loci/formats/in/GatanReader.java

    r2584 r2601  
    6060  // -- FormatReader API methods -- 
    6161 
    62   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     62  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    6363  public boolean isThisType(byte[] block) { 
    6464    if (block == null) return false; 
     
    7070  } 
    7171 
    72   /* @see loci.formats.IFormatReader#openBytes(int) */  
     72  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    7373  public byte[] openBytes(int no) throws FormatException, IOException { 
    7474    byte[] buf = new byte[core.sizeX[0] * core.sizeY[0] * bytesPerPixel]; 
     
    9292  } 
    9393 
    94   /* @see loci.formats.IFormatReader#openImage(int) */  
     94  /* @see loci.formats.IFormatReader#openImage(int) */ 
    9595  public BufferedImage openImage(int no) throws FormatException, IOException { 
    9696    if (no < 0 || no >= getImageCount()) { 
     
    187187        core.pixelType[0] = FormatTools.INT32; 
    188188        break; 
    189       default: core.pixelType[0] = FormatTools.INT8;  
     189      default: 
     190        core.pixelType[0] = FormatTools.INT8; 
    190191    } 
    191192 
     
    282283              break; 
    283284            case 4: 
    284               data =  
     285              data = 
    285286                "" + DataTools.read2UnsignedBytes(in, core.littleEndian[0]); 
    286287              break; 
    287288            case 5: 
    288               data =  
     289              data = 
    289290                "" + DataTools.read4UnsignedBytes(in, core.littleEndian[0]); 
    290291              break; 
     
    367368                  byte[] two = new byte[2]; 
    368369                  in.read(two); 
    369                   data[j] = (int) DataTools.bytesToShort(two,  
     370                  data[j] = (int) DataTools.bytesToShort(two, 
    370371                    !core.littleEndian[0]); 
    371372                } 
     
    478479        in.skipBytes(2); 
    479480        in.read(temp); 
    480         parseTags(DataTools.bytesToInt(temp, !core.littleEndian[0]),  
     481        parseTags(DataTools.bytesToInt(temp, !core.littleEndian[0]), 
    481482          labelString); 
    482483      } 
  • trunk/loci/formats/in/GelReader.java

    r2584 r2601  
    5656  // -- FormatReader API methods -- 
    5757 
    58   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     58  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    5959  public boolean isThisType(byte[] block) { return false; } 
    6060 
  • trunk/loci/formats/in/ICSReader.java

    r2586 r2601  
    9090  // -- FormatReader API methods -- 
    9191 
    92   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     92  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    9393  public boolean isThisType(byte[] block) { 
    9494    return false; 
     
    142142  } 
    143143 
    144   /* @see loci.formats.IFormatReader#openImage(int) */  
     144  /* @see loci.formats.IFormatReader#openImage(int) */ 
    145145  public BufferedImage openImage(int no) throws FormatException, IOException { 
    146146    byte[] plane = openBytes(no); 
     
    159159      if (normalizeData) f = DataTools.normalizeFloats(f); 
    160160 
    161       return ImageTools.makeImage(f, core.sizeX[0], core.sizeY[0],  
     161      return ImageTools.makeImage(f, core.sizeX[0], core.sizeY[0], 
    162162        channels, true); 
    163163    } 
    164164 
    165     return ImageTools.makeImage(plane, core.sizeX[0], core.sizeY[0], channels,  
     165    return ImageTools.makeImage(plane, core.sizeX[0], core.sizeY[0], channels, 
    166166      true, bytes, core.littleEndian[0]); 
    167167  } 
     
    181181  } 
    182182 
    183   /* @see loci.formats.IFormatReader#close() */  
     183  /* @see loci.formats.IFormatReader#close() */ 
    184184  public void close() throws FormatException, IOException { 
    185     super.close();  
     185    super.close(); 
    186186    icsIn = null; 
    187187    currentIcsId = null; 
     
    295295    StringTokenizer t2 = new StringTokenizer(ord); 
    296296 
    297     core.rgb[0] =  
     297    core.rgb[0] = 
    298298      ord.indexOf("ch") >= 0 && ord.indexOf("ch") < ord.indexOf("x"); 
    299299 
     
    357357    // extra check is because some of our datasets are labeled as 'gzip', and 
    358358    // have a valid GZIP header, but are actually uncompressed 
    359     if (gzip && ((data.length / (core.imageCount[0]) <  
     359    if (gzip && ((data.length / (core.imageCount[0]) < 
    360360      (core.sizeX[0] * core.sizeY[0] * bitsPerPixel / 8)))) 
    361361    { 
    362       status("Decompressing pixel data");  
     362      status("Decompressing pixel data"); 
    363363      in.read(data); 
    364364      byte[] buf = new byte[8192]; 
  • trunk/loci/formats/in/IPLabReader.java

    r2584 r2601  
    5252  // -- FormatReader API methods -- 
    5353 
    54   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     54  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    5555  public boolean isThisType(byte[] block) { 
    5656    if (block.length < 12) return false; // block length too short 
     
    6666  } 
    6767 
    68   /* @see loci.formats.IFormatReader#openBytes(int) */  
     68  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    6969  public byte[] openBytes(int no) throws FormatException, IOException { 
    7070    byte[] buf = new byte[core.sizeX[0] * core.sizeY[0] * bps * core.sizeC[0]]; 
     
    7373 
    7474  /* @see loci.formats.IFormatReader#openBytes(int, byte[]) */ 
    75   public byte[] openBytes(int no, byte[] buf)  
     75  public byte[] openBytes(int no, byte[] buf) 
    7676    throws FormatException, IOException 
    7777  { 
     
    9090  } 
    9191 
    92   /* @see loci.formats.IFormatReader#openImage(int) */  
     92  /* @see loci.formats.IFormatReader#openImage(int) */ 
    9393  public BufferedImage openImage(int no) throws FormatException, IOException { 
    9494    return ImageTools.makeImage(openBytes(no), core.sizeX[0], core.sizeY[0], 
  • trunk/loci/formats/in/IPWReader.java

    r2586 r2601  
    7878  // -- FormatReader API methods -- 
    7979 
    80   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     80  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    8181  public boolean isThisType(byte[] block) { 
    8282    // all of our samples begin with 0xd0cf11e0 
     
    8585  } 
    8686 
    87   /* @see loci.formats.IFormatReader#openBytes(int) */  
     87  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    8888  public byte[] openBytes(int no) throws FormatException, IOException { 
    8989    int c = getRGBChannelCount(); 
     
    139139  } 
    140140 
    141   /* @see loci.formats.IFormatReader#openImage(int) */  
     141  /* @see loci.formats.IFormatReader#openImage(int) */ 
    142142  public BufferedImage openImage(int no) throws FormatException, IOException { 
    143143    if (no < 0 || no >= getImageCount()) { 
     
    157157  } 
    158158 
    159   /* @see loci.formats.IFormatReader#close() */  
     159  /* @see loci.formats.IFormatReader#close() */ 
    160160  public void close() throws FormatException, IOException { 
    161161    super.close(); 
     
    182182    Arrays.fill(core.orderCertain, true); 
    183183    getMetadataStore().createRoot(); 
    184      
     184 
    185185    in = new RandomAccessStream(id); 
    186186 
     
    193193      r.exec("dir = fs.getRoot()"); 
    194194      parseDir(0, r.getVar("dir")); 
    195       status("Populating metadata");  
     195      status("Populating metadata"); 
    196196      initMetadata(); 
    197197    } 
     
    204204  // -- Internal BaseTiffReader API methods -- 
    205205 
    206   /* @see BaseTiffReader#initMetadata() */  
     206  /* @see BaseTiffReader#initMetadata() */ 
    207207  public void initMetadata() throws FormatException, IOException { 
    208208    String directory = (String) pixels.get(new Integer(0)); 
     
    256256 
    257257    // parse the description to get channels/slices/times where applicable 
    258     // basically the same as in SEQReader  
     258    // basically the same as in SEQReader 
    259259    if (description != null) { 
    260260      StringTokenizer tokenizer = new StringTokenizer(description, "\n"); 
     
    358358    MetadataStore store = getMetadataStore(); 
    359359 
    360     store.setPixels(null, null, new Integer(core.sizeZ[0]),  
    361       new Integer(core.sizeC[0]), new Integer(core.sizeT[0]),  
    362       new Integer(core.pixelType[0]), new Boolean(!isLittleEndian()),  
     360    store.setPixels(null, null, new Integer(core.sizeZ[0]), 
     361      new Integer(core.sizeC[0]), new Integer(core.sizeT[0]), 
     362      new Integer(core.pixelType[0]), new Boolean(!isLittleEndian()), 
    363363      core.currentOrder[0], null, null); 
    364364    store.setImage(null, null, (String) getMeta("Version"), null); 
     
    387387      r.exec("dirName = dir.getName()"); 
    388388      if (isInstance)  { 
    389         status("Parsing embedded folder (" + (depth + 1) + ")");  
     389        status("Parsing embedded folder (" + (depth + 1) + ")"); 
    390390        parseDir(depth + 1, r.getVar("entry")); 
    391391      } 
  • trunk/loci/formats/in/ImageIOReader.java

    r2595 r2601  
    5252  // -- FormatReader API methods -- 
    5353 
    54   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     54  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    5555  public boolean isThisType(byte[] block) { return false; } 
    5656 
    57   /* @see loci.formats.IFormatReader#openBytes(int) */  
     57  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    5858  public byte[] openBytes(int no) 
    5959    throws FormatException, IOException 
     
    7272  } 
    7373 
    74   /* @see loci.formats.IFormatReader#openImage(int) */  
     74  /* @see loci.formats.IFormatReader#openImage(int) */ 
    7575  public BufferedImage openImage(int no) throws FormatException, IOException { 
    7676    if (no < 0 || no >= getImageCount()) { 
     
    9090  public void close(boolean fileOnly) throws FormatException, IOException { } 
    9191 
    92   /* @see loci.formats.IFormatReader#close() */  
     92  /* @see loci.formats.IFormatReader#close() */ 
    9393  public void close() throws FormatException, IOException { } 
    9494 
     
    126126      new Integer(core.sizeT[0]), 
    127127      new Integer(core.pixelType[0]), 
    128       new Boolean(!core.littleEndian[0]),  
    129       core.currentOrder[0],  
     128      new Boolean(!core.littleEndian[0]), 
     129      core.currentOrder[0], 
    130130      null, 
    131131      null); 
  • trunk/loci/formats/in/ImageJReader.java

    r2599 r2601  
    7575  // -- FormatReader API methods -- 
    7676 
    77   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     77  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    7878  public boolean isThisType(byte[] block) { return false; } 
    7979 
    80   /* @see loci.formats.IFormatReader#openBytes(int) */  
     80  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    8181  public byte[] openBytes(int no) throws FormatException, IOException { 
    8282    byte[] b = ImageTools.getBytes(openImage(no), false, no); 
     
    8484  } 
    8585 
    86   /* @see loci.formats.IFormatReader#openImage(int) */  
     86  /* @see loci.formats.IFormatReader#openImage(int) */ 
    8787  public BufferedImage openImage(int no) 
    8888    throws FormatException, IOException 
     
    128128  public void close(boolean fileOnly) throws FormatException, IOException { } 
    129129 
    130   /* @see loci.formats.IFormatReader#close() */  
     130  /* @see loci.formats.IFormatReader#close() */ 
    131131  public void close() throws FormatException, IOException { } 
    132132 
     
    164164      new Integer(core.sizeT[0]), 
    165165      new Integer(core.pixelType[0]), 
    166       new Boolean(!core.littleEndian[0]),  
    167       core.currentOrder[0],  
     166      new Boolean(!core.littleEndian[0]), 
     167      core.currentOrder[0], 
    168168      null, 
    169169      null); 
  • trunk/loci/formats/in/ImarisReader.java

    r2584 r2601  
    6363    super.initFile(id); 
    6464    in = new RandomAccessStream(id); 
    65      
    66     status("Verifying Imaris RAW format");  
    67      
     65 
     66    status("Verifying Imaris RAW format"); 
     67 
    6868    in.order(IS_LITTLE); 
    6969 
     
    112112    status("Calculating image offsets"); 
    113113 
    114     core.imageCount[0] = core.sizeZ[0] * core.sizeC[0];  
     114    core.imageCount[0] = core.sizeZ[0] * core.sizeC[0]; 
    115115    offsets = new int[core.imageCount[0]]; 
    116116 
    117117    for (int i=0; i<core.sizeC[0]; i++) { 
    118       int offset = 332 + ((i + 1) * 168) + (i * core.sizeX[0] *  
     118      int offset = 332 + ((i + 1) * 168) + (i * core.sizeX[0] * 
    119119        core.sizeY[0] * core.sizeZ[0]); 
    120120      for (int j=0; j<core.sizeZ[0]; j++) { 
    121         offsets[i*core.sizeZ[0] + j] =  
     121        offsets[i*core.sizeZ[0] + j] = 
    122122          offset + (j * core.sizeX[0] * core.sizeY[0]); 
    123123      } 
     
    171171  // -- IFormatReader API methods -- 
    172172 
    173   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     173  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    174174  public boolean isThisType(byte[] block) { 
    175175    return DataTools.bytesToInt(block, 0, 4, IS_LITTLE) == IMARIS_MAGIC_NUMBER; 
    176176  } 
    177177 
    178   /* @see loci.formats.IFormatReader#openBytes(int) */  
     178  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    179179  public byte[] openBytes(int no) throws FormatException, IOException { 
    180180    byte[] buf = new byte[core.sizeX[0] * core.sizeY[0]]; 
     
    202202  } 
    203203 
    204   /* @see loci.formats.IFormatReader#openImage(int) */  
     204  /* @see loci.formats.IFormatReader#openImage(int) */ 
    205205  public BufferedImage openImage(int no) throws FormatException, IOException { 
    206206    return ImageTools.makeImage(openBytes(no), core.sizeX[0], 
  • trunk/loci/formats/in/ImarisTiffReader.java

    r2586 r2601  
    4646  // -- FormatReader API methods -- 
    4747 
    48   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     48  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    4949  public boolean isThisType(byte[] block) { 
    5050    // adapted from MetamorphReader.isThisType(byte[]) 
     
    7979  // -- IFormatHandler API methods -- 
    8080 
    81   /* @see loci.formats.IFormatHandler#isThisType(String, boolean) */  
     81  /* @see loci.formats.IFormatHandler#isThisType(String, boolean) */ 
    8282  public boolean isThisType(String name, boolean open) { 
    8383    if (!super.isThisType(name, open)) return false; // check extension 
     
    138138    core.currentOrder[0] = "XYZCT"; 
    139139    core.interleaved[0] = false; 
    140     core.rgb[0] =  
     140    core.rgb[0] = 
    141141      core.imageCount[0] != core.sizeZ[0] * core.sizeC[0] * core.sizeT[0]; 
    142142 
     
    202202 
    203203    store.setPixels(new Integer(core.sizeX[0]), new Integer(core.sizeY[0]), 
    204       new Integer(core.sizeZ[0]), new Integer(core.sizeC[0]),  
    205       new Integer(core.sizeT[0]), new Integer(core.pixelType[0]), null,  
     204      new Integer(core.sizeZ[0]), new Integer(core.sizeC[0]), 
     205      new Integer(core.sizeT[0]), new Integer(core.pixelType[0]), null, 
    206206      core.currentOrder[0], null, null); 
    207207 
  • trunk/loci/formats/in/LIFReader.java

    r2586 r2601  
    4747  /** Extra dimensions. */ 
    4848  private int[] extraDimensions; 
    49    
     49 
    5050  /** Number of valid bits per pixel */ 
    5151  private int[][] validBits; 
     
    6767  // -- FormatReader API methods -- 
    6868 
    69   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     69  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    7070  public boolean isThisType(byte[] block) { 
    7171    return block[0] == 0x70; 
    7272  } 
    7373 
    74   /* @see loci.formats.IFormatReader#getSeriesCount() */  
     74  /* @see loci.formats.IFormatReader#getSeriesCount() */ 
    7575  public int getSeriesCount() throws FormatException, IOException { 
    7676    return core.sizeX.length; 
    7777  } 
    7878 
    79   /* @see loci.formats.IFormatReader#openBytes(int) */  
     79  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    8080  public byte[] openBytes(int no) throws FormatException, IOException { 
    8181    bpp = bitsPerPixel[series]; 
     
    9393      throw new FormatException("Invalid image number: " + no); 
    9494    } 
    95     bpp = bitsPerPixel[series];  
     95    bpp = bitsPerPixel[series]; 
    9696    while (bpp % 8 != 0) bpp++; 
    9797    int bytes = bpp / 8; 
    98     if (buf.length < core.sizeX[series] * core.sizeY[series] * bytes *  
    99       getRGBChannelCount())  
     98    if (buf.length < core.sizeX[series] * core.sizeY[series] * bytes * 
     99      getRGBChannelCount()) 
    100100    { 
    101101      throw new FormatException("Buffer too small."); 
     
    103103 
    104104    int offset = ((Long) offsets.get(series)).intValue(); 
    105     in.seek(offset + core.sizeX[series] * core.sizeY[series] *  
     105    in.seek(offset + core.sizeX[series] * core.sizeY[series] * 
    106106      bytes * no * getRGBChannelCount()); 
    107     
     107 
    108108    in.read(buf); 
    109109    return buf; 
    110110  } 
    111111 
    112   /* @see loci.formats.IFormatReader#openImage(int) */  
     112  /* @see loci.formats.IFormatReader#openImage(int) */ 
    113113  public BufferedImage openImage(int no) throws FormatException, IOException { 
    114114    return ImageTools.makeImage(openBytes(no), core.sizeX[series], 
     
    421421      core.sizeC[i] = ((Integer) channels.get(i)).intValue(); 
    422422      core.sizeT[i] = ((Integer) ts.get(i)).intValue(); 
    423       core.currentOrder[i] =  
     423      core.currentOrder[i] = 
    424424        (core.sizeZ[i] > core.sizeT[i]) ? "XYCZT" : "XYCTZ"; 
    425425 
     
    430430        if (core.sizeZ[i] == 1) core.sizeZ[i] = extraDimensions[i]; 
    431431        else core.sizeT[i] *= extraDimensions[i]; 
    432         extraDimensions[i] = 1;  
     432        extraDimensions[i] = 1; 
    433433      } 
    434434 
     
    486486      store.setDisplayOptions(zoom == null ? null : new Float(zoom), 
    487487        new Boolean(core.sizeC[i] > 1), new Boolean(core.sizeC[i] > 1), 
    488         new Boolean(core.sizeC[i] > 2), new Boolean(isRGB()), null,  
     488        new Boolean(core.sizeC[i] > 2), new Boolean(isRGB()), null, 
    489489        null, null, null, null, ii, null, null, null, null, null); 
    490490    } 
  • trunk/loci/formats/in/LegacyPictReader.java

    r2584 r2601  
    4747  // -- FormatReader API methods -- 
    4848 
    49   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     49  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    5050  public boolean isThisType(byte[] block) { 
    5151    return false; 
    5252  } 
    5353 
    54   /* @see loci.formats.IFormatReader#openBytes(int) */  
     54  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    5555  public byte[] openBytes(int no) throws FormatException, IOException { 
    5656    return ImageTools.getBytes(openImage(no), false, 3); 
    5757  } 
    5858 
    59   /* @see loci.formats.IFormatReader#openImage(int) */  
     59  /* @see loci.formats.IFormatReader#openImage(int) */ 
    6060  public BufferedImage openImage(int no) throws FormatException, IOException { 
    6161    if (no < 0 || no >= getImageCount()) { 
     
    8383    if (debug) debug("LegacyPictReader.initFile(" + id + ")"); 
    8484    super.initFile(id); 
    85     status("Populating metadata");  
     85    status("Populating metadata"); 
    8686    BufferedImage img = openImage(0); 
    8787    core.sizeX[0] = img.getWidth(); 
     
    9999    MetadataStore store = getMetadataStore(); 
    100100    store.setPixels(new Integer(core.sizeX[0]), new Integer(core.sizeY[0]), 
    101       new Integer(core.sizeZ[0]), new Integer(core.sizeC[0]),  
     101      new Integer(core.sizeZ[0]), new Integer(core.sizeC[0]), 
    102102      new Integer(core.sizeT[0]), new Integer(core.pixelType[0]), Boolean.TRUE, 
    103103      core.currentOrder[0], null, null); 
  • trunk/loci/formats/in/LegacyQTReader.java

    r2584 r2601  
    6868  // -- FormatReader API methods -- 
    6969 
    70   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     70  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    7171  public boolean isThisType(byte[] block) { return false; } 
    7272 
    73   /* @see loci.formats.IFormatReader#openBytes(int) */  
     73  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    7474  public byte[] openBytes(int no) throws FormatException, IOException { 
    7575    return ImageTools.getBytes(openImage(no), false, 3); 
    7676  } 
    7777 
    78   /* @see loci.formats.IFormatReader#openImage(int) */  
     78  /* @see loci.formats.IFormatReader#openImage(int) */ 
    7979  public BufferedImage openImage(int no) throws FormatException, IOException { 
    8080    if (no < 0 || no >= getImageCount()) { 
     
    114114  } 
    115115 
    116   /* @see loci.formats.IFormatReader#close() */  
     116  /* @see loci.formats.IFormatReader#close() */ 
    117117  public void close() throws FormatException, IOException { 
    118118    if (currentId == null) return; 
     
    133133  { 
    134134    if (debug) debug("LegacyQTReader.initFile(" + id + ")"); 
    135      
    136     status("Checking for QuickTime Java");  
    137      
     135 
     136    status("Checking for QuickTime Java"); 
     137 
    138138    if (tools == null) { 
    139139      tools = new LegacyQTTools(); 
     
    220220      MetadataStore store = getMetadataStore(); 
    221221      store.setPixels(new Integer(core.sizeX[0]), new Integer(core.sizeY[0]), 
    222         new Integer(core.sizeZ[0]), new Integer(core.sizeC[0]),  
    223         new Integer(core.sizeT[0]), new Integer(core.pixelType[0]),  
     222        new Integer(core.sizeZ[0]), new Integer(core.sizeC[0]), 
     223        new Integer(core.sizeT[0]), new Integer(core.pixelType[0]), 
    224224        Boolean.TRUE, core.currentOrder[0], null, null); 
    225225 
  • trunk/loci/formats/in/LegacyZVIReader.java

    r2584 r2601  
    8484  // -- FormatReader API methods -- 
    8585 
    86   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     86  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    8787  public boolean isThisType(byte[] block) { 
    8888    if (block == null) return false; 
     
    9494  } 
    9595 
    96   /* @see loci.formats.IFormatReader#openBytes(int) */  
     96  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    9797  public byte[] openBytes(int no) throws FormatException, IOException { 
    9898    byte[] buf = new byte[((ZVIBlock) blockList.elementAt(no)).imageSize]; 
     
    101101 
    102102  /* @see loci.formats.IFormatReader#openBytes(int, byte[]) */ 
    103   public byte[] openBytes(int no, byte[] buf)  
     103  public byte[] openBytes(int no, byte[] buf) 
    104104    throws FormatException, IOException 
    105105  { 
     
    113113  } 
    114114 
    115   /* @see loci.formats.IFormatReader#getImageCount() */  
     115  /* @see loci.formats.IFormatReader#getImageCount() */ 
    116116  public int getImageCount() throws FormatException, IOException { 
    117117    return blockList.size(); 
    118118  } 
    119119 
    120   /* @see loci.formats.IFormatReader#openImage(int) */  
     120  /* @see loci.formats.IFormatReader#openImage(int) */ 
    121121  public BufferedImage openImage(int no) throws FormatException, IOException { 
    122122    if (no < 0 || no >= getImageCount()) { 
     
    191191    while (true) { 
    192192      // search for start of next image header 
    193       status("Searching for next image");  
     193      status("Searching for next image"); 
    194194      long header = findBlock(in, ZVI_MAGIC_BLOCK_1, pos); 
    195195 
     
    351351      addMeta("BPP", new Integer(bytesPerPixel)); 
    352352 
    353       ZVIBlock zviBlock = new ZVIBlock(theZ, theC, theT, core.sizeX[0],  
     353      ZVIBlock zviBlock = new ZVIBlock(theZ, theC, theT, core.sizeX[0], 
    354354        core.sizeY[0], alwaysOne, bytesPerPixel, pixType, bitDepth, pos); 
    355355      if (debug) debug(zviBlock.toString()); 
  • trunk/loci/formats/in/LeicaReader.java

    r2590 r2601  
    7676  // -- FormatReader API methods -- 
    7777 
    78   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     78  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    7979  public boolean isThisType(byte[] block) { 
    8080    if (block.length < 4) return false; 
     
    110110      throw new FormatException("Invalid image number: " + no); 
    111111    } 
    112     int ndx = no % channelIndices.length;  
     112    int ndx = no % channelIndices.length; 
    113113    tiff[series][no].setId((String) files[series].get(no)); 
    114114    byte[] b = tiff[series][no].openBytes(0); 
    115     b = ImageTools.splitChannels(b, core.sizeC[series], false,  
    116       isInterleaved())[channelIndices[ndx]];  
     115    b = ImageTools.splitChannels(b, core.sizeC[series], false, 
     116      isInterleaved())[channelIndices[ndx]]; 
    117117    tiff[series][no].close(); 
    118118    return b; 
     
    120120 
    121121  /* @see loci.formats.IFormatReader#openBytes(int, byte[]) */ 
    122   public byte[] openBytes(int no, byte[] buf)  
     122  public byte[] openBytes(int no, byte[] buf) 
    123123    throws FormatException, IOException 
    124124  { 
     
    129129    tiff[series][no].openBytes(0, buf); 
    130130    tiff[series][no].close(); 
    131      
     131 
    132132    int ndx = no % channelIndices.length; 
    133     buf = ImageTools.splitChannels(buf, core.sizeC[series], false,  
     133    buf = ImageTools.splitChannels(buf, core.sizeC[series], false, 
    134134      isInterleaved())[channelIndices[ndx]]; 
    135135    return buf; 
    136136  } 
    137137 
    138   /* @see loci.formats.IFormatReader#openImage(int) */  
     138  /* @see loci.formats.IFormatReader#openImage(int) */ 
    139139  public BufferedImage openImage(int no) throws FormatException, IOException { 
    140140    if (no < 0 || no >= getImageCount()) { 
     
    181181  } 
    182182 
    183   /* @see loci.formats.IFormatReader#close() */  
     183  /* @see loci.formats.IFormatReader#close() */ 
    184184  public void close() throws FormatException, IOException { 
    185     super.close();  
     185    super.close(); 
    186186    leiFilename = null; 
    187187    files = null; 
     
    301301 
    302302      status("Reading metadata blocks"); 
    303   
     303 
    304304      in.skipBytes(8); 
    305305      int addr = in.readInt(); 
     
    358358        Vector f = new Vector(); 
    359359        byte[] tempData = (byte[]) headerIFDs[i].get(new Integer(15)); 
    360         int tempImages = DataTools.bytesToInt(tempData, 0, 4,  
     360        int tempImages = DataTools.bytesToInt(tempData, 0, 4, 
    361361          core.littleEndian[0]); 
    362362        String dirPrefix = 
     
    533533        for (int j=0; j<tiff[i].length; j++) { 
    534534          tiff[i][j] = new TiffReader(); 
    535           if (j > 0) tiff[i][j].setMetadataCollected(false);  
     535          if (j > 0) tiff[i][j].setMetadataCollected(false); 
    536536        } 
    537537      } 
     
    544544  // -- IFormatHandler API methods -- 
    545545 
    546   /* @see loci.formats.IFormatHandler#isThisType(String, boolean) */  
     546  /* @see loci.formats.IFormatHandler#isThisType(String, boolean) */ 
    547547  public boolean isThisType(String name, boolean open) { 
    548548    String lname = name.toLowerCase(); 
     
    759759            DataTools.bytesToInt(temp, pt, 4, core.littleEndian[0]))); 
    760760          pt += 4; 
     761          int dist = DataTools.bytesToInt(temp, pt, 4, core.littleEndian[0]); 
    761762          addMeta("Dim" + j + " distance between sub-dimensions", 
    762             new Integer(DataTools.bytesToInt(temp, pt, 4,  
    763             core.littleEndian[0]))); 
     763            new Integer(dist)); 
    764764          pt += 4; 
    765765 
     
    810810 
    811811        for (int j=0; j < nDims; j++) { 
    812           addMeta("Dimension " + j + " ID", 
    813             new Integer(DataTools.bytesToInt(temp, pt, 4,  
    814             core.littleEndian[0]))); 
    815           pt += 4; 
    816           addMeta("Dimension " + j + " size", 
    817             new Integer(DataTools.bytesToInt(temp, pt, 4, 
    818             core.littleEndian[0]))); 
    819           pt += 4; 
     812          int v = DataTools.bytesToInt(temp, pt, 4, core.littleEndian[0]); 
     813          addMeta("Dimension " + j + " ID", new Integer(v)); 
     814          pt += 4; 
     815          v = DataTools.bytesToInt(temp, pt, 4, core.littleEndian[0]); 
     816          addMeta("Dimension " + j + " size", new Integer(v)); 
     817          pt += 4; 
     818          v = DataTools.bytesToInt(temp, pt, 4, core.littleEndian[0]); 
    820819          addMeta("Dimension " + j + " distance between dimensions", 
    821             new Integer(DataTools.bytesToInt(temp, pt, 4, 
    822             core.littleEndian[0]))); 
     820            new Integer(v)); 
    823821          pt += 4; 
    824822        } 
     
    841839 
    842840          for (int k=0; k<numDims; k++) { 
     841            int v = DataTools.bytesToInt(temp, pt, 4, core.littleEndian[0]); 
    843842            addMeta("Time-marker " + j + 
    844               " Dimension " + k + " coordinate", 
    845               new Integer(DataTools.bytesToInt(temp, pt, 4, core.littleEndian[0]))); 
     843              " Dimension " + k + " coordinate", new Integer(v)); 
    846844            pt += 4; 
    847845          } 
     
    907905 
    908906        for (int j=0; j<nChannels; j++) { 
    909           addMeta("LUT Channel " + j + " version", 
    910             new Integer(DataTools.bytesToInt(temp, pt, 4,  
    911             core.littleEndian[0]))); 
     907          int v = DataTools.bytesToInt(temp, pt, 4, core.littleEndian[0]); 
     908          addMeta("LUT Channel " + j + " version", new Integer(v)); 
    912909          pt += 4; 
    913910 
     
    933930 
    934931          String name = DataTools.stripString(new String(temp, pt, length)); 
    935            
    936           if (name.equals("Red")) channelIndices[j] = 0;  
    937           else if (name.equals("Green")) channelIndices[j] = 1;  
    938           else if (name.equals("Blue")) channelIndices[j] = 2;  
    939           else if (name.equals("Gray")) channelIndices[j] = 0;  
    940           else if (name.equals("Yellow")) channelIndices[j] = 0;  
    941           else if (name.equals("Geo (L&S)")) channelIndices[j] = 0;  
    942            
     932 
     933          if (name.equals("Red")) channelIndices[j] = 0; 
     934          else if (name.equals("Green")) channelIndices[j] = 1; 
     935          else if (name.equals("Blue")) channelIndices[j] = 2; 
     936          else if (name.equals("Gray")) channelIndices[j] = 0; 
     937          else if (name.equals("Yellow")) channelIndices[j] = 0; 
     938          else if (name.equals("Geo (L&S)")) channelIndices[j] = 0; 
     939 
    943940          addMeta("LUT Channel " + j + " name", name); 
    944941          pt += length; 
     
    960957        for (int i=0; i<core.sizeC.length; i++) { 
    961958          setSeries(i); 
    962           core.sizeZ[i] /= core.sizeC[i];  
     959          core.sizeZ[i] /= core.sizeC[i]; 
    963960        } 
    964961        setSeries(oldSeries); 
     
    1002999      core.orderCertain[i] = true; 
    10031000      core.interleaved[i] = true; 
    1004       try {  
     1001      try { 
    10051002        in.seek(0); 
    10061003        in.read(f); 
     
    10101007      } 
    10111008      catch (Exception e) { 
    1012         if (debug) e.printStackTrace();  
    1013       }  
     1009        if (debug) e.printStackTrace(); 
     1010      } 
    10141011 
    10151012      if (core.sizeC[i] == 0) core.sizeC[i] = 1; 
     
    10401037      } 
    10411038 
    1042       core.rgb[i] =  
     1039      core.rgb[i] = 
    10431040        core.imageCount[i] != core.sizeC[i] * core.sizeZ[i] * core.sizeT[i]; 
    10441041 
     
    10601057 
    10611058      if (timestamp != null) { 
    1062         SimpleDateFormat parse =  
     1059        SimpleDateFormat parse = 
    10631060          new SimpleDateFormat("yyyy:MM:dd,HH:mm:ss:SSS"); 
    10641061        Date date = parse.parse(timestamp, new ParsePosition(0)); 
     
    10711068      for (int j=0; j<core.sizeC[0]; j++) { 
    10721069        store.setLogicalChannel(j, null, null, null, null, null, null, ii); 
    1073         // TODO : get channel min/max from metadata  
    1074         /*  
     1070        // TODO : get channel min/max from metadata 
     1071        /* 
    10751072        try { 
    10761073          store.setChannelGlobalMinMax(j, getChannelGlobalMinimum(currentId, j), 
     
    10831080          if (debug) exc.printStackTrace(); 
    10841081        } 
    1085         */  
     1082        */ 
    10861083      } 
    10871084 
  • trunk/loci/formats/in/MDBParser.java

    r2519 r2601  
    8989      // print out all data 
    9090 
    91       r.setVar("filename", filename);  
     91      r.setVar("filename", filename); 
    9292      r.exec("dbfile = new File(filename)"); 
    9393      r.exec("mdb = file.mdb_open(dbfile)"); 
  • trunk/loci/formats/in/MNGReader.java

    r2584 r2601  
    5252  // -- FormatReader API methods -- 
    5353 
    54   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     54  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    5555  public boolean isThisType(byte[] block) { 
    5656    if (block.length < 8) return false; 
     
    6060  } 
    6161 
    62   /* @see loci.formats.IFormatReader#openBytes(int) */  
     62  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    6363  public byte[] openBytes(int no) throws FormatException, IOException { 
    6464    return ImageTools.getBytes(openImage(no), true, core.sizeC[0]); 
    6565  } 
    6666 
    67   /* @see loci.formats.IFormatReader#openImage(int) */  
     67  /* @see loci.formats.IFormatReader#openImage(int) */ 
    6868  public BufferedImage openImage(int no) throws FormatException, IOException { 
    6969    if (no < 0 || no >= getImageCount()) { 
     
    181181    MetadataStore store = getMetadataStore(); 
    182182 
    183     store.setPixels(new Integer(core.sizeX[0]), new Integer(core.sizeY[0]),  
    184       new Integer(core.sizeZ[0]), new Integer(core.sizeC[0]),  
     183    store.setPixels(new Integer(core.sizeX[0]), new Integer(core.sizeY[0]), 
     184      new Integer(core.sizeZ[0]), new Integer(core.sizeC[0]), 
    185185      new Integer(core.sizeT[0]), new Integer(core.pixelType[0]), 
    186186      Boolean.TRUE, core.currentOrder[0], null, null); 
  • trunk/loci/formats/in/MRCReader.java

    r2584 r2601  
    5656  // -- IFormatReader API methods -- 
    5757 
    58   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     58  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    5959  public boolean isThisType(byte[] block) { 
    6060    return false; // no way to tell if this is an MRC file or not 
    6161  } 
    6262 
    63   /* @see loci.formats.IFormatReader#openBytes(int) */  
     63  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    6464  public byte[] openBytes(int no) throws FormatException, IOException { 
    6565    byte[] buf = new byte[core.sizeX[0] * core.sizeY[0] * bpp]; 
     
    8282  } 
    8383 
    84   /* @see loci.formats.IFormatReader#openImage(int) */  
     84  /* @see loci.formats.IFormatReader#openImage(int) */ 
    8585  public BufferedImage openImage(int no) throws FormatException, IOException { 
    8686    return ImageTools.makeImage(openBytes(no), core.sizeX[0], 
     
    110110 
    111111    in.seek(0); 
    112     in.order(core.littleEndian[0]);  
     112    in.order(core.littleEndian[0]); 
    113113 
    114114    core.sizeX[0] = in.readInt(); 
     
    282282    for (int i=0; i<core.sizeC[0]; i++) { 
    283283      store.setLogicalChannel(i, null, null, null, null, null, null, null); 
    284       // TODO : get channel min/max from metadata  
     284      // TODO : get channel min/max from metadata 
    285285      //store.setChannelGlobalMinMax(i, getChannelGlobalMinimum(id, i), 
    286286      //  getChannelGlobalMaximum(id, i), null); 
  • trunk/loci/formats/in/MetamorphReader.java

    r2584 r2601  
    7070  // -- FormatReader API methods -- 
    7171 
    72   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     72  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    7373  public boolean isThisType(byte[] block) { 
    7474    // If the file is a Metamorph STK file, it should have a specific IFD tag. 
     
    107107  // -- Internal BaseTiffReader API methods -- 
    108108 
    109   /* @see BaseTiffReader#initStandardMetadata() */  
     109  /* @see BaseTiffReader#initStandardMetadata() */ 
    110110  protected void initStandardMetadata() throws FormatException, IOException { 
    111111    super.initStandardMetadata(); 
  • trunk/loci/formats/in/MicromanagerReader.java

    r2584 r2601  
    8888  /* @see loci.formats.IFormatReader#close() */ 
    8989  public void close() throws FormatException, IOException { 
    90     super.close();  
     90    super.close(); 
    9191    if (tiffReader != null) tiffReader.close(); 
    9292    tiffReader = null; 
     
    110110 
    111111    Location parent = new Location(currentId).getAbsoluteFile().getParentFile(); 
    112     in = new RandomAccessStream(new Location(parent,  
     112    in = new RandomAccessStream(new Location(parent, 
    113113      METADATA).getAbsolutePath()); 
    114114 
     
    201201    for (int i=0; i<core.sizeC[0]; i++) { 
    202202      store.setLogicalChannel(i, null, null, null, null, null, null, null); 
    203       // TODO : retrieve min/max from the metadata  
     203      // TODO : retrieve min/max from the metadata 
    204204      //store.setChannelGlobalMinMax(i, getChannelGlobalMinimum(id, i), 
    205205      //  getChannelGlobalMaximum(id, i), null); 
  • trunk/loci/formats/in/ND2Reader.java

    r2584 r2601  
    125125  // -- FormatReader API methods -- 
    126126 
    127   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     127  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    128128  public boolean isThisType(byte[] block) { 
    129129    if (block.length < 8) return false; 
     
    132132  } 
    133133 
    134   /* @see loci.formats.IFormatReader#openBytes(int) */  
     134  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    135135  public byte[] openBytes(int no) throws FormatException, IOException { 
    136136    if (no < 0 || no >= getImageCount()) { 
     
    151151  } 
    152152 
    153   /* @see loci.formats.IFormatReader#openImage(int) */  
     153  /* @see loci.formats.IFormatReader#openImage(int) */ 
    154154  public BufferedImage openImage(int no) throws FormatException, IOException { 
    155155    if (no < 0 || no >= getImageCount()) { 
     
    220220  } 
    221221 
    222   /* @see loci.formats.IFormatReader#close() */  
     222  /* @see loci.formats.IFormatReader#close() */ 
    223223  public void close() throws FormatException, IOException { 
    224224    if (in != null) in.close(); 
     
    484484        if (core.sizeZ[0] < core.sizeT[0]) { 
    485485          core.sizeZ[0]--; 
    486           while (core.imageCount[0] >  
    487             core.sizeZ[0] * core.sizeT[0] * effectiveC)  
     486          while (core.imageCount[0] > 
     487            core.sizeZ[0] * core.sizeT[0] * effectiveC) 
    488488          { 
    489489            core.sizeT[0]++; 
    490490          } 
    491           while (core.imageCount[0] <  
    492             core.sizeZ[0] * core.sizeT[0] * effectiveC)  
     491          while (core.imageCount[0] < 
     492            core.sizeZ[0] * core.sizeT[0] * effectiveC) 
    493493          { 
    494494            core.sizeT[0]--; 
     
    497497        else { 
    498498          core.sizeT[0]--; 
    499           while (core.imageCount[0] >  
    500             core.sizeZ[0] * core.sizeT[0] * effectiveC)  
     499          while (core.imageCount[0] > 
     500            core.sizeZ[0] * core.sizeT[0] * effectiveC) 
    501501          { 
    502502            core.sizeZ[0]++; 
  • trunk/loci/formats/in/NikonReader.java

    r2584 r2601  
    120120  // -- FormatReader API methods -- 
    121121 
    122   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     122  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    123123  public boolean isThisType(byte[] block) { 
    124124    // adapted from MetamorphReader.isThisType(byte[]) 
     
    157157  // -- IFormatHandler API methods -- 
    158158 
    159   /* @see loci.formats.IFormatHandler#isThisType(String, boolean) */  
     159  /* @see loci.formats.IFormatHandler#isThisType(String, boolean) */ 
    160160  public boolean isThisType(String name, boolean open) { 
    161161    String lname = name.toLowerCase(); 
  • trunk/loci/formats/in/OIBReader.java

    r2597 r2601  
    124124  // -- FormatReader API methods -- 
    125125 
    126   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     126  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    127127  public boolean isThisType(byte[] block) { 
    128128    return (block[0] == 0xd0 && block[1] == 0xcf && 
     
    130130  } 
    131131 
    132   /* @see loci.formats.IFormatReader#openBytes(int) */  
     132  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    133133  public byte[] openBytes(int no) throws FormatException, IOException { 
    134134    byte[] buf = new byte[core.sizeX[series] * core.sizeY[series] * 
    135       getRGBChannelCount() *  
     135      getRGBChannelCount() * 
    136136      FormatTools.getBytesPerPixel(core.pixelType[series])]; 
    137137    return openBytes(no, buf); 
     
    174174  } 
    175175 
    176   /* @see loci.formats.IFormatReader#openImage(int) */  
     176  /* @see loci.formats.IFormatReader#openImage(int) */ 
    177177  public BufferedImage openImage(int no) throws FormatException, IOException { 
    178178    if (no < 0 || no >= getImageCount()) { 
     
    184184      getRGBChannelCount()); 
    185185 
    186     return ImageTools.makeImage(b, core.sizeX[series], core.sizeY[series],  
    187       getRGBChannelCount(), false, bytes, core.littleEndian[series],  
     186    return ImageTools.makeImage(b, core.sizeX[series], core.sizeY[series], 
     187      getRGBChannelCount(), false, bytes, core.littleEndian[series], 
    188188      validBits[series]); 
    189189  } 
     
    195195  } 
    196196 
    197   /* @see loci.formats.IFormatReader#close() */  
     197  /* @see loci.formats.IFormatReader#close() */ 
    198198  public void close() throws FormatException, IOException { 
    199199    super.close(); 
     
    329329        if (i < zSize.size()) { 
    330330          core.sizeZ[i] = ((Integer) zSize.get(i)).intValue(); 
    331         }  
     331        } 
    332332        else core.sizeZ[i] = 1; 
    333333 
     
    339339        if (i < tSize.size()) { 
    340340          core.sizeT[i] = ((Integer) tSize.get(i)).intValue(); 
    341         }  
     341        } 
    342342        else core.sizeT[i] = 1; 
    343343 
     
    345345        if (core.sizeT[i] == 0) core.sizeT[i]++; 
    346346 
    347         core.currentOrder[i] =  
     347        core.currentOrder[i] = 
    348348          (core.sizeZ[i] > core.sizeT[i]) ? "XYCZT" : "XYCTZ"; 
    349349 
     
    352352        if (core.imageCount[i] > core.sizeZ[i] * core.sizeT[i] * core.sizeC[i]) 
    353353        { 
    354           int diff = core.imageCount[i] -  
     354          int diff = core.imageCount[i] - 
    355355            (core.sizeZ[i] * core.sizeT[i] * core.sizeC[i]); 
    356356 
    357357          if (diff % core.sizeZ[i] == 0 && core.sizeZ[i] > 1) { 
    358             while (core.imageCount[i] >  
    359               core.sizeZ[i] * core.sizeT[i] * core.sizeC[i])  
     358            while (core.imageCount[i] > 
     359              core.sizeZ[i] * core.sizeT[i] * core.sizeC[i]) 
    360360            { 
    361361              core.sizeT[i]++; 
    362             }  
     362            } 
    363363          } 
    364364          else if (diff % core.sizeT[i] == 0 && core.sizeT[i] > 1) { 
    365             while (core.imageCount[i] >  
    366               core.sizeZ[i] * core.sizeT[i] * core.sizeC[i])  
     365            while (core.imageCount[i] > 
     366              core.sizeZ[i] * core.sizeT[i] * core.sizeC[i]) 
    367367            { 
    368368              core.sizeZ[i]++; 
    369             }  
     369            } 
    370370          } 
    371371          else if (diff % core.sizeC[i] == 0) { 
    372372            if (core.sizeZ[i] > core.sizeT[i]) { 
    373               while (core.imageCount[i] >  
     373              while (core.imageCount[i] > 
    374374                core.sizeZ[i] * core.sizeC[i] * core.sizeT[i]) 
    375375              { 
    376376                core.sizeZ[i]++; 
    377               }  
     377              } 
    378378            } 
    379379            else { 
    380               while (core.imageCount[i] >  
    381                 core.sizeZ[i] * core.sizeC[i] * core.sizeT[i])  
    382               {  
     380              while (core.imageCount[i] > 
     381                core.sizeZ[i] * core.sizeC[i] * core.sizeT[i]) 
     382              { 
    383383                core.sizeT[i]++; 
    384               }  
     384              } 
    385385            } 
    386386          } 
     
    389389        int oldSeries = getSeries(); 
    390390        setSeries(i); 
    391         while (core.imageCount[i] <  
    392           core.sizeZ[i] * core.sizeT[i] * getEffectiveSizeC())  
     391        while (core.imageCount[i] < 
     392          core.sizeZ[i] * core.sizeT[i] * getEffectiveSizeC()) 
    393393        { 
    394394          core.imageCount[i]++; 
     
    410410        } 
    411411        else validBits[i] = null; 
    412        
     412 
    413413        core.rgb[i] = ((Boolean) rgb.get(i)).booleanValue(); 
    414414        core.interleaved[i] = false; 
    415415      } 
    416      
     416 
    417417      Integer ii = new Integer(0); 
    418418      String directory = (String) ((Hashtable) pixels.get(series)).get(ii); 
     
    433433      RandomAccessStream stream = new RandomAccessStream(b); 
    434434      Hashtable[] ifds = TiffTools.getIFDs(stream); 
    435      
    436       Arrays.fill(core.littleEndian, !TiffTools.isLittleEndian(ifds[0]));  
     435 
     436      Arrays.fill(core.littleEndian, !TiffTools.isLittleEndian(ifds[0])); 
    437437    } 
    438438    catch (ReflectException e) { 
     
    476476 
    477477      String acquisition = "[Acquisition Parameters Common] - "; 
    478        
    479       String stamp = (String) getMeta(acquisition + "ImageCaputreDate");  
    480      
     478 
     479      String stamp = (String) getMeta(acquisition + "ImageCaputreDate"); 
     480 
    481481      if (stamp != null) { 
    482         stamp = stamp.substring(1, stamp.length() - 1);  
     482        stamp = stamp.substring(1, stamp.length() - 1); 
    483483        SimpleDateFormat parse = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 
    484484        Date date = parse.parse(stamp, new ParsePosition(0)); 
    485485        SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); 
    486486        stamp = fmt.format(date); 
    487       }  
     487      } 
    488488 
    489489      store.setImage(null, stamp, null, null); 
     
    504504      String x = (String) getMeta(pre + "WidthConvertValue"); 
    505505      String y = (String) getMeta(pre + "HeightConvertValue"); 
    506        
    507       store.setDimensions(x == null ? null : new Float(x),  
     506 
     507      store.setDimensions(x == null ? null : new Float(x), 
    508508        y == null ? null : new Float(y), null, null, null, new Integer(i)); 
    509509      for (int j=0; j<core.sizeC[0]; j++) { 
     
    553553      r.exec("dirName = dir.getName()"); 
    554554      if (isInstance)  { 
    555         status("Parsing embedded folder (" + (depth + 1) + ")");  
     555        status("Parsing embedded folder (" + (depth + 1) + ")"); 
    556556        parseDir(depth + 1, r.getVar("entry")); 
    557557      } 
  • trunk/loci/formats/in/OIFReader.java

    r2590 r2601  
    6565  // -- FormatReader API methods -- 
    6666 
    67   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     67  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    6868  public boolean isThisType(byte[] block) { 
    6969    return false; 
    7070  } 
    7171 
    72   /* @see loci.formats.IFormatReader#openBytes(int) */  
     72  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    7373  public byte[] openBytes(int no) throws FormatException, IOException { 
    7474    byte[] b = tiffReader[no].openBytes(0); 
     
    9090  } 
    9191 
    92   /* @see loci.formats.IFormatReader#openImage(int) */  
     92  /* @see loci.formats.IFormatReader#openImage(int) */ 
    9393  public BufferedImage openImage(int no) throws FormatException, IOException { 
    9494    if (no < 0 || no >= getImageCount()) { 
     
    104104  } 
    105105 
    106   /* @see loci.formats.IFormatReader#openThumbImage(int) */  
    107   public BufferedImage openThumbImage(int no)  
     106  /* @see loci.formats.IFormatReader#openThumbImage(int) */ 
     107  public BufferedImage openThumbImage(int no) 
    108108    throws FormatException, IOException 
    109109  { 
     
    112112    } 
    113113 
    114     String dir =  
     114    String dir = 
    115115      currentId.substring(0, currentId.lastIndexOf(File.separator) + 1); 
    116     dir += currentId.substring(currentId.lastIndexOf(File.separator) + 1) +  
     116    dir += currentId.substring(currentId.lastIndexOf(File.separator) + 1) + 
    117117      ".files" + File.separator; 
    118118 
    119119    String thumbId = dir + currentId.substring(currentId.lastIndexOf( 
    120120      File.separator) + 1, currentId.lastIndexOf(".")) + "_Thumb.bmp"; 
    121     thumbReader.setId(thumbId);  
     121    thumbReader.setId(thumbId); 
    122122    return thumbReader.openImage(0); 
    123123  } 
     
    152152  } 
    153153 
    154   /* @see loci.formats.IFormatReader#close() */  
     154  /* @see loci.formats.IFormatReader#close() */ 
    155155  public void close() throws FormatException, IOException { 
    156     super.close();  
     156    super.close(); 
    157157    if (thumbReader != null) thumbReader.close(); 
    158158    if (tiffReader != null) { 
     
    246246    for (int i=0; i<core.imageCount[0]; i++) { 
    247247      tiffReader[i] = new TiffReader(); 
    248       if (i > 0) tiffReader[i].setMetadataCollected(false);  
     248      if (i > 0) tiffReader[i].setMetadataCollected(false); 
    249249    } 
    250250 
     
    280280            value = value.substring(1, value.length() - 1); 
    281281            tiffs.add(i, tiffPath + File.separator + value); 
    282             tiffReader[i].setId((String) tiffs.get(i));  
     282            tiffReader[i].setId((String) tiffs.get(i)); 
    283283          } 
    284284          addMeta("Image " + i + " : " + key, value); 
     
    313313    if (core.sizeT[0] == 0) core.sizeT[0] = 1; 
    314314 
    315     while (core.imageCount[0] >  
    316       core.sizeZ[0] * core.sizeT[0] * getEffectiveSizeC())  
     315    while (core.imageCount[0] > 
     316      core.sizeZ[0] * core.sizeT[0] * getEffectiveSizeC()) 
    317317    { 
    318318      if (core.sizeZ[0] == 1) core.sizeT[0]++; 
     
    382382      new Integer(core.sizeT[0]), 
    383383      new Integer(core.pixelType[0]), 
    384       Boolean.FALSE,  
     384      Boolean.FALSE, 
    385385      "XYZTC", 
    386386      null, 
  • trunk/loci/formats/in/OMEXMLReader.java

    r2584 r2601  
    7676  // -- FormatReader API methods -- 
    7777 
    78   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     78  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    7979  public boolean isThisType(byte[] block) { 
    8080    return new String(block, 0, 5).equals("<?xml"); 
    8181  } 
    8282 
    83   /* @see loci.formats.IFormatReader#openBytes(int) */  
     83  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    8484  public byte[] openBytes(int no) throws FormatException, IOException { 
    8585    if (no < 0 || no >= core.imageCount[series]) { 
     
    147147  } 
    148148 
    149   /* @see loci.formats.IFormatReader#openImage(int) */  
     149  /* @see loci.formats.IFormatReader#openImage(int) */ 
    150150  public BufferedImage openImage(int no) throws FormatException, IOException { 
    151151    return ImageTools.makeImage(openBytes(no), core.sizeX[series], 
     
    346346    for (int i=0; i<numDatasets; i++) { 
    347347      setSeries(i); 
    348        
     348 
    349349      core.littleEndian[i] = ((Boolean) endianness.get(i)).booleanValue(); 
    350        
     350 
    351351      Integer ndx = new Integer(i); 
    352352      Integer w = null, h = null, t = null, z = null, c = null; 
     
    360360        c = (Integer) r.exec("omexml.getSizeC(ndx)"); 
    361361        pixType = (String) r.exec("omexml.getPixelType(ndx)"); 
    362         core.currentOrder[i] =  
     362        core.currentOrder[i] = 
    363363          (String) r.exec("omexml.getDimensionOrder(ndx)"); 
    364364      } 
  • trunk/loci/formats/in/OpenlabRawReader.java

    r2586 r2601  
    5656  // -- FormatReader API methods -- 
    5757 
    58   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     58  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    5959  public boolean isThisType(byte[] block) { 
    6060    return (block[0] == 'O') && (block[1] == 'L') && (block[2] == 'R') && 
     
    6262  } 
    6363 
    64   /* @see loci.formats.IFormatReader#openBytes(int) */  
     64  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    6565  public byte[] openBytes(int no) throws FormatException, IOException { 
    6666    byte[] buf = new byte[core.sizeX[0] * core.sizeY[0] * bytesPerPixel]; 
     
    9191  } 
    9292 
    93   /* @see loci.formats.IFormatReader#openImage(int) */  
     93  /* @see loci.formats.IFormatReader#openImage(int) */ 
    9494  public BufferedImage openImage(int no) throws FormatException, IOException { 
    95     return ImageTools.makeImage(openBytes(no), core.sizeX[0],  
     95    return ImageTools.makeImage(openBytes(no), core.sizeX[0], 
    9696      core.sizeY[0], core.sizeC[0], false, bytesPerPixel, false); 
    9797  } 
     
    103103  } 
    104104 
    105   /* @see loci.formats.IFormatReader#close() */  
     105  /* @see loci.formats.IFormatReader#close() */ 
    106106  public void close() throws FormatException, IOException { 
    107107    if (in != null) in.close(); 
     
    159159 
    160160    for (int i=1; i<core.imageCount[0]; i++) { 
    161       offsets[i] =  
     161      offsets[i] = 
    162162        offsets[i-1] + 288 + core.sizeX[0] * core.sizeY[0] * bytesPerPixel; 
    163163    } 
     
    198198      new Integer(core.sizeT[0]), 
    199199      new Integer(core.pixelType[0]), 
    200       Boolean.TRUE,  
    201       core.currentOrder[0],  
     200      Boolean.TRUE, 
     201      core.currentOrder[0], 
    202202      null, 
    203203      null); 
  • trunk/loci/formats/in/OpenlabReader.java

    r2586 r2601  
    7777  // -- FormatReader API methods -- 
    7878 
    79   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     79  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    8080  public boolean isThisType(byte[] block) { 
    8181    return block.length >= 8 && block[0] == 0 && block[1] == 0 && 
     
    8484  } 
    8585 
    86   /* @see loci.formats.IFormatReader#openBytes(int) */  
     86  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    8787  public byte[] openBytes(int no) throws FormatException, IOException { 
    8888    if (no < 0 || no >= getImageCount()) { 
     
    287287  } 
    288288 
    289   /* @see loci.formats.IFormatReader#openImage(int) */  
     289  /* @see loci.formats.IFormatReader#openImage(int) */ 
    290290  public BufferedImage openImage(int no) throws FormatException, IOException { 
    291291    if (no < 0 || no >= getImageCount()) { 
     
    310310  } 
    311311 
    312   /* @see loci.formats.IFormatReader#close() */  
     312  /* @see loci.formats.IFormatReader#close() */ 
    313313  public void close() throws FormatException, IOException { 
    314314    currentId = null; 
     
    668668        new Integer(core.pixelType[i]), 
    669669        new Boolean(!isLittleEndian()), 
    670         core.currentOrder[i],  
     670        core.currentOrder[i], 
    671671        new Integer(i), 
    672672        null); 
     
    682682  // -- IFormatHandler API methods -- 
    683683 
    684   /* @see loci.formats.IFormatHandler#isThisType(String, boolean) */  
     684  /* @see loci.formats.IFormatHandler#isThisType(String, boolean) */ 
    685685  public boolean isThisType(String name, boolean open) { 
    686686    if (super.isThisType(name, open)) return true; // check extension 
  • trunk/loci/formats/in/PerkinElmerReader.java

    r2590 r2601  
    6363  // -- FormatReader API methods -- 
    6464 
    65   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     65  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    6666  public boolean isThisType(byte[] block) { return false; } 
    6767 
    68   /* @see loci.formats.IFormatReader#openBytes(int) */  
     68  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    6969  public byte[] openBytes(int no) throws FormatException, IOException { 
    7070    if (isTiff) { 
     
    8181  } 
    8282 
    83   /* @see loci.formats.IFormatReader#openImage(int) */  
     83  /* @see loci.formats.IFormatReader#openImage(int) */ 
    8484  public BufferedImage openImage(int no) throws FormatException, IOException { 
    8585    if (no < 0 || no >= getImageCount()) { 
     
    115115  } 
    116116 
    117   /* @see loci.formats.IFormatReader#close() */  
     117  /* @see loci.formats.IFormatReader#close() */ 
    118118  public void close() throws FormatException, IOException { 
    119119    currentId = null; 
     
    333333    for (int i=0; i<tiff.length; i++) { 
    334334      tiff[i] = new TiffReader(); 
    335       if (i > 0) tiff[i].setMetadataCollected(false);  
    336       tiff[i].setId(files[i]);  
     335      if (i > 0) tiff[i].setMetadataCollected(false); 
     336      tiff[i].setId(files[i]); 
    337337    } 
    338338 
     
    552552    // populate Image element 
    553553    String time = (String) getMeta("Finish Time:"); 
    554     
     554 
    555555    SimpleDateFormat parse = new SimpleDateFormat("HH:mm:ss (MM/dd/yyyy)"); 
    556556    Date date = parse.parse(time, new ParsePosition(0)); 
  • trunk/loci/formats/in/PictReader.java

    r2586 r2601  
    113113  // -- FormatReader API methods -- 
    114114 
    115   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     115  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    116116  public boolean isThisType(byte[] block) { 
    117117    if (block.length < 528) return false; 
     
    119119  } 
    120120 
    121   /* @see loci.formats.IFormatReader#openBytes(int) */  
     121  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    122122  public byte[] openBytes(int no) throws FormatException, IOException { 
    123123    return ImageTools.getBytes(openImage(no), false, no % 3); 
    124124  } 
    125125 
    126   /* @see loci.formats.IFormatReader#openImage(int) */  
     126  /* @see loci.formats.IFormatReader#openImage(int) */ 
    127127  public BufferedImage openImage(int no) throws FormatException, IOException { 
    128128    if (no < 0 || no >= getImageCount()) { 
     
    139139  } 
    140140 
    141   /* @see loci.formats.IFormatReader#close() */  
     141  /* @see loci.formats.IFormatReader#close() */ 
    142142  public void close() throws FormatException, IOException { 
    143143    if (in != null) in.close(); 
     
    185185      new Integer(core.sizeX[0]), new Integer(core.sizeY[0]), 
    186186      new Integer(core.sizeZ[0]), new Integer(core.sizeC[0]), 
    187       new Integer(core.sizeT[0]), new Integer(core.pixelType[0]),  
     187      new Integer(core.sizeT[0]), new Integer(core.pixelType[0]), 
    188188      new Boolean(!core.littleEndian[0]), core.currentOrder[0], null, null); 
    189189    for (int i=0; i<core.sizeC[0]; i++) { 
     
    230230    // combine everything in the strips Vector 
    231231 
    232     if ((core.sizeY[0]*4 < strips.size()) && (((strips.size() / 3) %  
    233       core.sizeY[0]) != 0))  
     232    if ((core.sizeY[0]*4 < strips.size()) && (((strips.size() / 3) % 
     233      core.sizeY[0]) != 0)) 
    234234    { 
    235235      core.sizeY[0] = strips.size(); 
     
    267267 
    268268      if (debug) { 
    269         debug("openBytes: 8-bit data, " + core.sizeX[0] + " x " +  
     269        debug("openBytes: 8-bit data, " + core.sizeX[0] + " x " + 
    270270          core.sizeY[0] + ", length=" + data.length + "x" + data[0].length); 
    271271      } 
     
    288288 
    289289      if (debug) { 
    290         debug("openBytes: 24-bit data, " + core.sizeX[0] + " x " +  
     290        debug("openBytes: 24-bit data, " + core.sizeX[0] + " x " + 
    291291          core.sizeY[0] + ", length=" + data.length + "x" + data[0].length); 
    292292      } 
     
    311311 
    312312      if (debug) { 
    313         debug("openBytes: 32-bit data, " + core.sizeX[0] + " x " +  
     313        debug("openBytes: 32-bit data, " + core.sizeX[0] + " x " + 
    314314          core.sizeY[0] + ", length=" + data.length + "x" + data[0].length); 
    315315      } 
     
    339339 
    340340      if (debug) { 
    341         debug("openBytes: 16-bit data, " + core.sizeX[0] + " x " +  
     341        debug("openBytes: 16-bit data, " + core.sizeX[0] + " x " + 
    342342          core.sizeY[0] + ", length=" + data.length); 
    343343      } 
     
    358358        // skip over frame 
    359359        pt += 8; 
    360         int verOpcode =  
     360        int verOpcode = 
    361361          DataTools.bytesToInt(bytes, pt, 1, core.littleEndian[0]); 
    362362        pt++; 
    363         int verNumber =  
     363        int verNumber = 
    364364          DataTools.bytesToInt(bytes, pt, 1, core.littleEndian[0]); 
    365365        pt++; 
     
    368368        else if (verOpcode == 0x00 && verNumber == 0x11) { 
    369369          versionOne = false; 
    370           int verNumber2 =  
     370          int verNumber2 = 
    371371            DataTools.bytesToInt(bytes, pt, 2, core.littleEndian[0]); 
    372372          pt += 2; 
     
    615615        pt += 2; 
    616616        if ((flags & 0x8000) != 0) index = i; 
    617         lookup[0][index] =  
     617        lookup[0][index] = 
    618618          DataTools.bytesToShort(bytes, pt, 2, core.littleEndian[0]); 
    619619        pt += 2; 
    620         lookup[1][index] =  
     620        lookup[1][index] = 
    621621          DataTools.bytesToShort(bytes, pt, 2, core.littleEndian[0]); 
    622622        pt += 2; 
    623         lookup[2][index] =  
     623        lookup[2][index] = 
    624624          DataTools.bytesToShort(bytes, pt, 2, core.littleEndian[0]); 
    625625        pt += 2; 
  • trunk/loci/formats/in/PrairieReader.java

    r2586 r2601  
    6868  // -- IFormatHandler API methods -- 
    6969 
    70   /* @see loci.formats.IFormatHandler#isThisType(String, boolean) */  
     70  /* @see loci.formats.IFormatHandler#isThisType(String, boolean) */ 
    7171  public boolean isThisType(String name, boolean open) { 
    7272    if (!super.isThisType(name, open)) return false; // check extension 
     
    9191  // -- FormatReader API methods -- 
    9292 
    93   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     93  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    9494  public boolean isThisType(byte[] block) { 
    9595    // adapted from MetamorphReader.isThisType(byte[]) 
     
    139139      throw new FormatException("Invalid image number: " + no); 
    140140    } 
    141     tiff.setId(files[no]);  
     141    tiff.setId(files[no]); 
    142142    return tiff.openBytes(0); 
    143143  } 
     
    150150      throw new FormatException("Invalid image number: " + no); 
    151151    } 
    152     tiff.setId(files[no]);  
     152    tiff.setId(files[no]); 
    153153    tiff.openBytes(0, buf); 
    154154    return buf; 
     
    347347        String zoom = (String) getMeta("opticalZoom"); 
    348348        if (zoom != null) { 
    349           store.setDisplayOptions(new Float(zoom),  
    350             new Boolean(core.sizeC[0] > 1), new Boolean(core.sizeC[0] > 1),  
     349          store.setDisplayOptions(new Float(zoom), 
     350            new Boolean(core.sizeC[0] > 1), new Boolean(core.sizeC[0] > 1), 
    351351            new Boolean(core.sizeC[0] > 2), Boolean.FALSE, 
    352352            null, null, null, null, null, null, null, null, null, null, null); 
  • trunk/loci/formats/in/QTReader.java

    r2584 r2601  
    247247  // -- FormatReader API methods -- 
    248248 
    249   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     249  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    250250  public boolean isThisType(byte[] block) { 
    251251    return false; 
     
    258258  } 
    259259 
    260   /* @see loci.formats.IFormatReader#openBytes(int) */  
     260  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    261261  public byte[] openBytes(int no) throws FormatException, IOException { 
    262262    if (no < 0 || no >= getImageCount()) { 
     
    334334          for (int j=0; j<core.sizeY[0]; j++) { 
    335335            for (int k=0; k<b; k++) { 
    336               bytes[j*core.sizeX[0]*b + (core.sizeX[0] - i) + b] =  
    337                 tmp[i*core.sizeY[0]*b + j + b]; 
     336              int bndx = j * core.sizeX[0] * b + (core.sizeX[0] - i) + b; 
     337              int tndx = i * core.sizeY[0] * b + j + b; 
     338              bytes[bndx] = tmp[tndx]; 
    338339            } 
    339340          } 
     
    344345          for (int j=0; j<core.sizeX[0]; j++) { 
    345346            for (int k=0; k<core.sizeY[0]; k++) { 
    346               bytes[k*core.sizeX[0] +i*core.sizeX[0]*core.sizeY[0] +  
    347                (core.sizeX[0] - j - 1)] = tmp[j*core.sizeY[0] + k +  
    348                i*core.sizeX[0]*core.sizeY[0]]; 
     347              int q = i * core.sizeX[0] * core.sizeY[0]; 
     348              int bndx = k * core.sizeX[0] + q + (core.sizeX[0] - j - 1); 
     349              int tndx = j * core.sizeY[0] + k + q; 
     350              bytes[bndx] = tmp[tndx]; 
    349351            } 
    350352          } 
     
    361363    pad = (4 - pad) % 4; 
    362364 
    363     if (core.sizeX[0]*core.sizeY[0] * (bitsPerPixel / 8) == prevPixels.length) { 
    364       pad = 0; 
    365     } 
     365    int size = core.sizeX[0] * core.sizeY[0]; 
     366    if (size * (bitsPerPixel / 8) == prevPixels.length) pad = 0; 
    366367 
    367368    if (pad > 0 && !code.equals("rpza")) { 
    368       bytes = new byte[prevPixels.length - core.sizeY[0]*pad]; 
     369      bytes = new byte[prevPixels.length - core.sizeY[0] * pad]; 
    369370 
    370371      for (int row=0; row<core.sizeY[0]; row++) { 
    371         System.arraycopy(prevPixels, row*(core.sizeY[0]+pad), bytes, 
    372           row*core.sizeX[0], core.sizeX[0]); 
     372        System.arraycopy(prevPixels, row * (core.sizeY[0] + pad), bytes, 
     373          row * core.sizeX[0], core.sizeX[0]); 
    373374      } 
    374375    } 
     
    384385 
    385386        for (int j=0; j<cut; j++) { 
    386           redColumn[j] = prevPixels[(j+core.sizeY[0]-cut)*core.sizeX[0] + i]; 
    387           greenColumn[j] = prevPixels[(j+core.sizeY[0]-cut)*core.sizeX[0] + i +  
    388             core.sizeX[0]*core.sizeY[0]]; 
    389           blueColumn[j] = prevPixels[(j+core.sizeY[0]-cut)*core.sizeX[0] + i +  
    390             2*core.sizeX[0]*core.sizeY[0]]; 
     387          int ndx = (j + core.sizeY[0] - cut) * core.sizeX[0] + i; 
     388          redColumn[j] = prevPixels[ndx]; 
     389          greenColumn[j] = prevPixels[ndx + size]; 
     390          blueColumn[j] = prevPixels[ndx + 2 * size]; 
    391391        } 
    392392 
    393393        for (int j=cut; j<core.sizeY[0]; j++) { 
    394           redColumn[j] = prevPixels[j*core.sizeX[0] + i]; 
    395           greenColumn[j] =  
    396             prevPixels[j*core.sizeX[0] + i + core.sizeX[0]*core.sizeY[0]]; 
    397           blueColumn[j] =  
    398             prevPixels[j*core.sizeX[0] + i + 2*core.sizeX[0]*core.sizeY[0]]; 
     394          int ndx = j * core.sizeX[0] + i; 
     395          redColumn[j] = prevPixels[ndx]; 
     396          greenColumn[j] = prevPixels[ndx + size]; 
     397          blueColumn[j] = prevPixels[ndx + 2 * size]; 
    399398        } 
    400399 
     
    402401 
    403402        for (int j=0; j<core.sizeY[0]; j++) { 
    404           bytes[j*core.sizeX[0] + i] = redColumn[j]; 
    405           bytes[j*core.sizeX[0] + i + core.sizeX[0]*core.sizeY[0]] =  
    406             greenColumn[j]; 
    407           bytes[j*core.sizeX[0] + i + 2*core.sizeX[0]*core.sizeY[0]] =  
    408             blueColumn[j]; 
     403          int ndx = j * core.sizeX[0] + i; 
     404          bytes[ndx] = redColumn[j]; 
     405          bytes[ndx + size] = greenColumn[j]; 
     406          bytes[ndx + 2 * size] = blueColumn[j]; 
    409407        } 
    410408      } 
     
    413411    if (flip) { 
    414412      int t = core.sizeX[0]; 
    415       core.sizeX[0] = core.sizeY[0];  
     413      core.sizeX[0] = core.sizeY[0]; 
    416414      core.sizeY[0] = t; 
    417415    } 
     
    428426      byte[][] data = new byte[3][bytes.length / 4]; 
    429427      for (int i=0; i<data[0].length; i++) { 
    430         data[0][i] = bytes[4*i + 1]; 
    431         data[1][i] = bytes[4*i + 2]; 
    432         data[2][i] = bytes[4*i + 3]; 
     428        data[0][i] = bytes[4 * i + 1]; 
     429        data[1][i] = bytes[4 * i + 2]; 
     430        data[2][i] = bytes[4 * i + 3]; 
    433431      } 
    434432 
     
    444442  } 
    445443 
    446   /* @See loci.formats.IFormatReader#openImage(int) */  
     444  /* @See loci.formats.IFormatReader#openImage(int) */ 
    447445  public BufferedImage openImage(int no) throws FormatException, IOException { 
    448446    if (no < 0 || no >= getImageCount()) { 
     
    514512  } 
    515513 
    516   /* @see loci.formats.IFormatReader#close() */  
     514  /* @see loci.formats.IFormatReader#close() */ 
    517515  public void close() throws FormatException, IOException { 
    518     super.close();  
     516    super.close(); 
    519517    prevPixels = null; 
    520518  } 
     
    529527    offsets = new Vector(); 
    530528    chunkSizes = new Vector(); 
    531     status("Parsing tags");  
     529    status("Parsing tags"); 
    532530    parse(0, 0, in.length()); 
    533531    core.imageCount[0] = offsets.size(); 
     
    576574      new Integer(core.pixelType[0]), 
    577575      new Boolean(!core.littleEndian[0]), 
    578       core.currentOrder[0],  
     576      core.currentOrder[0], 
    579577      null, 
    580578      null); 
     
    681679 
    682680  /** Parse all of the atoms in the file. */ 
    683   public void parse(int depth, long offset, long length)  
    684     throws FormatException, IOException  
     681  public void parse(int depth, long offset, long length) 
     682    throws FormatException, IOException 
    685683  { 
    686684    while (offset < length) { 
     
    951949            for (int y=0; y<4; y++) { 
    952950              for (int x=0; x<4; x++) { 
    953                 if ((rowPtr + y)*core.sizeX[0] + pixelPtr + x < out.length) { 
    954                   out[(rowPtr + y)*core.sizeX[0] + pixelPtr + x] = colorA; 
    955                 } 
     951                int ondx = (rowPtr + y) * core.sizeX[0] + pixelPtr + x; 
     952                if (ondx < out.length) out[ondx] = colorA; 
    956953              } 
    957954            } 
     
    10051002              for (int x=0; x<4; x++) { 
    10061003                int idx = (ndx >> (2 * (3 - x))) & 0x03; 
    1007                 if ((rowPtr + y)*core.sizeX[0] + pixelPtr + x < out.length) { 
    1008                   out[(rowPtr + y)*core.sizeX[0] + pixelPtr + x] = colors[idx]; 
    1009                 } 
     1004                int ondx = (rowPtr + y) * core.sizeX[0] + pixelPtr + x; 
     1005                if (ondx < out.length) out[ondx] = colors[idx]; 
    10101006              } 
    10111007            } 
     
    10301026                pt += 2; 
    10311027              } 
    1032               if ((rowPtr + y)*core.sizeX[0] + pixelPtr + x < out.length) { 
    1033                 out[(rowPtr + y)*core.sizeX[0] + pixelPtr + x] = colorA; 
    1034               } 
     1028              int ondx = (rowPtr + y) * core.sizeX[0] + pixelPtr + x; 
     1029              if (ondx < out.length) out[ondx] = colorA; 
    10351030            } 
    10361031          } 
     
    10551050      rtn[i] = (byte) ((color >> 10) & 0x1f); 
    10561051      rtn[i + out.length] = (byte) ((color >> 5) & 0x1f); 
    1057       rtn[i + 2*out.length] = (byte) (color & 0x1f); 
     1052      rtn[i + 2 * out.length] = (byte) (color & 0x1f); 
    10581053    } 
    10591054    return rtn; 
     
    10611056 
    10621057  /** Uncompresses a MJPEG-B compressed image plane. */ 
    1063   public BufferedImage mjpbUncompress(byte[] input)  
     1058  public BufferedImage mjpbUncompress(byte[] input) 
    10641059    throws FormatException, IOException 
    10651060  { 
     
    10961091    // contains some interesting notes on why Apple chose to define this codec 
    10971092 
    1098     stream.skipBytes(4);  
     1093    stream.skipBytes(4); 
    10991094    if (stream.getFilePointer() >= stream.length()) stream.seek(0); 
    11001095 
     
    11041099    if (!hasID) { 
    11051100      hasID = stream.readChar() == 'm' && stream.readChar() == 'j' && 
    1106         stream.readChar() == 'p' && stream.readChar() == 'g';  
     1101        stream.readChar() == 'p' && stream.readChar() == 'g'; 
    11071102    } 
    11081103    stream.skipBytes(12); 
     
    11101105 
    11111106    // most MJPEG-B planes don't have this identifier 
    1112     if (hasID) {  
     1107    if (hasID) { 
    11131108      int extra = 16; 
    1114       stream.seek(stream.getFilePointer() - 16);  
     1109      stream.seek(stream.getFilePointer() - 16); 
    11151110      if (stream.readChar() == 'm') { 
    1116         stream.seek(4);  
     1111        stream.seek(4); 
    11171112        extra = 0; 
    11181113      } 
     
    11401135      // skip over the quantization table, if it exists 
    11411136      if (quantOffset != 0) { 
    1142         stream.seek(quantOffset);  
     1137        stream.seek(quantOffset); 
    11431138        int length = stream.readShort(); 
    11441139        stream.skipBytes(length - 2); 
     
    11471142      // skip over the Huffman table, if it exists 
    11481143      if (huffmanOffset != 0) { 
    1149         stream.seek(huffmanOffset);  
     1144        stream.seek(huffmanOffset); 
    11501145        int length = stream.readShort(); 
    1151         stream.skipBytes(length - 2);  
     1146        stream.skipBytes(length - 2); 
    11521147      } 
    11531148 
     
    11601155      int[] sampling = new int[channels]; 
    11611156      for (int i=0; i<channels; i++) { 
    1162         stream.read();  
    1163         sampling[i] = stream.read();  
     1157        stream.read(); 
     1158        sampling[i] = stream.read(); 
    11641159      } 
    11651160 
    11661161      // skip to scan header 
    1167       stream.seek(sos + 3);  
     1162      stream.seek(sos + 3); 
    11681163 
    11691164      int[] tables = new int[channels]; 
    11701165      for (int i=0; i<channels; i++) { 
    1171         stream.read();  
     1166        stream.read(); 
    11721167        tables[i] = stream.read(); 
    11731168      } 
    1174        
     1169 
    11751170      // now we can finally read this field's data 
    11761171      stream.seek(sod + 3); 
     
    12821277    v.add((byte) (length & 0xff)); 
    12831278 
    1284     int fieldHeight = core.sizeY[0];  
     1279    int fieldHeight = core.sizeY[0]; 
    12851280    if (interlaced) fieldHeight /= 2; 
    12861281    if (core.sizeY[0] % 2 == 1) fieldHeight++; 
     
    14711466 
    14721467      if (canUsePrevious) { 
    1473         for (int i=(start+numLines); i<core.sizeY[0]; i++) { 
     1468        for (int i=start+numLines; i<core.sizeY[0]; i++) { 
    14741469          int offset = i * core.sizeX[0] * ebpp; 
    14751470          System.arraycopy(prevPixels, offset, output, offset, 
     
    14931488      if (canUsePrevious) { 
    14941489        try { 
    1495           System.arraycopy(prevPixels, rowPointer, output, rowPointer, 
    1496             (skip-1) * ebpp); 
     1490          System.arraycopy(prevPixels, rowPointer, 
     1491            output, rowPointer, (skip - 1) * ebpp); 
    14971492        } 
    14981493        catch (ArrayIndexOutOfBoundsException e) { } 
    14991494      } 
    15001495 
    1501       off = rowPointer + ((skip-1) * ebpp); 
     1496      off = rowPointer + ((skip - 1) * ebpp); 
    15021497      pt++; 
    15031498      while (true) { 
     
    15101505          if (canUsePrevious) { 
    15111506            try { 
    1512               System.arraycopy(prevPixels, off, output, off, 
    1513                 (skip-1) * ebpp); 
     1507              System.arraycopy(prevPixels, off, 
     1508                output, off, (skip-1) * ebpp); 
    15141509            } 
    15151510            catch (ArrayIndexOutOfBoundsException e) { } 
     
    15311526        else if (rle < -1) { 
    15321527          // unpack next pixel and copy it to output -(rle) times 
    1533           for (int j=0; j<(-1*rle); j++) { 
     1528          for (int j=0; j<-rle; j++) { 
    15341529            if (off < output.length) { 
    15351530              System.arraycopy(input, pt, output, off, ebpp); 
    15361531              off += ebpp; 
    15371532            } 
    1538             else j = (-1*rle); 
     1533            else j = -rle; 
    15391534          } 
    15401535          pt += ebpp; 
     
    15421537        else { 
    15431538          // copy (rle) pixels to output 
    1544           System.arraycopy(input, pt, output, off, rle*ebpp); 
    1545           pt += rle*ebpp; 
    1546           off += rle*ebpp; 
     1539          System.arraycopy(input, pt, output, off, rle * ebpp); 
     1540          pt += rle * ebpp; 
     1541          off += rle * ebpp; 
    15471542        } 
    15481543      } 
  • trunk/loci/formats/in/SDTReader.java

    r2584 r2601  
    9393  // -- IFormatReader API methods -- 
    9494 
    95   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     95  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    9696  public boolean isThisType(byte[] block) { return false; } 
    9797 
     
    112112  } 
    113113 
    114   /* @see loci.formats.IFormatReader#isInterleaved(int) */  
    115   public boolean isInterleaved(int subC) throws FormatException, IOException 
    116   { 
     114  /* @see loci.formats.IFormatReader#isInterleaved(int) */ 
     115  public boolean isInterleaved(int subC) throws FormatException, IOException { 
    117116    return !intensity && subC == 0; 
    118117  } 
    119118 
    120   /* @see loci.formats.IFormatReader#openBytes(int) */  
     119  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    121120  public byte[] openBytes(int no) throws FormatException, IOException { 
    122121    int c = getRGBChannelCount(); 
     
    138137 
    139138    if (intensity) { 
    140       in.seek(off + 2 * core.sizeX[series] * core.sizeY[series] *  
     139      in.seek(off + 2 * core.sizeX[series] * core.sizeY[series] * 
    141140        timeBins * no); 
    142141      for (int y=0; y<core.sizeY[series]; y++) { 
     
    169168  } 
    170169 
    171   /* @see loci.formats.IFormatReader#openImage(int) */  
     170  /* @see loci.formats.IFormatReader#openImage(int) */ 
    172171  public BufferedImage openImage(int no) throws FormatException, IOException { 
    173     return ImageTools.makeImage(openBytes(no), core.sizeX[series],  
     172    return ImageTools.makeImage(openBytes(no), core.sizeX[series], 
    174173      core.sizeY[series], getRGBChannelCount(), false, 2, true); 
    175174  } 
  • trunk/loci/formats/in/SEQReader.java

    r2586 r2601  
    5353 
    5454  // -- Internal BaseTiffReader API methods -- 
    55   
     55 
    5656  /* @see BaseTiffReader#initStandardMetadata() */ 
    5757  protected void initStandardMetadata() throws FormatException, IOException { 
    5858    super.initStandardMetadata(); 
    5959 
    60     core.sizeZ[0] = 0;  
    61     core.sizeT[0] = 0;  
    62      
     60    core.sizeZ[0] = 0; 
     61    core.sizeT[0] = 0; 
     62 
    6363    for (int j=0; j<ifds.length; j++) { 
    6464      short[] tag1 = (short[]) TiffTools.getIFDValue(ifds[j], IMAGE_PRO_TAG_1); 
     
    7474      if (tag2 != -1) { 
    7575        // should be one of these for every image plane 
    76         core.sizeZ[0]++;  
     76        core.sizeZ[0]++; 
    7777        addMeta("Frame Rate", new Integer(tag2)); 
    7878      } 
     
    8181    } 
    8282 
    83     if (core.sizeZ[0] == 0) core.sizeZ[0] = 1;  
     83    if (core.sizeZ[0] == 0) core.sizeZ[0] = 1; 
    8484    if (core.sizeT[0] == 0) core.sizeT[0] = 1; 
    8585 
  • trunk/loci/formats/in/SlidebookReader.java

    r2584 r2601  
    5454  // -- FormatReader API methods -- 
    5555 
    56   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     56  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    5757  public boolean isThisType(byte[] block) { 
    5858    if (block.length < 8) return false; 
     
    6161  } 
    6262 
    63   /* @see loci.formats.IFormatReader#openBytes(int) */  
     63  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    6464  public byte[] openBytes(int no) throws FormatException, IOException { 
    6565    byte[] buf = new byte[core.sizeX[0] * core.sizeY[0] * 2]; 
     
    8282  } 
    8383 
    84   /* @see loci.formats.IFormatReader#openImage(int) */  
     84  /* @see loci.formats.IFormatReader#openImage(int) */ 
    8585  public BufferedImage openImage(int no) throws FormatException, IOException { 
    86     return ImageTools.makeImage(openBytes(no), core.sizeX[0],  
     86    return ImageTools.makeImage(openBytes(no), core.sizeX[0], 
    8787      core.sizeY[0], 1, true, bpp, true); 
    8888  } 
     
    119119    // determine the number of images 
    120120 
    121     status("Determining image count");  
     121    status("Determining image count"); 
    122122 
    123123    byte[] buf = new byte[8192]; 
     
    233233    MetadataStore store = getMetadataStore(); 
    234234    store.setPixels(new Integer(core.sizeX[0]), new Integer(core.sizeY[0]), 
    235       new Integer(core.sizeZ[0]), new Integer(core.sizeC[0]),  
    236       new Integer(core.sizeT[0]), new Integer(core.pixelType[0]),  
     235      new Integer(core.sizeZ[0]), new Integer(core.sizeC[0]), 
     236      new Integer(core.sizeT[0]), new Integer(core.pixelType[0]), 
    237237      new Boolean(!core.littleEndian[0]), core.currentOrder[0], null, null); 
    238238    for (int i=0; i<core.sizeC[0]; i++) { 
  • trunk/loci/formats/in/TiffReader.java

    r2586 r2601  
    6565  // -- Internal BaseTiffReader API methods -- 
    6666 
    67   /* @see BaseTiffReader#initStandardMetadata() */  
     67  /* @see BaseTiffReader#initStandardMetadata() */ 
    6868  protected void initStandardMetadata() throws FormatException, IOException { 
    6969    super.initStandardMetadata(); 
     
    118118      // but with SizeZ and SizeT equal to 1. 
    119119 
    120       String s =  
     120      String s = 
    121121        (String) TiffTools.getIFDValue(ifds[1], TiffTools.IMAGE_DESCRIPTION); 
    122122      boolean isWiscScan = s != null && s.indexOf("ome.xsd") != -1; 
     
    131131          throw new FormatException(exc); 
    132132        } 
    133          
     133 
    134134        core = new CoreMetadata(tiffData.length); 
    135135        Arrays.fill(core.orderCertain, true); 
     
    140140          core.sizeZ[i] = Integer.parseInt(pixels[i].getAttribute("SizeZ")); 
    141141          core.sizeC[i] = Integer.parseInt(pixels[i].getAttribute("SizeC")); 
    142           core.imageCount[i] = ifds.length;  
     142          core.imageCount[i] = ifds.length; 
    143143          int sc = core.sizeC[i]; 
    144144          if (rgb) sc /= 3; 
     
    184184            char d2nd = core.currentOrder[i].charAt(3); 
    185185            int z = firstZ, t = firstT, c = firstC; 
    186              
     186 
    187187            for (int k=0; k<numPlanes; k++) { 
    188188              zct[z][c][t] = true; 
     
    461461      metadata.remove("Comment"); 
    462462    } 
    463    
    464     // check for MetaMorph-style TIFF comment  
    465     boolean metamorph = comment != null && getMeta("Software") != null &&  
    466       ((String) getMeta("Software")).indexOf("MetaMorph") != -1;  
    467     put("MetaMorph", metamorph ? "yes" : "no");  
    468      
     463 
     464    // check for MetaMorph-style TIFF comment 
     465    boolean metamorph = comment != null && getMeta("Software") != null && 
     466      ((String) getMeta("Software")).indexOf("MetaMorph") != -1; 
     467    put("MetaMorph", metamorph ? "yes" : "no"); 
     468 
    469469    if (metamorph) { 
    470       // parse key/value pairs    
     470      // parse key/value pairs 
    471471      StringTokenizer st = new StringTokenizer(comment, "\n"); 
    472472      while (st.hasMoreTokens()) { 
     
    475475        if (colon < 0) { 
    476476          addMeta("Comment", line); 
    477           continue;  
    478         }  
     477          continue; 
     478        } 
    479479        String key = line.substring(0, colon); 
    480480        String value = line.substring(colon + 1); 
     
    484484  } 
    485485 
    486   /* @see BaseTiffReader#initMetadataStore() */  
     486  /* @see BaseTiffReader#initMetadataStore() */ 
    487487  protected void initMetadataStore() { 
    488488    // check for OME-XML in TIFF comment (OME-TIFF format) 
  • trunk/loci/formats/in/ZeissLSMReader.java

    r2584 r2601  
    5151  // -- FormatReader API methods -- 
    5252 
    53   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     53  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    5454  public boolean isThisType(byte[] block) { 
    5555    if (block.length < 3) return false; 
     
    7777  } 
    7878 
    79   /* @see loci.formats.IFormatReader#openThumbImage(int) */  
     79  /* @see loci.formats.IFormatReader#openThumbImage(int) */ 
    8080  public BufferedImage openThumbImage(int no) 
    8181    throws FormatException, IOException 
     
    8989  } 
    9090 
    91   /* @see loci.formats.IFormatReader#getThumbSizeX() */  
     91  /* @see loci.formats.IFormatReader#getThumbSizeX() */ 
    9292  public int getThumbSizeX() throws FormatException, IOException { 
    9393    if (ifds.length == 1) return super.getThumbSizeX(); 
     
    9595  } 
    9696 
    97   /* @see loci.formats.IFormatReader#getThumbSizeY() */  
     97  /* @see loci.formats.IFormatReader#getThumbSizeY() */ 
    9898  public int getThumbSizeY() throws FormatException, IOException { 
    9999    if (ifds.length == 1) return super.getThumbSizeY(); 
     
    101101  } 
    102102 
    103   /* @see loci.formats.IFormatReader#openImage(int) */  
     103  /* @see loci.formats.IFormatReader#openImage(int) */ 
    104104  public BufferedImage openImage(int no) throws FormatException, IOException { 
    105105    if (no < 0 || no >= getImageCount()) { 
     
    111111  } 
    112112 
    113   /* @see loci.formats.IFormatReader#openBytes(int) */  
     113  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    114114  public byte[] openBytes(int no) throws FormatException, IOException { 
    115115    if (no < 0 || no >= getImageCount()) { 
     
    117117    } 
    118118 
    119     byte[] b = new byte[core.sizeX[0] * core.sizeY[0] * core.sizeC[0] *  
    120       FormatTools.getBytesPerPixel(core.pixelType[0])];  
    121     return openBytes(no, b);    
     119    byte[] b = new byte[core.sizeX[0] * core.sizeY[0] * core.sizeC[0] * 
     120      FormatTools.getBytesPerPixel(core.pixelType[0])]; 
     121    return openBytes(no, b); 
    122122  } 
    123123 
     
    129129      throw new FormatException("Invalid image number: " + no); 
    130130    } 
    131   
     131 
    132132    int bpp = FormatTools.getBytesPerPixel(core.pixelType[0]); 
    133133 
     
    135135      throw new FormatException("Buffer too small."); 
    136136    } 
    137    
     137 
    138138    ifds = TiffTools.getIFDs(in); 
    139139    TiffTools.getSamples(ifds[2*no], in, buf); 
     
    217217  } 
    218218 
    219   /* @see BaseTiffReader#initMetadata() */  
     219  /* @see BaseTiffReader#initMetadata() */ 
    220220  protected void initMetadata() { 
    221221    Hashtable ifd = ifds[0]; 
     
    260260      } 
    261261 
    262       while (core.imageCount[0] > core.sizeZ[0] * core.sizeT[0] *  
    263         getEffectiveSizeC())  
     262      while (core.imageCount[0] > core.sizeZ[0] * core.sizeT[0] * 
     263        getEffectiveSizeC()) 
    264264      { 
    265265        core.imageCount[0]--; 
     
    584584      if (dirList[i].toLowerCase().endsWith(".mdb")) { 
    585585        try { 
    586           MDBParser.parseDatabase((new Location(dir.getPath(),  
     586          MDBParser.parseDatabase((new Location(dir.getPath(), 
    587587            dirList[i])).getAbsolutePath(), metadata); 
    588588        } 
  • trunk/loci/formats/in/ZeissZVIReader.java

    r2586 r2601  
    109109  // -- IFormatReader API methods -- 
    110110 
    111   /* @see loci.formats.IFormatReader#isThisType(byte[]) */  
     111  /* @see loci.formats.IFormatReader#isThisType(byte[]) */ 
    112112  public boolean isThisType(byte[] block) { 
    113113    // all of our samples begin with 0xd0cf11e0 
     
    122122  } 
    123123 
    124   /* @see loci.formats.IFormatReader#openBytes(int) */  
     124  /* @see loci.formats.IFormatReader#openBytes(int) */ 
    125125  public byte[] openBytes(int no) throws FormatException, IOException { 
    126     byte[] buf = new byte[core.sizeX[0] * core.sizeY[0] *  
     126    byte[] buf = new byte[core.sizeX[0] * core.sizeY[0] * 
    127127      FormatTools.getBytesPerPixel(core.pixelType[0]) * getRGBChannelCount()]; 
    128128    return openBytes(no, buf); 
     
    138138    } 
    139139 
    140     if (buf.length < core.sizeX[0] * core.sizeY[0] *  
     140    if (buf.length < core.sizeX[0] * core.sizeY[0] * 
    141141      FormatTools.getBytesPerPixel(core.pixelType[0]) * getRGBChannelCount()) 
    142     {  
     142    { 
    143143      throw new FormatException("Buffer too small."); 
    144144    } 
    145145 
    146146    try { 
    147       Integer ii = new Integer(no);  
     147      Integer ii = new Integer(no); 
    148148      Object directory = pixels.get(ii); 
    149149      String name = (String) names.get(ii); 
     
    179179  } 
    180180 
    181   /* @see loci.formats.IFormatReader#openImage(int) */  
    182   public BufferedImage openImage(int no) throws FormatException, IOException 
    183   { 
     181  /* @see loci.formats.IFormatReader#openImage(int) */ 
     182  public BufferedImage openImage(int no) throws FormatException, IOException { 
    184183    return ImageTools.makeImage(openBytes(no), core.sizeX[0], core.sizeY[0], 
    185       core.rgb[0] ? core.sizeC[0] : 1, true, bpp == 3 ? 1 : bpp, true,  
     184      core.rgb[0] ? core.sizeC[0] : 1, true, bpp == 3 ? 1 : bpp, true, 
    186185      validBits); 
    187186  } 
     
    196195  } 
    197196 
    198   /* @see loci.formats.IFormatReader#close() */  
     197  /* @see loci.formats.IFormatReader#close() */ 
    199198  public void close() throws FormatException, IOException { 
    200     super.close();  
     199    super.close(); 
    201200    needLegacy = false; 
    202201 
     
    217216    if (noPOI || needLegacy) { 
    218217      legacy.initFile(id); 
    219       core = legacy.getCoreMetadata();  
     218      core = legacy.getCoreMetadata(); 
    220219      return; 
    221220    } 
     
    247246      status("Populating metadata"); 
    248247 
    249       core.rgb[0] = core.sizeC[0] > 1 &&  
     248      core.rgb[0] = core.sizeC[0] > 1 && 
    250249        (core.sizeZ[0] * core.sizeC[0] * core.sizeT[0] != core.imageCount[0]); 
    251250      core.littleEndian[0] = true; 
     
    293292        } 
    294293 
    295         core.currentOrder[0] =  
     294        core.currentOrder[0] = 
    296295          "XY" + axes[maxNdx] + axes[medNdx] + axes[minNdx]; 
    297296 
     
    302301          if (z != core.sizeZ[0]) { 
    303302            if (core.sizeZ[0] != 1) { 
    304               core.currentOrder[0] =  
     303              core.currentOrder[0] = 
    305304                core.currentOrder[0].replaceAll("Z", "") + "Z"; 
    306305            } 
    307306            else { 
    308               core.currentOrder[0] =  
     307              core.currentOrder[0] = 
    309308                core.currentOrder[0].replaceAll("T", "") + "T"; 
    310             }  
     309            } 
    311310          } 
    312311        } 
     
    317316      } 
    318317      else if (getMeta("MultiChannel Color") != null) { 
    319         core.currentOrder[0] =  
     318        core.currentOrder[0] = 
    320319          (core.sizeZ[0] > core.sizeT[0]) ? "XYCZT" : "XYCTZ"; 
    321320      } 
    322321      else { 
    323         core.currentOrder[0] =  
     322        core.currentOrder[0] = 
    324323          (core.sizeZ[0] > core.sizeT[0]) ? "XYZTC" : "XYTZC"; 
    325       }  
     324      } 
    326325    } 
    327326    catch (ReflectException e) { 
     
    360359      new Integer(core.sizeT[0]), 
    361360      new Integer(core.pixelType[0]), 
    362       Boolean.FALSE,  
    363       core.currentOrder[0],  
     361      Boolean.FALSE, 
     362      core.currentOrder[0], 
    364363      null, 
    365364      null); 
     
    398397 
    399398      if (isInstance)  { 
    400         status("Parsing embedded folder (" + (depth + 1) + ")");  
     399        status("Parsing embedded folder (" + (depth + 1) + ")"); 
    401400        parseDir(depth + 1, r.getVar("entry")); 
    402401      } 
     
    652651          if (core.sizeX[0] == 0 || (tw < core.sizeX[0] && tw > 0)) { 
    653652            core.sizeX[0] = tw; 
    654           }  
     653          } 
    655654          pt += 6; 
    656655          int th = DataTools.bytesToInt(data, pt, 4, true); 
    657656          if (core.sizeY[0] == 0 || (th < core.sizeY[0] && th > 0)) { 
    658657            core.sizeY[0] = th; 
    659           }  
     658          } 
    660659          pt += 6; 
    661660 
     
    704703          pt = oldPt + 4 + len; 
    705704 
    706           boolean foundWidth =  
     705          boolean foundWidth = 
    707706            DataTools.bytesToInt(data, pt, 4, true) == core.sizeX[0]; 
    708707          boolean foundHeight = 
     
    711710          while ((!foundWidth || !foundHeight) && pt + 9 < data.length) { 
    712711            pt++; 
    713             foundWidth =  
     712            foundWidth = 
    714713              DataTools.bytesToInt(data, pt, 4, true) == core.sizeX[0]; 
    715714            foundHeight = 
     
    778777    core.imageCount[0]++; 
    779778    if (bpp % 3 == 0) core.sizeC[0] = 3; 
    780     else core.sizeC[0] = 1;  
     779    else core.sizeC[0] = 1; 
    781780  } 
    782781 
  • trunk/loci/formats/ome/OmeisImporter.java

    r2583 r2601  
    101101      if (ids[i] == null) continue; // invalid id 
    102102      if (!reader.isThisType(ids[i])) continue; // unknown format 
    103       reader.setId(ids[i]);  
     103      reader.setId(ids[i]); 
    104104      String[] files = reader.getUsedFiles(); 
    105105      if (files == null) continue; // invalid files list 
     
    153153 
    154154    // verify that all given file IDs were grouped by the reader 
    155     reader.setId(id);  
     155    reader.setId(id); 
    156156    String[] used = reader.getUsedFiles(); 
    157157    if (used == null) { 
  • trunk/loci/formats/out/AVIWriter.java

    r2569 r2601  
    174174        DataTools.writeInt(raFile, 0, true); // dwReserved1 - set to 0 
    175175        // dwFlags - just set the bit for AVIF_HASINDEX 
    176         savePlaneNum = (int) raFile.getFilePointer();  
    177         DataTools.writeInt(raFile, 0x10, true);  
     176        savePlaneNum = (int) raFile.getFilePointer(); 
     177        DataTools.writeInt(raFile, 0x10, true); 
    178178 
    179179        // 10H AVIF_HASINDEX: The AVI file has an idx1 chunk containing 
     
    383383        text[3] = 101; // e 
    384384        text[4] = 65; // A 
    385         text[5] = 86; // V  
    386         text[6] = 73; // I  
     385        text[5] = 86; // V 
     386        text[6] = 73; // I 
    387387        text[7] = 32; // space 
    388388        text[8] = 119; // w 
  • trunk/loci/formats/out/QTWriter.java

    r2574 r2601  
    150150  // -- IFormatWriter API methods -- 
    151151 
    152   /* @see loci.formats.IFormatWriter#saveImage(String, Image, boolean) */  
     152  /* @see loci.formats.IFormatWriter#saveImage(String, Image, boolean) */ 
    153153  public void saveImage(String id, Image image, boolean last) 
    154154    throws FormatException, IOException 
  • trunk/loci/formats/out/TiffWriter.java

    r2569 r2601  
    107107  // -- IFormatWriter API methods -- 
    108108 
    109   /* @see loci.formats.IFormatWriter#save(String, Image, boolean) */  
     109  /* @see loci.formats.IFormatWriter#save(String, Image, boolean) */ 
    110110  public void saveImage(String id, Image image, boolean last) 
    111111    throws FormatException, IOException 
     
    120120  /* @see loci.formats.IFormatWriter#close() */ 
    121121  public void close() throws FormatException, IOException { 
    122     // write the metadata, if enabled  
    123    
     122    // write the metadata, if enabled 
     123 
    124124    /* 
    125125    if (metadataEnabled && store != null && currentId != null) { 
    126126      // TODO : use reflection to access the OMEXMLMetadataStore 
    127127      if (store instanceof OMEXMLMetadataStore) { 
    128         try {  
    129           // writes valid OME-TIFF  
    130           RandomAccessFile raf = new RandomAccessFile(currentId, "rw");  
     128        try { 
     129          // writes valid OME-TIFF 
     130          RandomAccessFile raf = new RandomAccessFile(currentId, "rw"); 
    131131          RandomAccessStream in = new RandomAccessStream(currentId); 
    132132          OMENode xml = (OMENode) ((OMEXMLMetadataStore) store).getRoot(); 
    133133          Vector images = xml.getChildNodes("Image"); 
    134134          for (int p=0; p<images.size(); p++) { 
    135             PixelsNode pix =  
     135            PixelsNode pix = 
    136136              (PixelsNode) ((ImageNode) images.get(p)).getDefaultPixels(); 
    137137            DOMUtil.createChild(pix.getDOMElement(), "TiffData"); 
    138138          } 
    139          
    140           Hashtable[] ifds = TiffTools.getIFDs(in);   
     139 
     140          Hashtable[] ifds = TiffTools.getIFDs(in); 
    141141          TiffTools.overwriteIFDValue(raf, 0, TiffTools.IMAGE_DESCRIPTION, 
    142142            xml.writeOME(true)); 
     
    147147      } 
    148148      else { 
    149         throw new FormatException("Expecting an OMEXMLMetadataStore; got a " +  
     149        throw new FormatException("Expecting an OMEXMLMetadataStore; got a " + 
    150150          store.getClass()); 
    151       }  
     151      } 
    152152    } 
    153     */  
     153    */ 
    154154 
    155155    if (out != null) out.close(); 
  • trunk/loci/formats/test/ReaderTest.java

    r2583 r2601  
    213213      int planesRead = 0; 
    214214      reader.setId(id); 
    215        
     215 
    216216      for (int i=0; i<reader.getSeriesCount(); i++) { 
    217217        reader.setSeries(i); 
     
    377377  public void testConsistent() { 
    378378    boolean success = true; 
    379     try {  
     379    try { 
    380380      reader.setId(id); 
    381381    } 
    382382    catch (Exception e) { 
    383383      writeLog(id + " failed consistent metadata test"); 
    384       if (FormatReader.debug) e.printStackTrace();  
     384      if (FormatReader.debug) e.printStackTrace(); 
    385385      assertTrue(false); 
    386386    } 
    387       
     387 
    388388    if (writeConfigFiles) { 
    389389      try { 
     
    585585 
    586586      FileStitcher fs = new FileStitcher(); 
    587        
     587 
    588588      for (int i=0; i<base.length; i++) { 
    589         fs.setId(base[i]);  
     589        fs.setId(base[i]); 
    590590        String[] comp = fs.getUsedFiles(); 
    591591        Arrays.sort(comp); 
Note: See TracChangeset for help on using the changeset viewer.