TOC PREV NEXT INDEX

DVcrop_unif

Synopsis

extract a subset of a uniform field

module DVcrop_unif {
Mesh_Unif+Node_Data+Iparam &in {
xform+nonotify;
nnodes+req;
};
int+Iparam min[in.ndim];
int+Iparam max[in.ndim];
Mesh_Unif+Node_Data+Oparam out{
&xform+nowrite => in.xform;
};
method+notify_val+notify_inst upd_crop<status=1>
= "DVcrop_unif_update";
};

Description

DVcrop_unif reduces the size of a Mesh_Unif field by extracting the data within a specified range of its dimensions. The process is analogous to "cropping" a photographic image. Typical uses are to eliminate uninteresting portions of the data and to increase processing speed by reducing the amount of data.

Input

&in

A reference to an input that contains a Mesh_Unif and Node_Data.

min[in.ndim] max[in.ndim]

Integers. These are references to 1D arrays that will hold the minimum and maximum X (Y, and Z) coordinates for the cropping operation. The arrays take their length from the ndim of the input Grid_Struct, i.e., a 1D mesh needs only 1 array element to specify X min and max coordinates, a 2D mesh needs 2 array elements for X and Y, etc.

Output

out

The output field contains a new Mesh_Unif. Its points array (extents) is modified to retain the mesh's position in space.For example, the following 1D field has a points array (extents) from 0 to 49. 1 2 3 4 01234567890123456789012345678901234567890123456789 You crop the field using an I min of 30 and an I max of 49. The output field has a points array from 30 to 49. 3 4 ..............................01234567890123456789The output field also contains a new Node_Data that has the data within the cropped region.

Example

Libraries.Main.Filters.crop

File

v/dv.v

modules/crop.c

See also

DVcrop_struct
DVcrop_rect
DVcrop
DVcut
DVdownsize_rect

TOC PREV NEXT INDEX