Changeset 2329


Ignore:
Timestamp:
02/23/07 16:08:22 (13 years ago)
Author:
curtis
Message:

Fix bugs when reading raw OME-XML metadata files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/ome/notebook/MetadataPane.java

    r2328 r2329  
    869869          in = new DataInputStream(new FileInputStream(file)); 
    870870          byte[] data = new byte[(int) file.length()]; 
    871           System.arraycopy(header, 0, data, 0, 8); 
    872           in.readFully(data, 8, data.length - 8); 
     871          in.readFully(data); 
    873872          in.close(); 
    874873          setOMEXML(new String(data)); 
     
    19281927            pixNum = Integer.parseInt(pixNumString); 
    19291928            int indexNum = pixNum - minPixNum; 
    1930             tableThumb = thumbs[indexNum]; 
    1931             tableImage = images[indexNum]; 
     1929            tableThumb = thumbs == null ? null : thumbs[indexNum]; 
     1930            tableImage = images == null ? null : images[indexNum]; 
    19321931          } 
    19331932          catch (java.lang.NumberFormatException exc) { 
     
    19371936            tableImage = img; 
    19381937          } 
    1939           imageLabel = new JLabel(new ImageIcon(tableThumb)); 
     1938          imageLabel = tableThumb == null ? new JLabel() : 
     1939            new JLabel(new ImageIcon(tableThumb)); 
    19401940          imageLabel.setToolTipText("The middle image of these pixels." + 
    19411941            " Click for full sized image."); 
Note: See TracChangeset for help on using the changeset viewer.