Previous: x/ zvpixsizeu Up: Miscellaneous Routines

x/ zvselpi

call xvselpi(instance)

Selects the file to use as the primary input. The primary input is normally the first file given in the ``INP'' parameter. It is used for a couple of things. If you don't give file attributes like size, type, etc. when you open a file, the defaults are taken from the primary input. Also, when you create a new output file, the history and property labels for the new file are copied from the primary input, in order to maintain the processing history and file attributes.

In the rare cases where the first ``INP'' file is not appropriate for the primary input, calling x/ zvselpi allows you to change the file that is used as the primary input, or to disable the primary input altogether. The file selected must still be one of the files in the ``INP'' parameter. For example, you might be taking input files and creating output files after doing the same processing to each. You would want to set the primary input for each output file to the corresponding input file, in order to preserve the history labels. Or, you may want to create a file with no history labels whatsoever (except for the current task of course).

This routine should be called before the x/ zvopen of the output file you want associated with the input. The only routines that use the primary input directly are x/ zvopen, x/ zvsize, and x/ zvbands. The primary input in effect at the time each of these routines is called determines which input file is used. You may change x/ zvselpi after the x/ zvopen statement, even if you do more processing to the file. It will still use the primary input in effect at the time the file was opened.

It is slightly more efficient to call x/ zvselpi before you open the primary input file for other reasons, because it avoids an extra file open. However, this should not have a big impact.

There is no status return from this routine.