| MultiArray | |
| Functions | |
| MultiArray[] | Convert an array of Ruby objects to a multi-dimensional Sequence_ object. |
| MultiArray. | Create a multi-dimensional array from raw data. |
| MultiArray. | Construct from file created with Sequence_.save_raw. |
| MultiArray.new | Construct new multi-dimensional array with elements of same type. |
| MultiArray. | Shortcut for MultiArray.new( OBJECT, *shape ) |
| MultiArray.bool | Shortcut for MultiArray.new( BOOL, *shape ) |
| MultiArray. | Shortcut for MultiArray.new( UBYTE, *shape ) |
| MultiArray.byte | Shortcut for MultiArray.new( BYTE, *shape ) |
| MultiArray. | Shortcut for MultiArray.new( USINT, *shape ) |
| MultiArray.sint | Shortcut for MultiArray.new( SINT, *shape ) |
| MultiArray.uint | Shortcut for MultiArray.new( UINT, *shape ) |
| MultiArray.int | Shortcut for MultiArray.new( INT, *shape ) |
| MultiArray. | Shortcut for MultiArray.new( ULONG, *shape ) |
| MultiArray.long | Shortcut for MultiArray.new( LONG, *shape ) |
| MultiArray. | Shortcut for MultiArray.new( DFLOAT, *shape ) |
| MultiArray. | Shortcut for MultiArray.new( SFLOAT, *shape ) |
| MultiArray. | Shortcut for MultiArray.new( DCOMPLEX, *shape ) |
| MultiArray. | Shortcut for MultiArray.new( SCOMPLEX, *shape ) |
| MultiArray. | Shortcut for MultiArray.new( UBYTERGB, *shape ) |
| MultiArray. | Shortcut for MultiArray.new( BYTERGB, *shape ) |
| MultiArray. | Shortcut for MultiArray.new( USINTRGB, *shape ) |
| MultiArray. | Shortcut for MultiArray.new( SINTRGB, *shape ) |
| MultiArray. | Shortcut for MultiArray.new( UINTRGB, *shape ) |
| MultiArray. | Shortcut for MultiArray.new( INTRGB, *shape ) |
| MultiArray. | Shortcut for MultiArray.new( ULONGRGB, *shape ) |
| MultiArray. | Shortcut for MultiArray.new( LONGRGB, *shape ) |
| MultiArray. | Shortcut for MultiArray.new( DFLOATRGB, *shape ) |
| MultiArray. | Shortcut for MultiArray.new( SFLOATRGB, *shape ) |
| MultiArray. | Compute Laplacian of gaussian filter. |
| MultiArray. | Load a 8-bit greyscale-image. |
| MultiArray. | Load a 16-bit greyscale-image. |
| MultiArray. | Load a colour-image. |
| MultiArray. | Load a single-precision floating-point greyscale-image. |
| MultiArray. | Load a double-precision floating-point greyscale-image. |
| MultiArray. | Load a single-precision floating-point colour-image. |
| MultiArray. | Load a double-precisino floating-point colour-image. |
| MultiArray.load | Load image using RMagick. |
| MultiArray. | Load image using OpenEXR. |
| MultiArray. | Computes a tensor product for an n-dimensional result. |
def MultiArray.laplacian_of_gaussian( sigma, size )
Compute Laplacian of gaussian filter. No error estimate is given. The LoG-filter will display zero-crossings at edges. The edges can be detected using a combination of dilation and erosion. Alternatively one can match a set of small 3x3 patterns. Neither technique is provided by this library at the moment.

