TileImages(1) part of ANTS registration suite

DESCRIPTION

TileImages imageDimension outputImage layout inputImage1 ... inputImageN
The layout has the same dimension as the output image. If all entries of the layout are positive, the tiled output will contain the exact number of tiles. If the layout contains a 0 in the last dimension, the filter will compute a size that will accommodate all of the images. The input images must have a dimension less than or equal to the output image. The output image could have a larger dimension than the input. For example, This filter can be used to create a 3-d volume from a series of 2-d inputs by specifying a layout of 1x1x0.
In addition to the above functionality, there is another usage option for creating a 2-d tiled mosaic from a 3-D image. The command line options are the same except only 1 input is expected and the layout for this option is DxRxC where:
D is direction, i.e. 0, 1, or 2.
If not any of those numbers, we pick the coarsest spacing.
R is number of rows. C is number of cols. If R < 0 and C > 0 (or vice versa), the negative value is selected based on D