Sets a new pixel origin for an NDF


This application sets a new pixel origin  value for an NDF   data structure. The NDF is accessed in update mode and the indices of the first pixel (the NDF’s lower pixel-index bounds) are set to specified integer values, which may be positive or negative. No other properties of the NDF are altered. If required, a template NDF may be supplied and the new origin values will be derived from it.


setorigin ndf origin


LIKE = NDF (Read)
This parameter may be used to supply an NDF which is to be used as a template. If such a template is supplied, then its origin (its lower pixel-index bounds) will be used as the new origin value for the NDF supplied via the NDF parameter. By default, no template will be used and the new origin will be specified via the ORIGIN parameter. [!]
NDF = NDF (Read and Write)
The NDF data structure whose pixel origin is to be modified.
A one-dimensional array specifying the new pixel origin values, one for each NDF dimension.


setorigin image_2d [1,1]
Sets the indices of the first pixel in the two-dimensional image image_2d to be (1, 1). The image pixel values are unaltered.
setorigin ndf=starfield
A new pixel origin is set for the NDF structure called starfield. SETORIGIN will prompt for the new origin values, supplying the existing values as defaults.
setorigin ndf=cube origin=[-128,-128]
Sets the pixel origin values for the first two dimensions of the three-dimensional NDF called cube to be (128, 128). A value for the third dimension is not specified, so the origin of this dimension will remain unchanged.
setorigin betapic like=alphapic
Sets the pixel origin of the NDF called betapic to be equal to that of the NDF called alphapic.


If the number of new pixel origin values is fewer than the number of NDF dimensions, then the pixel origin of the extra dimensions will remain unchanged. If the number of values exceeds the number of NDF dimensions, then the excess values will be ignored.


Setting a new pixel origin is a quick operation whose timing does not depend on the size of the NDF.

Related Applications