crop
Synopsis
extract a subset of a structured field
Input Port
in_field
|
Mesh_Struct+Node_Data
|
ui_parent
|
user interface parent object
|
Parameters
I min
|
UIslider
|
lower bound of the first dimension
|
I max
|
UIslider
|
upper bound of the first dimension
|
J min
|
UIslider
|
lower bound of the second dimension
|
J max
|
UIslider
|
upper bound of the second dimension
|
K min
|
UIslider
|
lower bound of the third dimension
|
K max
|
UIslider
|
upper bound of the third dimension
|
Output Port
out_fld
|
Mesh_Struct+Node_Data
|
out_obj
|
output renderable object
|
Description
crop reduces the size of a structured 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_field
The input must contain a structured mesh object (Mesh_Struct, Mesh_Rect, or Mesh_Unif), and a Node_Data object. The mesh can be 1D, 2D, or 3D.
ui_parent
A port to connect to a user interface object that contains the macro's widgets. By default, it is connected to the default user interface object in the application in which the macro is instanced. (This default connection is not drawn.)
Parameters
I min
I max
J min
J max
K min
K max
UIsliders. Used to set crop dimensions. I min, J min, and K min set the lower bound array index in their respective dimensions; I max, J max, and K max set the upper bound array index in their respective dimensions. All default to 0 (min) and the maximum dimension of the mesh (max), so that the default is no cropping. Their range is from 0 to the maximum dimension of the Mesh for I, J, and K. All three pairs of controls appear no matter what the dimensionality of the input Mesh. Use just the controls meaningful for the input data.
Output Port
out_fld
The output field contains a new Mesh_Struct and a new Node_Data associated with the cropped region.
If the input was a Mesh_Rect or a Mesh_Unif, its points array (extents) are 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 coordinate indices from 0 to 19 and a points array from 30 to 49.
3 4
..............................01234567890123456789
The output field also contains a new Node_Data that has the data within the cropped region.
out_obj
This is a renderable version of the output field.
Example
Libraries.Examples.Vizualization.Crop
v/dv_examp/crop.v
File
v/modules.v
See also related modules