Ignore:
Timestamp:
12/03/09 09:24:43 (10 years ago)
Author:
melissa
Message:

Updated documentation and what's new for today's release.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.1/components/bio-formats/doc/using-bioformats.txt

    r5059 r5727  
    3333call setSeries(int) to change which series is being read. 
    3434 
    35 Raw pixels are always retrieved one plane at a time.  Planes can be returned 
    36 either in a byte array, or in a java.awt.image.BufferedImage (using 
    37 openBytes(int) and openImage(int) respectively).  It is entirely 
    38 up to you which method to use, as the pixel values are always identical. 
    39 In general, BufferedImages are more convenient for viewer applications and 
    40 applications that don't need to perform computations on pixel data, while byte 
    41 arrays are better for applications that perform pixel manipulations. 
     35Raw pixels are always retrieved one plane at a time.  Planes are returned 
     36as raw byte arrays, using one of the openBytes methods. 
    4237 
    4338Core metadata is the general term for anything that might be needed to work with 
     
    8479  convenience. Using them is similar to the java.io InputStream/OutputStream 
    8580  model: just layer whichever functionality you need by nesting the wrappers. 
     81  + BufferedImageReader extends IFormatReader, and allows pixel data to be 
     82    returned as BufferedImages instead of raw byte arrays. 
    8683  + FileStitcher extends IFormatReader, and uses advanced pattern 
    8784    matching heuristics to group files that belong to the same dataset. 
     
    9794  + DimensionSwapper extends IFormatReader, and provides an API 
    9895    for changing the dimension order of a file. 
    99 - ImageTools provides a number of methods for manipulating BufferedImages and 
    100   primitive type arrays.  In particular, there are methods to split and merge 
    101   channels in a BufferedImage/array, as well as converting to a specific data 
    102   type (e.g. convert short data to byte data). 
     96- ImageTools and loci.formats.gui.AWTImageTools provide a number of methods for 
     97  manipulating BufferedImages and primitive type arrays.  In particular, there 
     98  are methods to split and merge channels in a BufferedImage/array, as well as 
     99  converting to a specific data type (e.g. convert short data to byte data). 
    103100 
    104101                                Writing Files 
     
    126123file. 
    127124 
    128 A word of warning: IFormatWriter.saveImage(Image, boolean) accepts 
    129 generic java.awt.Images, and converts them to a BufferedImage under the hood. 
    130 The problem is that not all formats support all types of data (e.g. JPEG 
    131 does not support 16-bit data).  To prevent the possibility of corrupt or 
    132 invalid files, it is important to check that the Image you supply to saveImage() 
    133 is supported.  This can be done using the isSupportedType and getPixelTypes 
    134 methods of IFormatWriter. 
    135  
    136125Please see the Movie Stitcher (loci.apps.stitcher) for an example of how 
    137126to write files using Bio-Formats. 
     
    141130 
    142131Following is a list of known oddities. 
    143  
    144 o IFormatWriter accepts Image objects (not just BufferedImages); yet all 
    145   writers convert the Image to a BufferedImage.  You can still pass in a 
    146   BufferedImage, but you are free to pass in any Image object. 
    147  
    148 o All readers have another openBytes method that takes a pre-allocated byte 
    149   array, but there is no corresponding method for openImage.  The 
    150   rationale behind pre-allocated byte arrays is (1) array allocation takes 
    151   a relatively long time; and (2) pre-allocation avoids memory spikes on the 
    152   heap.  The reason there isn't something similar for openImage (i.e., a method 
    153   that takes a pre-allocated BufferedImage) is that it's kind of a pain to 
    154   implement, and no one has cared so far.  If you want this method, we can work 
    155   towards adding it. 
    156132 
    157133o Importing multi-file formats (Leica LEI, PerkinElmer, FV1000 OIF, ICS, and 
Note: See TracChangeset for help on using the changeset viewer.