Table of Contents

Class MatrixWriter

Namespace
Bonsai.Dsp
Assembly
Bonsai.Dsp.dll

Represents an operator that writes each array-like object in the sequence to a raw binary output stream.

public class MatrixWriter : StreamSink<ArraySegment<byte>, BinaryWriter>
Inheritance
MatrixWriter
Inherited Members

Properties

Layout

Gets or sets a value specifying the sequential memory layout used to store the sample buffers.

public MatrixLayout Layout { get; set; }

Property Value

MatrixLayout

Methods

CreateWriter(Stream)

Creates a binary writer over the specified Stream.

protected override BinaryWriter CreateWriter(Stream stream)

Parameters

stream Stream

The stream on which the elements should be written.

Returns

BinaryWriter

A BinaryWriter object used to write binary array data into the stream.

Process(IObservable<Mat>)

Writes all multi-channel matrices in an observable sequence to the specified raw binary output stream.

public IObservable<Mat> Process(IObservable<Mat> source)

Parameters

source IObservable<Mat>

The sequence of multi-channel matrices to write.

Returns

IObservable<Mat>

An observable sequence that is identical to the source sequence but where there is an additional side effect of writing the matrices to a stream.

Process(IObservable<byte[]>)

Writes all of the byte arrays in an observable sequence to the specified raw binary output stream.

public IObservable<byte[]> Process(IObservable<byte[]> source)

Parameters

source IObservable<byte[]>

The sequence of byte arrays to write.

Returns

IObservable<byte[]>

An observable sequence that is identical to the source sequence but where there is an additional side effect of writing the arrays to a stream.

Process<TElement>(IObservable<TElement[]>)

Writes all of the arrays in an observable sequence to the specified raw binary output stream.

public IObservable<TElement[]> Process<TElement>(IObservable<TElement[]> source) where TElement : unmanaged

Parameters

source IObservable<TElement[]>

The sequence of arrays to write. The elements stored in each array must be of an unmanaged type.

Returns

IObservable<TElement[]>

An observable sequence that is identical to the source sequence but where there is an additional side effect of writing the arrays to a stream.

Type Parameters

TElement

Write(BinaryWriter, ArraySegment<byte>)

Writes a new array to the raw binary output stream.

protected override void Write(BinaryWriter writer, ArraySegment<byte> input)

Parameters

writer BinaryWriter

A BinaryWriter object used to write binary array data to the output stream.

input ArraySegment<byte>

The array segment containing the binary data to write into the output stream.