Class OverlappedTiledWriter
java.lang.Object
OverlappedTiledWriter
Example class for reading and writing a file in a tiled OME-Tiff format.
- Author:
- David Gault dgault at dundee.ac.uk
-
Constructor Summary
ConstructorsConstructorDescriptionOverlappedTiledWriter(String inputFile, String outputFile, int tileSizeX, int tileSizeY) Construct a new OverlappedTiledWriter to read the specified input file and write the given output file using the tile sizes provided. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidTo read an image file and write out an OME-Tiff tiled image on the command line: $ java OverlappedTiledWriter input-file.oib output-file.ome.tiff 256 256voidRead tiles from input file and write tiles to output OME-Tiff.
-
Constructor Details
-
OverlappedTiledWriter
Construct a new OverlappedTiledWriter to read the specified input file and write the given output file using the tile sizes provided.- Parameters:
inputFile- the file to be readoutputFile- the file to be writtentileSizeX- the width of tile to attempt to usetileSizeY- the height of tile to attempt to use
-
-
Method Details
-
readWriteTiles
Read tiles from input file and write tiles to output OME-Tiff. In this example we are assuming that the tile size used does not divide evenly into the image height and width. When this occurs the last row and column of tiles are instead written as partial tiles rather than a full padded tile.- Throws:
IOException- thrown if unable to setup input or output stream for reader or writerloci.formats.FormatException- thrown by FormatWriter if attempting to set invalid series
-
main
public static void main(String[] args) throws loci.formats.FormatException, IOException, loci.common.services.DependencyException, loci.common.services.ServiceException To read an image file and write out an OME-Tiff tiled image on the command line: $ java OverlappedTiledWriter input-file.oib output-file.ome.tiff 256 256- Parameters:
args- Input file, Output file, tileSizeX and tileSizeY- Throws:
IOException- thrown if unable to setup input or output stream for reader or writerloci.formats.FormatException- thrown when setting invalid values in reader or writerloci.common.services.ServiceException- thrown if unable to create OME-XML meta dataloci.common.services.DependencyException- thrown if failed to create an OMEXMLService
-