ome.io.nio
Class PixelsService

java.lang.Object
  extended by ome.io.nio.AbstractFileSystemService
      extended by ome.io.nio.PixelsService

public class PixelsService
extends AbstractFileSystemService

Since:
OMERO-Beta1.0
Version:
3.0 (Internal version: $Revision: 7458 $ $Date: 2010-07-06 08:36:58 +0100 (Tue, 06 Jul 2010) $)
Author:

Chris Allan     callan@blackcat.ca

Field Summary
static String DV_FORMAT
          The DeltaVision file format enumeration value
static int NULL_PLANE_SIZE
          Null plane size constant.
static byte[] nullPlane
          Null plane byte array.
 
Fields inherited from class ome.io.nio.AbstractFileSystemService
FILES_PATH, PIXELS_PATH, ROOT_DEFAULT, THUMBNAILS_PATH
 
Constructor Summary
PixelsService(String path)
          Constructor.
 
Method Summary
 PixelBuffer createPixelBuffer(ome.model.core.Pixels pixels)
          Creates a PixelBuffer for a given pixels set.
static int getBitDepth(ome.model.enums.PixelsType type)
          Retrieves the bit width of a particular PixelsType.
 PixelBuffer getPixelBuffer(ome.model.core.Pixels pixels, OriginalFileMetadataProvider provider, boolean bypassOriginalFile)
          Returns a pixel buffer for a given set of pixels.
 void removePixels(List<Long> pixelIds)
          Removes files from data repository based on a parameterized List of Long pixels ids
 
Methods inherited from class ome.io.nio.AbstractFileSystemService
createSubpath, getFilesPath, getPixelsPath, getThumbnailPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DV_FORMAT

public static final String DV_FORMAT
The DeltaVision file format enumeration value

See Also:
Constant Field Values

NULL_PLANE_SIZE

public static final int NULL_PLANE_SIZE
Null plane size constant.

See Also:
Constant Field Values

nullPlane

public static final byte[] nullPlane
Null plane byte array.

Constructor Detail

PixelsService

public PixelsService(String path)
Constructor.

Parameters:
path - The root of the ROMIO proprietary pixels store. (usually /OMERO/Pixels).
Method Detail

createPixelBuffer

public PixelBuffer createPixelBuffer(ome.model.core.Pixels pixels)
                              throws IOException
Creates a PixelBuffer for a given pixels set.

Parameters:
pixels - Pixels set to create a pixel buffer for.
Returns:
Allocated pixel buffer ready to be used.
Throws:
IOException - If there is an I/O error creating the pixel buffer backing file.

getPixelBuffer

public PixelBuffer getPixelBuffer(ome.model.core.Pixels pixels,
                                  OriginalFileMetadataProvider provider,
                                  boolean bypassOriginalFile)
Returns a pixel buffer for a given set of pixels. Either a proprietary ROMIO pixel buffer or a file format specific file buffer if available.

Parameters:
pixels - Pixels set to retrieve a pixel buffer for.
provider - Original file metadata provider.
bypassOriginalFile - Do not check for the existence of an original file to back this pixel buffer.
Returns:
See above.

getBitDepth

public static int getBitDepth(ome.model.enums.PixelsType type)
Retrieves the bit width of a particular PixelsType.

Parameters:
type - a pixel type.
Returns:
width of a single pixel value in bits.

removePixels

public void removePixels(List<Long> pixelIds)
Removes files from data repository based on a parameterized List of Long pixels ids

Parameters:
pixelsIds - Long file keys to be deleted
Throws:
ome.conditions.ResourceError - If deletion fails.


OmeroJava Api

Version: Beta4.2.1-r8614-Beta4.2-b41

Copyright © 2009 The University of Dundee. All Rights Reserved.