Forms a higher-resolution NDF by interleaving a set of NDFs


This routine performs interleaving, also known as interlacing, in order to restore resolution where the pixel dimension undersamples data. Resolution may be improved by integer factors along one or more dimensions. For an N-fold increase in resolution along a dimension, INTERLEAVE demands N NDF structures that are displaced from each other by i/N pixels, where i is an integer from 1 to N 1. It creates an NDF whose dimensions are enlarged by N along that dimension.

The supplied NDFs should have the same dimensionality.


interleave in out expand


Linear expansion factors to be used to create the new data array. The number of factors should equal the number of dimensions in the input NDF. If fewer are supplied the last value in the list of expansion factors is given to the remaining dimensions. Thus if a uniform expansion is required in all dimensions, just one value need be entered. If the net expansion is one, an error results. The suggested default is the current value.
Specifies the value to use where the interleaving does not fill the array, say because the shapes of the input NDFs are not the same, or have additional shifts of origin. Allowed values are "Bad" or "Zero". ["Bad"]
IN = NDF (Read)
A group of input NDFs to be interweaved. They may have different shapes, but must all have the same number of dimensions. This should be given as a comma-separated list, in which each list element can be:
  • an NDF name, optionally containing wild-cards and/or regular expressions ("", "?", "[a-z]" etc.).

  • the name of a text file, preceded by an up-arrow character "^". Each line in the text file should contain a comma-separated list of elements, each of which can in turn be an NDF name (with optional wild-cards, etc.), or another file specification (preceded by a caret). Comments can be included in the file by commencing lines with a hash character "#".

If the value supplied for this parameter ends with a hyphen "-", then you are re-prompted for further input until a value is given which does not end with a hyphen. All the datasets given in this way are concatenated into a single group.

OUT = NDF (Write)
Output NDF structure.
Title for the output NDF structure. A null value (!) propagates the title from the input NDF to the output NDF. [!]
This parameter controls the shape of the output NDF before the application of the expansion. If TRIM=TRUE, then the output NDF reflects the shape of the intersection of all the input NDFs, i.e. only pixels which appear in all the input arrays will be represented in the output. If TRIM=FALSE, the output reflects shape of the union of the inputs, i.e. every pixel which appears in the input arrays will be represented in the output. [TRUE]


interleave "vector1,vector2" weave 2
This interleaves the one-dimensional NDFs called vector1 and vector2 and stores the result in NDF weave. Only the intersection of the two input NDFs is used.
interleave ’image’ weave [3,2] title="Interlaced image"
This interleaves the two-dimensional NDFs with names beginning with "image" into an NDF called weave. The interleaving has three datasets along the first dimension and two along the second. Therefore there should be six input NDFs. The output NDF has title "Interlaced image".
interleave in=’image’ out=weave expand=[3,2] notrim
As above except the title is not set and the union of the bounds of the input NDFs is expanded to form the shape of the weave NDF.
interleave ^frames.lis finer 2
This interleaves the NDFs listed in the text file frames.lis to form an enlarged NDF called finer. The interleaving is twofold along each axis of those NDFs.

Related Applications


Implementation Status: