TIOPixelBufferLayerDescription

@interface TIOPixelBufferLayerDescription : NSObject <TIOLayerDescription>

The description of a pixel buffer input or output layer.

  • YES is the layer is quantized, NO otherwise

    Declaration

    Objective-C

    @property (readonly, getter=isQuantized, atomic) BOOL quantized;

    Swift

    var isQuantized: Bool { get }
  • The pixel format of the image data, must be kCVPixelFormatType_32BGRA or kCVPixelFormatType_32BGRA

    Declaration

    Objective-C

    @property (readonly, atomic) OSType pixelFormat;

    Swift

    var pixelFormat: OSType { get }
  • The shape of the pixel data, including width, height, and channels

    Declaration

    Objective-C

    @property (readonly, atomic) TIOImageVolume shape;

    Swift

    var shape: TIOImageVolume { get }
  • A function that normalizes pixel values from a uint8_t range of [0,255] to some other floating point range, may be nil.

    Declaration

    Objective-C

    @property (readonly, atomic, nullable) TIOPixelNormalizer normalizer;

    Swift

    var normalizer: TIOPixelNormalizer? { get }
  • A function that denormalizes pixel values from a floating point range back to uint8_t values in the range [0,255], may be nil.

    Declaration

    Objective-C

    @property (readonly, atomic, nullable) TIOPixelDenormalizer denormalizer;

    Swift

    var denormalizer: TIOPixelDenormalizer? { get }
  • Designated initializer. Creates a pixel buffer description from the properties parsed in a model.json file.

    Declaration

    Objective-C

    - (nonnull instancetype)
    initWithPixelFormat:(OSType)pixelFormat
                  shape:(TIOImageVolume)shape
             normalizer:(nullable TIOPixelNormalizer)normalizer
           denormalizer:(nullable TIOPixelDenormalizer)denormalizer
              quantized:(BOOL)quantized;

    Swift

    init(pixelFormat: OSType, shape: TIOImageVolume, normalizer: TIOPixelNormalizer?, denormalizer: TIOPixelDenormalizer?, quantized: Bool)

    Parameters

    pixelFormat

    The expected format of the pixels

    normalizer

    A function which normalizes the pixel values for an input layer, may be nil.

    denormalizer

    A function which denormalizes pixel values for an output layer, may be nil

    quantized

    YES if this layer expectes quantized values, NO otherwise

    Return Value

    instancetype A read-only instance of TIOPixelBufferLayerDescription

  • Unavailable

    Use the designated initializer.

    Declaration

    Objective-C

    - (nonnull instancetype)init;