SampleCrop

DESCRIPTION

SampleCrop extracts a sampled and cropped portion of a 3-D lattice, including both data and coordinates. The extraction works independently of data and coordinate values and types. In all cases, SampleCrop selects a subset of the array indices for the data and coordinate arrays and extracts the corresponding values.

In Fortran-style array notation, the array of extracted values (both data and coordinates) is related to the original array by

Output = Input ( IMin:IMax:Sample, JMin:JMax:Sample, KMin:KMax:Sample )

The type of the output coordinates is the same as the type of the input coordinates. That is, uniform, perimeter, and curvilinear coordinates are sampled and cropped without changing to curvilinear.

INPUTS

Port: Input
Type: Lattice
Constraints: 1..3-D.
The input image or volume to be sampled and cropped.

WIDGETS

Port: I Min
Type: Slider
Lower bound for cropping along the I axis.

Port: I Max
Type: Slider
Upper bound for cropping along the I axis.

Port: J Min
Type: Slider
Lower bound for cropping along the J axis.

Port: J Max
Type: Slider
Upper bound for cropping along the J axis.

Port: K Min
Type: Slider
Lower bound for cropping along the K axis.

Port: K Max
Type: Slider
Upper bound for cropping along the K axis.

Port: Sample
Type: Slider
Stride for sampling along each of the I, J, and K axes.

OUTPUTS

Port: Output
Type: Lattice
Constraints: 1..3-D.
A copy of the input lattice reduced by sampling and cropping.

PROBLEMS

SampleCrop is inefficient as a pass-through module. When the desired output is identical to the input lattice (i.e., when all minimum and maximum values are set to their extremal limits and Stride is set to unity), the input values are copied to the output rather than simply passing a pointer to the original lattice.

SEE ALSO

Interpolate PickLat
[ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1996