Table of Contents

Class ConvertFromArray

Namespace
Bonsai.Dsp
Assembly
Bonsai.Dsp.dll

Represents an operator that converts each managed array in the sequence into a 2D array buffer with the specified size, depth and number of channels.

[Combinator]
[WorkflowElementCategory(ElementCategory.Transform)]
public class ConvertFromArray
Inheritance
ConvertFromArray
Inherited Members

Properties

Channels

Gets or sets the number of channels in the output array buffer.

public int? Channels { get; set; }

Property Value

int?

Remarks

If this property is not specified, the default number of channels will be one.

Depth

Gets or sets the bit depth of each element in the output array buffer.

public Depth? Depth { get; set; }

Property Value

Depth?

Remarks

If this property is not specified, the default depth will be automatically selected based on the type of the input array elements.

Size

Gets or sets the size of the output array buffer.

public Size Size { get; set; }

Property Value

Size

Remarks

If one dimension is zero, the output will be either a row or column vector along the non-zero dimension. If both dimensions are zero, the output will be a row vector with the same number of elements as the length of each array in the sequence.

Methods

Process(IObservable<byte[]>)

Converts each byte array in an observable sequence into a 2D array buffer with the specified size, depth and number of channels.

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

Parameters

source IObservable<byte[]>

A sequence of 8-bit unsigned integer arrays to convert into a sequence of sample buffers.

Returns

IObservable<Mat>

A sequence of Mat objects containing a copy of the managed array data reinterpreted as a 2D array buffer with the specified size, depth and number of channels.

Process(IObservable<double[]>)

Converts each double array in an observable sequence into a 2D array buffer with the specified size, depth and number of channels.

public IObservable<Mat> Process(IObservable<double[]> source)

Parameters

source IObservable<double[]>

A sequence of 64-bit floating-point arrays to convert into a sequence of sample buffers.

Returns

IObservable<Mat>

A sequence of Mat objects containing a copy of the managed array data reinterpreted as a 2D array buffer with the specified size, depth and number of channels.

Process(IObservable<short[]>)

Converts each short array in an observable sequence into a 2D array buffer with the specified size, depth and number of channels.

public IObservable<Mat> Process(IObservable<short[]> source)

Parameters

source IObservable<short[]>

A sequence of 16-bit signed integer arrays to convert into a sequence of sample buffers.

Returns

IObservable<Mat>

A sequence of Mat objects containing a copy of the managed array data reinterpreted as a 2D array buffer with the specified size, depth and number of channels.

Process(IObservable<int[]>)

Converts each int array in an observable sequence into a 2D array buffer with the specified size, depth and number of channels.

public IObservable<Mat> Process(IObservable<int[]> source)

Parameters

source IObservable<int[]>

A sequence of 32-bit signed integer arrays to convert into a sequence of sample buffers.

Returns

IObservable<Mat>

A sequence of Mat objects containing a copy of the managed array data reinterpreted as a 2D array buffer with the specified size, depth and number of channels.

Process(IObservable<float[]>)

Converts each float array in an observable sequence into a 2D array buffer with the specified size, depth and number of channels.

public IObservable<Mat> Process(IObservable<float[]> source)

Parameters

source IObservable<float[]>

A sequence of 32-bit floating-point arrays to convert into a sequence of sample buffers.

Returns

IObservable<Mat>

A sequence of Mat objects containing a copy of the managed array data reinterpreted as a 2D array buffer with the specified size, depth and number of channels.

Process(IObservable<ushort[]>)

Converts each ushort array in an observable sequence into a 2D array buffer with the specified size, depth and number of channels.

public IObservable<Mat> Process(IObservable<ushort[]> source)

Parameters

source IObservable<ushort[]>

A sequence of 16-bit unsigned integer arrays to convert into a sequence of sample buffers.

Returns

IObservable<Mat>

A sequence of Mat objects containing a copy of the managed array data reinterpreted as a 2D array buffer with the specified size, depth and number of channels.

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

Converts each array of type TData in an observable sequence into a 2D array buffer with the specified size, depth and number of channels.

public IObservable<Mat> Process<TData>(IObservable<TData[]> source) where TData : struct

Parameters

source IObservable<TData[]>

A sequence of arrays of type TData to convert into a sequence of sample buffers.

Returns

IObservable<Mat>

A sequence of Mat objects containing a copy of the managed array data reinterpreted as a 2D array buffer with the specified size, depth and number of channels.

Type Parameters

TData

The type of the values stored in each array.