Changeset 2292


Ignore:
Timestamp:
02/16/07 15:08:25 (13 years ago)
Author:
melissa
Message:

Fixed channel min/max for multi-series formats; added a note about new min/max
methods to "getting started" file.

Location:
trunk/loci/formats
Files:
11 edited

Legend:

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

    r2291 r2292  
    124124  protected boolean[] minMaxFinished; 
    125125 
    126   /**  
    127    * Flag indicating min/max values are stored in  
    128    * metadata (disables calculation).  
    129    */ 
    130   protected boolean metadataMinMax = false; 
    131  
    132126  /** Whether or not to ignore color tables, if present. */ 
    133127  protected boolean ignoreColorTable = false; 
     
    180174    Arrays.fill(maximumValues, new Vector()); 
    181175    minMaxFinished = new boolean[1]; 
     176    Arrays.fill(minMaxFinished, false); 
    182177 
    183178    sizeX = new int[1]; 
  • trunk/loci/formats/getting-started.txt

    r2221 r2292  
    4646  the given file name (i.e. every file needed to display the current dataset). 
    4747  For an example of how this works, see loci.formats.in.PerkinElmerReader. 
     48 
     49Double getChannelGlobalMinimum(String, int) throws FormatException, IOException: 
     50  You only need to override this if your format specifies the minimum value 
     51  for each channel in the metadata.  The int parameter specifies the channel 
     52  for which to return the minimum value. 
     53 
     54Double getChannelGlobalMaximum(String, int) throws FormatException, IOException: 
     55  You only need to override this if your format specifies the maximum value 
     56  for each channel in the metadata.  The int parameter specifies the channel 
     57  for which to return the maximum value. 
     58 
     59boolean isMinMaxPopulated(String) throws FormatException, IOException: 
     60  Only override this if you are also overriding getChannelGlobalMinimum and 
     61  getChannelGlobalMaximum.  In general, return true. 
    4862 
    4963byte[] openBytes(String, int) throws FormatException, IOException : 
  • trunk/loci/formats/in/IPWReader.java

    r2291 r2292  
    2727import java.awt.image.BufferedImage; 
    2828import java.io.*; 
    29 import java.util.Hashtable; 
    30 import java.util.Iterator; 
    31 import java.util.StringTokenizer; 
     29import java.util.*; 
    3230import loci.formats.*; 
    3331 
     
    317315    currentOrder = new String[1]; 
    318316    orderCertain = new boolean[] {true}; 
     317    imagesRead = new Vector[1]; 
     318    imagesRead[0] = new Vector(); 
     319    minimumValues = new Vector[1]; 
     320    minimumValues[0] = new Vector(); 
     321    maximumValues = new Vector[1]; 
     322    maximumValues[0] = new Vector(); 
     323    minMaxFinished = new boolean[1]; 
     324    minMaxFinished[0] = false; 
    319325 
    320326    Hashtable h = ifds[0]; 
  • trunk/loci/formats/in/LIFReader.java

    r2291 r2292  
    522522    orderCertain = new boolean[numDatasets]; 
    523523    Arrays.fill(orderCertain, true); 
    524  
     524    imagesRead = new Vector[numDatasets]; 
     525    Arrays.fill(imagesRead, new Vector()); 
     526    minimumValues = new Vector[numDatasets]; 
     527    Arrays.fill(minimumValues, new Vector()); 
     528    maximumValues = new Vector[numDatasets]; 
     529    Arrays.fill(maximumValues, new Vector()); 
     530    minMaxFinished = new boolean[numDatasets]; 
     531    Arrays.fill(minMaxFinished, false); 
    525532    validBits = new int[numDatasets][1]; 
    526533 
  • trunk/loci/formats/in/LeicaReader.java

    r2291 r2292  
    999999    orderCertain = new boolean[numSeries]; 
    10001000    Arrays.fill(orderCertain, true); 
     1001    imagesRead = new Vector[numSeries]; 
     1002    Arrays.fill(imagesRead, new Vector()); 
     1003    minimumValues = new Vector[numSeries]; 
     1004    Arrays.fill(minimumValues, new Vector()); 
     1005    maximumValues = new Vector[numSeries]; 
     1006    Arrays.fill(maximumValues, new Vector()); 
     1007    minMaxFinished = new boolean[numSeries]; 
     1008    Arrays.fill(minMaxFinished, false); 
    10011009 
    10021010    // sizeC is null here if the file we opened was a TIFF. 
  • trunk/loci/formats/in/NikonReader.java

    r2219 r2292  
    2626 
    2727import java.io.*; 
    28 import java.util.Enumeration; 
    29 import java.util.Hashtable; 
     28import java.util.*; 
    3029import loci.formats.*; 
    3130 
     
    194193    getMetadataStore(id).createRoot(); 
    195194    orderCertain = new boolean[] {true}; 
     195    imagesRead = new Vector[] {new Vector()}; 
     196    minimumValues = new Vector[] {new Vector()}; 
     197    maximumValues = new Vector[] {new Vector()}; 
     198    minMaxFinished = new boolean[] {false}; 
    196199 
    197200    channelMinMax = null; 
  • trunk/loci/formats/in/OIBReader.java

    r2291 r2292  
    399399      sizeT = new int[numSeries]; 
    400400      validBits = new int[numSeries][]; 
     401      imagesRead = new Vector[numSeries]; 
     402      minimumValues = new Vector[numSeries]; 
     403      maximumValues = new Vector[numSeries]; 
     404      Arrays.fill(imagesRead, new Vector()); 
     405      Arrays.fill(minimumValues, new Vector()); 
     406      Arrays.fill(maximumValues, new Vector()); 
     407      minMaxFinished = new boolean[numSeries]; 
     408      Arrays.fill(minMaxFinished, false); 
    401409 
    402410      for (int i=0; i<numSeries; i++) { 
  • trunk/loci/formats/in/OMEXMLReader.java

    r2291 r2292  
    475475    orderCertain = new boolean[currentOrder.length]; 
    476476    Arrays.fill(orderCertain, true); 
     477    imagesRead = new Vector[width.length]; 
     478    minimumValues = new Vector[width.length]; 
     479    maximumValues = new Vector[width.length]; 
     480    Arrays.fill(imagesRead, new Vector()); 
     481    Arrays.fill(minimumValues, new Vector()); 
     482    Arrays.fill(maximumValues, new Vector()); 
     483    minMaxFinished = new boolean[width.length]; 
     484    Arrays.fill(minMaxFinished, false); 
    477485 
    478486    try { 
  • trunk/loci/formats/in/OpenlabReader.java

    r2291 r2292  
    661661    orderCertain = new boolean[numSeries]; 
    662662    Arrays.fill(orderCertain, true); 
     663    imagesRead = new Vector[numSeries]; 
     664    minimumValues = new Vector[numSeries]; 
     665    maximumValues = new Vector[numSeries]; 
     666    Arrays.fill(imagesRead, new Vector()); 
     667    Arrays.fill(minimumValues, new Vector()); 
     668    Arrays.fill(maximumValues, new Vector()); 
     669    minMaxFinished = new boolean[numSeries]; 
     670    Arrays.fill(minMaxFinished, false); 
    663671 
    664672    // populate MetadataStore 
  • trunk/loci/formats/in/TiffReader.java

    r2265 r2292  
    2727import java.io.ByteArrayInputStream; 
    2828import java.io.IOException; 
    29 import java.util.StringTokenizer; 
    30 import java.util.Vector; 
     29import java.util.*; 
    3130import javax.xml.parsers.*; 
    3231import loci.formats.*; 
     
    128127        currentOrder = new String[tiffData.length]; 
    129128        orderCertain = new boolean[tiffData.length]; 
     129        Arrays.fill(orderCertain, true); 
     130        imagesRead = new Vector[tiffData.length]; 
     131        minimumValues = new Vector[tiffData.length]; 
     132        maximumValues = new Vector[tiffData.length]; 
     133        Arrays.fill(imagesRead, new Vector()); 
     134        Arrays.fill(minimumValues, new Vector()); 
     135        Arrays.fill(maximumValues, new Vector()); 
     136        minMaxFinished = new boolean[tiffData.length]; 
     137        Arrays.fill(minMaxFinished, false); 
    130138 
    131139        for (int i=0; i<tiffData.length; i++) { 
  • trunk/loci/formats/in/ZeissZVIReader.java

    r2291 r2292  
    359359    currentOrder = new String[1]; 
    360360    orderCertain = new boolean[] {true}; 
     361    imagesRead = new Vector[] {new Vector()}; 
     362    minimumValues = new Vector[] {new Vector()}; 
     363    maximumValues = new Vector[] {new Vector()}; 
     364    minMaxFinished = new boolean[] {false}; 
    361365 
    362366    nImages = 0; 
Note: See TracChangeset for help on using the changeset viewer.