def MultiArray.tensor( n )
Computes a tensor product for an n-dimensional result. This method expects a code block as argument. The code block is interpreted using special objects as arguments. Therefore only certain operations are possible. The implementation is inspired by Walter Landry’s FTensor library. The following example shows a matrix multiplication as an example
v = MultiArray.sint( 2, 3 ).indgen!
w = MultiArray.sint( 3, 2 ).indgen!
r = MultiArray.tensor( 2 ) { |i,j,k| v[k,j] * w[i,k] }| n | the number of indices the result will have |
Create a multi-dimensional array from raw data.
def MultiArray.import( type, data, * shape )
Construct from file created with Sequence_.save_raw.
def MultiArray.load_raw( file )
Write meta-information and raw data to file.
def save_raw( file )
Construct new multi-dimensional array with elements of same type.
def MultiArray.new( element_type, * shape )
Shortcut for MultiArray.new( OBJECT, *shape )
def MultiArray.object( * shape )
Shortcut for MultiArray.new( BOOL, *shape )
def MultiArray.bool( * shape )
Shortcut for MultiArray.new( UBYTE, *shape )
def MultiArray.ubyte( * shape )
Shortcut for MultiArray.new( BYTE, *shape )
def MultiArray.byte( * shape )
Shortcut for MultiArray.new( USINT, *shape )
def MultiArray.usint( * shape )
Shortcut for MultiArray.new( SINT, *shape )
def MultiArray.sint( * shape )
Shortcut for MultiArray.new( UINT, *shape )
def MultiArray.uint( * shape )
Shortcut for MultiArray.new( INT, *shape )
def MultiArray.int( * shape )
Shortcut for MultiArray.new( ULONG, *shape )
def MultiArray.ulong( * shape )
Shortcut for MultiArray.new( LONG, *shape )
def MultiArray.long( * shape )
Shortcut for MultiArray.new( DFLOAT, *shape )
def MultiArray.dfloat( * shape )
Shortcut for MultiArray.new( SFLOAT, *shape )
def MultiArray.sfloat( * shape )
Shortcut for MultiArray.new( DCOMPLEX, *shape )
def MultiArray.dcomplex( * shape )
Shortcut for MultiArray.new( SCOMPLEX, *shape )
def MultiArray.scomplex( * shape )
Shortcut for MultiArray.new( UBYTERGB, *shape )
def MultiArray.ubytergb( * shape )
Shortcut for MultiArray.new( BYTERGB, *shape )
def MultiArray.bytergb( * shape )
Shortcut for MultiArray.new( USINTRGB, *shape )
def MultiArray.usintrgb( * shape )
Shortcut for MultiArray.new( SINTRGB, *shape )
def MultiArray.sintrgb( * shape )
Shortcut for MultiArray.new( UINTRGB, *shape )
def MultiArray.uintrgb( * shape )
Shortcut for MultiArray.new( INTRGB, *shape )
def MultiArray.intrgb( * shape )
Shortcut for MultiArray.new( ULONGRGB, *shape )
def MultiArray.ulongrgb( * shape )
Shortcut for MultiArray.new( LONGRGB, *shape )
def MultiArray.longrgb( * shape )
Shortcut for MultiArray.new( DFLOATRGB, *shape )
def MultiArray.dfloatrgb( * shape )
Shortcut for MultiArray.new( SFLOATRGB, *shape )
def MultiArray.sfloatrgb( * shape )
Compute Laplacian of gaussian filter.
def MultiArray.laplacian_of_gaussian( sigma, size )
Load a 8-bit greyscale-image.
def MultiArray.load_ubyte( file )
Load a 16-bit greyscale-image.
def MultiArray.load_usint( file )
Load a colour-image.
def MultiArray.load_ubytergb( file )
Load a single-precision floating-point greyscale-image.
def MultiArray.load_sfloat( file )
Load a double-precision floating-point greyscale-image.
def MultiArray.load_dfloat( file )
Load a single-precision floating-point colour-image.
def MultiArray.load_sfloatrgb( file )
Load a double-precisino floating-point colour-image.
def MultiArray.load_dfloatrgb( file )
Load image using RMagick.
def MultiArray.load( file )
Load image using OpenEXR.
def MultiArray.loadf( file )
Computes a tensor product for an n-dimensional result.
def MultiArray.tensor( n )
Create an array class.
def Sequence( element_type, num_elements, stride = element_type.size )