### Arrange

Category

Rendering

Function

Arranges images for display.

Syntax

    image = Arrange(group, horizontal, compact, position, size);

Inputs

Name | Type | Default | Description
--- | --- | --- | ---
`group` | image group | none | images to be displayed
`horizontal` | integer | infinity | number of images in horizontal dimension
`compact` | vector | [0 0] | makes the image compact in x or in y or in both
`position` | vector | [.5 .5] | position of each image in its frame
`size` | vector | [0 0] | force size of each frame to this number of pixels

Outputs

Name | Type | Description
--- | --- | ---
`image` | image | resulting image

Functional Details

This module is useful for displaying a collection of images in an orderly arrangement.

`group` | is a group of images (e.g., the output of Collect).
`horizontal` | specifies the number of images in the horizontal direction. If there are more images in `group` than `horizontal`, they are arranged in rows below the first, each of length `horizontal`.

The `compact`, `position`, and `size` parameters are useful when the images are of different sizes. In constructing an output image, Arrange creates in effect a regular arrangement of output blocks, in rows and columns, one original image being placed in each block. The size of the blocks and the placement of the original images in them is controlled by these three parameters:

`compact` | specifies how the resulting image is to be "compacted." If the first (width) component: = 0, the width of each column is set to the width of the widest image in the input group. = 1, the width of each column is set to the width of the widest image in that column. If the second (height) component: = 0, the height of each row is set to the height of the tallest image in the input group. = 1, the height of each row is set to the height of the tallest image in that row. Thus a setting of [0, 0] will place each image in a box of the same size, as determined by (1) the widest and tallest images present in the input group or (2) by the value of `size`, if it is nonzero.
`position` | specifies the placement of an image in an output block if the block is larger than the image. A value of [0 0] would place it in the lower left corner; [.5 .5], in the center; [1 0], in the lower right corner; and so on.
`size` | specifies, in pixels, the width or height of the block containing each input image in the resulting image. This parameter overrides the setting of the corresponding component of `compact`. If `size` is less than the size of the largest image, it will default to the size of the largest. That is, `size` cannot shrink or crop an image. If a component of `size` is set to zero, the dimensions of the images in that row or column are used to set the size of the output image blocks, depending on the setting of `compact`.

If you want to filter or reduce an image, you must do so before arranging it together with another image.

Components

All input components are propagated to the output.

Example Visual Programs

    PlotLine.net
    UsingCompute.net
    UsingFilter.net
    SIMPLE/Arrange.net

    IndependentlyArrange.net

IndependentlyArrange.net illustrates an interactive alternative to using Arrange.

See Also

Collect, Display, Overlay, Render

[ OpenDX Home at IBM | OpenDX.org ]