next up previous
Next: NDF_BOUND - Enquire the pixel-index bounds of an NDF
Up: FORTRAN ROUTINE DESCRIPTIONS
Previous: NDF_BEGIN - Begin a new NDF context

   
NDF_BLOCK - Obtain an NDF section containing a block of adjacent pixels

Description:
The routine returns an identifier for an NDF section describing a "block" of adjacent pixels selected from an initial NDF. The routine divides the original NDF logically into a series of such blocks, each of which does not exceed a specified maximum number of pixels in each dimension. The routine's IBLOCK argument allows one of these blocks to be selected; an NDF section for it is then returned.

Invocation:
CALL NDF_BLOCK( INDF1, NDIM, MXDIM, IBLOCK, INDF2, STATUS )

Arguments:
INDF1 = INTEGER (Given)
Identifier for the initial NDF.
NDIM = INTEGER (Given)
Number of maximum dimension sizes.
MXDIM( NDIM ) = INTEGER (Given)
Array specifying the maximum size of a block in pixels along each dimension.
IBLOCK = INTEGER (Given)
Number of the block required (the first block is numbered 1).
INDF2 = INTEGER (Returned)
Identifier for an NDF section describing the block.
STATUS = INTEGER (Given and Returned)
The global status.

Notes:
  • This routine is intended to allow NDFs to be processed in smaller pieces by selecting successive blocks, each of which may then be processed individually. Note that in general not all the blocks selected from an NDF will have the same shape or size, although none will exceed the specified maximum number of pixels in each dimension.
  • Corresponding blocks selected from different NDFs (or NDF sections) with identical shapes will themselves have identical shapes and will contain the same number of pixels.
  • All NDF sections obtained via this routine have the same number of dimensions as the input NDF. If the number of maximum dimension sizes supplied (NDIM) is less than this number, then a value of 1 will be used for the extra dimension sizes. If the value of NDIM is larger than this number, then the excess dimension sizes will be ignored.
  • If the number of the requested block (IBLOCK) exceeds the number of blocks available in the NDF, then a value of NDF__NOID will be returned for the INDF2 argument (but no error will result). This condition may be used to terminate a loop when all available blocks have been processed. The NDF_NBLOC routine may also be used to determine the number of blocks available.
  • If this routine is called with STATUS set, then a value of NDF__NOID will be returned for the INDF2 argument, although no further processing will occur. The same value will also be returned if the routine should fail for any reason.
  • The NDF__NOID constant is defined in the include file NDF_PAR.



next up previous
Next: NDF_BOUND - Enquire the pixel-index bounds of an NDF
Up: FORTRAN ROUTINE DESCRIPTIONS
Previous: NDF_BEGIN - Begin a new NDF context


Starlink User Note 33
R.F. Warren-Smith
11th January 2000
E-mail:rfws@star.rl.ac.uk

Copyright © 2000 Council for the Central Laboratory of the Research Councils