Changeset 4887


Ignore:
Timestamp:
03/03/09 15:35:24 (11 years ago)
Author:
melissa
Message:

Override getUsedFiles() to return both the image and header file names.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/bio-formats/src/loci/formats/in/AnalyzeReader.java

    r4886 r4887  
    4949  private RandomAccessStream pixelFile; 
    5050 
     51  private String pixelsFilename; 
     52 
    5153  // -- Constructor -- 
    5254 
     
    8082 
    8183    return buf; 
     84  } 
     85 
     86  /* @see loci.formats.IFormatReader#getUsedFiles() */ 
     87  public String[] getUsedFiles() { 
     88    FormatTools.assertId(currentId, true, 1); 
     89    String[] s = new String[2]; 
     90    s[0] = currentId; 
     91    s[1] = pixelsFilename; 
     92    return s; 
     93  } 
     94 
     95  /* @see loci.formats.IFormatReader#fileGroupOption(String) */ 
     96  public int fileGroupOption(String id) throws FormatException, IOException { 
     97    return FormatTools.MUST_GROUP; 
    8298  } 
    8399 
     
    111127    super.initFile(id); 
    112128    in = new RandomAccessStream(id); 
    113     pixelFile = new RandomAccessStream(id.replaceAll(".hdr", ".img")); 
     129    pixelsFilename = id.substring(0, id.lastIndexOf(".")) + ".img"; 
     130    pixelFile = new RandomAccessStream(pixelsFilename); 
    114131 
    115132    status("Reading header"); 
Note: See TracChangeset for help on using the changeset viewer.