IMAGE commands


PROGRAM NAME

irotate - Rotate Object by Arbitrary Angle

DESCRIPTION

irotate is used to apply a rotation operation to each WxH plane in the value segment of a data object. The is equivalent to rotating the data about an axis that lies parallel to the DEPTH axis.

Interpolation of output data from the input data is bilinear.

Each of the (DxE) WxH planes is rotated before being stored in the output object.

If rotation about an axis parallel to an axis other than DEPTH is desired, it is necessary to use the kaxis program to reorient the data such that the desired axis becomes the DEPTH axis before applying irotate. This limitation is due to computational complexity and performance issues, particularly when dealing with large data sets.

If the input object has a map, the data is pulled through the map prior to rotation, and the output object will have no map.

The arbitrary (floating point) rotation angle is CW for a positive angle, and should be specified in degrees.

The center of rotation is used to specify that WxH point in the input object about which the rotation is to take place. The -wctr and -hctr flags can be used to ask irotate to automatically place the center of rotation at the center of the WxH plane.

The -resize flag will causes the output object dimensions to be increased or decreased sufficiently to just contain all of the input data even after rotation. When this flag is used, the W and H dimensions may increase or decrease by a factor of up to sqrt(2). If -resize is selected and the center of rotation is not in the center of the WxH plane, the resulting rotated data will not be centered in the output data.

The -planes flag is used to change the way the data is accessed for processing. If the data set is small enough that individual WxH planes of data will fit in memory, then use of the -planes flag will cause processing to be done on a plane-by-plane basis; this is generally much faster than the default method (orders of magnitude). If -planes is not specified, then processing will occur in prisms down the D axis, which is much slower but will work on data sets of any size. If you have lots of memory, you may be able to get away with using -planes even for quite large data sets, say around 2Kx2K or more points per plane.

The value given to those data points in the output that do not map to data in the input object is controlled by the padding behavior. If padding by zero is selected, then those areas will be set to zero. If padding by a specific pad value is selected, then that value will appear in areas that don't map to the input data. If padding by the pad value attribute of the input object is selected, then the pad value from the input object attribute KPDS_VALUE_PAD_VALUE is retrieved and is placed in areas that don't map to the input data.

If the input object has a mask, a new mask will be computed for the output object indicating which data points contain reliable data. If a mask is present, then the output mask will be computed with value 1 if there was a full set of valid data points in the input from which to compute the output value. If any of the needed input points was marked as invalid, then the output mask value is set to 0, marking that output point as invalid. For regions of the output that do not map to data in the input object, the mask can be set to valid or invalid, depending on the setting of the -padvalid argument.

If the input object has a location data segment and the location data is anything other than KUNIFORM, then irotate will complain and ask you to use klocxform instead.

REQUIRED ARGUMENTS

-i
type: infile
desc: Input data object
-o
type: outfile
desc: Output data object

Mutually Exclusive Group; you must specify ONE of:

-wc
type: double
desc: W coordinate of center of rotation
default: 0
bounds: no range checking
OR
-wctr
type: flag
desc: center of rotation in center of W coordinate span

Mutually Exclusive Group; you must specify ONE of:

-hc
type: double
desc: H coordinate of center of rotation
default: 0
bounds: no range checking
OR
-hctr
type: flag
desc: center of rotation in center of H coordinate span

OPTIONAL ARGUMENTS

-angle
type: double
desc: rotation angle (degrees, positive is CW)
default: 0
bounds: -360 < [-angle] < 360
-resize
type: flag
desc: resize to fit rotated image
-planes
type: flag
desc: Process data by WxH planes (fast, but only good for smaller objects) instead of small prisms down D (slow, but works for huge objects)
-padding
type: cycle
desc: specify padding behavior (1 - pad with zeros, 2 - pad with pad value, 3 - pad with pad value attribute in input object)
default: 1 "Pad with zero"
-real
type: double
desc: real constant pad value
default: 0
bounds: no range checking
-imag
type: double
desc: imaginary constant pad value
default: 0
bounds: no range checking
-padvalid
type: boolean
desc: Identify padded data added by this program as valid or invalid in mask
default: true

EXAMPLES

SEE ALSO

igeowarp(1,) klocxform(1)

RESTRICTIONS

If irotate is too slow for your application, be sure to read about the -planes option to see if it can be used. If so, processing may occur several orders of magnitude faster.

REFERENCES

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.