Access one or more slices of an array.
More...
| array | slice (int index) const |
| | Access slice index to form a matrix (plane of a volume, channel in an image) More...
|
| |
| array | slices (int first, int last) const |
| | Access slices first through last to form a matrix (inclusive) More...
|
| |
Access one or more slices of an array.
A slice is a 2D cross section of a volume or 3D array. It is synonymous with channel of an image or plane of a volume.
The slice indexing functions return elements located in the specified slices(s).
| array slice |
( |
int |
index | ) |
const |
|
inline |
Access slice index to form a matrix (plane of a volume, channel in an image)
float f[] = {1,2,3,4,5,6,7,8};
- Parameters
-
- Returns
- Returns an array of size dims(0) x dims(1) x 1
- Note
- Cannot be used in gfor. Use array(span, span, index) instead.
| array slices |
( |
int |
first, |
|
|
int |
last |
|
) |
| const |
|
inline |
Access slices first through last to form a matrix (inclusive)
- Parameters
-
| [in] | first | beginning slice index |
| [in] | last | end slice index |
- Returns
- Returns an array of size dims(0) x dims(1) x (last - first + 1)
- Note
- Cannot be used in gfor. Use array(span, span, seq(first, last)) instead.