Personal tools
  • We're Hiring!

You are here: Home Documentation Previous versions OME Server Developer Image Server Method Reference Pixels

Pixels

Methods that operate on a set of Pixels

These methods apply to an entire set of pixels, not to individual pixels

  • NewPixels [C] [MATLAB] - Create a new set of Pixels.
    • Required Parameters:
      • Dims - Dims=dX,dY,dZ,dC,dT,bpp. The Pixel dimensions and bytes per pixel. All dimension extents must be >=1 (dX = width, etc). The bpp is bytes per pixel (not bits!). It can be 1, 2 or 4.
    • Optional Parameters:
      • IsSigned - A boolean specifying whether the pixels are signed integers. By default, IsSigned=0
      • IsFloat - A boolean specifying whether the pixels are floating point (real) numbers. By default, IsFloat=0
    • Return value:
      • PixelsID - A 64-bit unsigned integer, which can be interpreted as a 21-character string. This is a temporary PixelsID which should be used to refer to this set of Pixels. The Pixels permanent ID is returned by the FinishPixels call.
  • PixelsInfo [C] [MATLAB] - Get information about the Pixels.
    • Required Parameters:
      • PixelsID - The Pixels ID.
    • Return values: A set of key - value pairs with one pair per line
      • Dims=dX,dY,dZ,dC,dT,bpp - see the NewPixels call for an explanation of the Dims parameter
      • Finished=boolean - 0 or 1
      • Signed=boolean - 0 or 1
      • Float=boolean - 0 or 1
      • SHA1=string - 40 character lower-case hex string
  • PixelsSHA1 [C] - Get SHA1 digest of the Pixels
    • Required Parameters:
      • PixelsID - The Pixels ID.
    • Return value: The SHA1 digest of the Pixels - a 40 character lower-case hex string.
  • FindPixels - Get Pixels based on their SHA1 digest
    • Required Parameters:
      • SHA1 - A SHA1 digest - a 40 character lower-case hex string.
    • Return value: The PixelsID of Pixels with the specified digest. Returns 0 if such Pixels don't exist.
  • SetPixels [C] [MATLAB] - Set the Pixels all at once.
    • Required Parameters:
      • PixelsID - The Pixels ID.
      • Pixels - The pixels in binary form are sent as a multi-part form in a POST request. The form field must be called "Pixels" and it must be the last part of the form.
        When using the command line, the Pixels parameter doesn't have to be specified.
        The raw binary pixels are read from stdin.
        The number of pixels sent must exactly match the number of pixels in the specified set of pixels.
        The pixels must be in XYZCT order.
    • Optional Parameters:
      • BigEndian - boolean. Set to 0 if the pixels being sent are in little endian byte order. By default, BigEndian=1 (network order)
    • Return value: Number of pixels written
  • GetPixels [C] [MATLAB] - Get all of the Pixels.
    • Required Parameters:
      • PixelsID - The Pixels ID.
    • Optional Parameters:
      • BigEndian - boolean. Set to 0 if the pixels should be sent in little endian byte order. By default, BigEndian=1 (network order)
    • Return value: The pixels in binary form in XYZCT order with an application/octet-stream mime-type.
  • FinishPixels [C] [MATLAB] - Finish the write cycle: Disable Set methods, enable Get methods.
    • Required Parameters:
      • PixelsID - The Pixels ID.
    • Return value:
      • PixelsID - A 64-bit unsigned integer, which can be interpreted as a 21-character string. Note that this PixelsID may not be the same as the PixelsID returned by NewPixels. When FinishPixels is called, a SHA1 digest of the pixels is calculated, and if it matches a SHA1 for a pre-existing set of Pixels, then the PixelsID of the existing set of pixels is returned. The PixelsID returned by FinishPixels is the permanent PixelsID for this unique set of Pixels.
  • DeletePixels [C] [MATLAB] - Permanently delete a set of Pixels. This method should only be called if the Pixels were incorrectly set.
    • Required Parameters:
      • PixelsID - The Pixels ID.
    • Return value:
      • PixelsID - A 64-bit unsigned integer, which can be interpreted as a 21-character string. This PixelsID will no longer be a valid Pixels ID (OMEIS IDs are not recycled).
  • Convert - Convert an entire Uploaded file to a set of Pixels all at once.
    • Required Parameters:
      • PixelsID - The Pixels ID of the Pixels that will be written.
      • FileID - The File ID that the pixels will be read from. The pixels in the file must be in XYZCT order.
    • Optional Parameters:
      • Offset - Number of bytes to skip in the file before reading pixels. Useful when the file contains a header, for example. By default, Offset=0.
      • BigEndian - boolean. Set to 0 if the file being converted is in little endian byte order. By default, BigEndian=1 (network order)
    • Return value: The number of pixels converted
  • GetLocalPath [C] - Get the file path used by OMEIS for the specified set of Pixels.
    • Required Parameters:
      • PixelsID - The Pixels ID.
    • Return value: a string containing the file path for the given PixelsID
Document Actions