CropLat2D

DESCRIPTION

This module takes a 2D lattice and two locations in 3D space and uses them as the bottom left (X Min, Y Min) and top right (X Max, Y Max) corners of a rectangle to crop the 2D lattice. It outputs the cropped lattice, and the geometry of a rectangle for the cropped region.

The coordinates of the rectangle can be entered either via the widgets on the control panel, or as pick data (see below). Attempting to set X Min greater than X Max will result in X Min being set to X Max, and vice versa (similarly for Y). Since each dimension of the cropped lattice is always at least one, this means that a single row or column or point can be extracted from the lattice if required. In addition, rectangle coordinates which are outside the range of the coordinates of the input lattice are clamped to this range.

The cropping rectangle is snapped to the closest nodes of the input lattice at each of its corners.

INPUTS

Port: Input Lattice
Type: Lattice
Constraints: 2-D
Constraints: uniform
The data lattice. It can be of any primitive type, and have any number of data variables. The cropping rectangle is set to the extent of the coordinates of the lattice whenever a new lattice is passed to the module.

Port: Pick
Type: Pick
Optional: This port is optional.
Input location. The left mouse button is used to update the bottom left (X Min, Y Min) corner and the middle button is used for the top right (X Max, Y Max) corner.

WIDGETS

Port: X Min
Type: Text
The X coordinate of the bottom left corner of the rectangle, measured in the same units as the coordinates of the input lattice.

Port: X Max
Type: Text
The X coordinate of the top right corner of the rectangle, measured in the same units as the coordinates of the input lattice.

Port: Y Min
Type: Text
The Y coordinate of the bottom left corner of the rectangle, measured in the same units as the coordinates of the input lattice.

Port: Y Max
Type: Text
The Y coordinate of the top right corner of the rectangle, measured in the same units as the coordinates of the input lattice.

Port: Apply Crop
Type: Button
Applies the cropping rectangle and uses it to crop the input lattice. No output lattice is produced until this button is pressed.

Port: Undo Crop
Type: Button
Resets the cropping rectangle to the extent of the coordinates of the input lattice.

Port: Color
Type: Text
Color string used to color the rectangle geometry. See cxParamColorFloatGet for valid color names.

OUTPUTS

Port: Box
Type: Geometry
The geometry of the region.

Port: Cropped lattice
Type: Lattice
Constraints: 2..-D
Constraints: uniform
The output lattice. Its extent is determined by finding, in each dimension, the nearest node to each corner of the cropping rectangle.

KNOWN PROBLEMS

SEE ALSO

CropLat3D, cxParamColorFloatGet.
[Documentation Home]
© The Numerical Algorithms Group Ltd, Oxford UK. 2000