Changes the order of the dimensions in an image
dip_Error dip_ChangeDimensions( image, neworder )
Re-orders the dimensions in an image, optionally removing singleton dimensions (those dimensions with size 1), without copying the data. neworder is a list of the dimension numbers in the new order, for example (2,1,3) will swap the first two dimensions. Setting neworder to 0 removes all singleton dimensions without altering the order. This is useful, for example, after calling a function such as Maximum to compute a maximum projection over one dimension. The output image keeps the dimensionality of the input image, and thus has a singleton dimension.
Data type | Name | Description |
dip_Image | image | The image to modify |
dip_IntegerArray | neworder | The new order of the dimensions |
ImageGetDimensions, ImageSetDimensions, ImageGetStride
DIPlib on-line documentation | Function reference | Global function index