### Slice

Category

Import and Export

Function

Slices a multidimensional object.

Syntax

    output = Slice(input, dimension, position);

Inputs

Name | Type | Default | Description
--- | --- | --- | ---
`input` | field | none | object to be sliced
`dimension` | integer or string | 0 | dimension to be eliminated
`position` | integer list | all | starting positions

Outputs

Name | Type | Description
--- | --- | ---
`output` | field or field series | sliced data

Functional Details

This module creates one or more "slices" of data from a multidimensional object, each slice containing a subset of input data. It differs from the Slab module in reducing by one the dimensionality of the object passed to `output`.

`input` | specifies the data field to be sliced. This field must have regular connections.

`dimension`

specifies the dimension to be eliminated. If `input` has n dimensions, the output will have n - 1. These dimensions can be specified by number (from 0 to n - 1). The first three can also be specified as x, y, and z, respectively.

The default for this parameter is dimension 0 (zero).

Notes:

1. The `dimension` number refers to the ordering of positions in the "connections" component. Thus, x corresponds to 0 only if the positions have been specified as x varies slowest.

2. Slice can also be used on deformed grids, in which case the connections do not align with any particular axis.

3. Transposing the positions (i.e., with Transpose) does not change the order in the "connections" component.

`position`

specifies the position from which the slice is generated.

If the specified value is a single value, the module creates a single field sliced that position along the eliminated dimension.

If `position` is a list of integers, the module creates a field series, sliced at each position in the list. The series position of each series member is equal to the value of the origin of that slice along the sliced axis.

If this parameter is not specified, the output is a series of slices that begin at every grid position along `dimension`.

Notes:

1. This module produces 2-dimensional data from 3-dimensional data. To create a 2-dimensional slice in 3-dimensional space, use Slab.

2. Slice performs no interpolation, and only data with regular connections can be sliced.

3. If the data are connection dependent, slicing is ill-defined and the module returns an error.

Components

All input components are propagated to the output.

Example Visual Program

    WarpingPositions.net

See Also

Select, Slab, Stack

[ OpenDX Home at IBM | OpenDX.org ]