next up previous 231
Next: Using ``images'' which are not 2-dimensional
Up: More advanced image access
Previous: More advanced image access

Getting workspace

Any reasonably complex program sooner or later needs to be able to store image information between processing stages. This program snippet (from an example called shadow.f - see §[*]) shows you how to create a temporary image for this purpose:
*  Access the input image.
      CALL IMG_IN( 'IN', NX, NY, IPIN, ISTAT )
      ...
*  Get an image-sized piece of workspace.
      CALL IMG_TMP( 'TEMP', NX, NY, IPTEMP, ISTAT )           [1]
      ...
*  Free all the images (this deletes the temporary image).
      CALL IMG_FREE( '*', ISTAT )                             [2]
The following notes refer to the numbered statements:
1.
The call to IMG_TMP creates a temporary image of the size you specify (in this case the same size as the input image). You will not be prompted for a file name for a temporary image, and no entry is needed for it in the program's interface file.

2.
The call to IMG_FREE will delete the temporary image.



next up previous 231
Next: Using ``images'' which are not 2-dimensional
Up: More advanced image access
Previous: More advanced image access

IMG Simple Image Data Access
Starlink User Note 160
P.W. Draper
R.F. Warren-Smith
3 March 2003
E-mail:P.W.Draper@durham.ac.uk

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