12/03/09 09:24:43 (10 years ago)

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

1 edited


  • trunk/components/bio-formats/doc/using-bioformats.txt

    r5059 r5727  
    3333call setSeries(int) to change which series is being read. 
    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. 
    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). 
    104101                                Writing Files 
    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. 
    136125Please see the Movie Stitcher (loci.apps.stitcher) for an example of how 
    137126to write files using Bio-Formats. 
    142131Following is a list of known oddities. 
    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. 
    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. 
    157133o Importing multi-file formats (Leica LEI, PerkinElmer, FV1000 OIF, ICS, and 
Note: See TracChangeset for help on using the changeset viewer.