next up previous 231
Next: Accessing images using different data types
Up: More advanced image access
Previous: Getting workspace

Using ``images'' which are not 2-dimensional

IMG subroutines can access ``image'' data with between 1 and 3 dimensions. This allows you to handle spectra (1-D) and cubes (3-D) as well as traditional 2-dimensional images. The subroutine calls needed are almost identical to the normal ones (above) that assume 2 dimensions. They differ only in having more or less arguments for the dimension sizes. The following illustrates the possibilities:
      CALL IMG_IN1( 'SPECTRUM', NX, IP, ISTAT )
      CALL IMG_IN2( 'IMAGE', NX, NY, IP, ISTAT )
      CALL IMG_IN3( 'CUBE', NX, NY, NZ, IP, ISTAT )
Note how the number of dimensions is specified by appending a number to the routine name, and how IMG_IN2 is just a synonym for IMG_IN (2 dimensions are assumed if you do not say otherwise).

As well as accessing input images, there are equivalent routines for performing most other IMG operations on images with between 1 and 3 dimensions. For instance, the following would create a new 3-dimensional image:

      CALL IMG_NEW3( 'CUBE', NX, NY, NZ, IP, ISTAT )

When accessing an existing image with (say) 2 dimensions, you will also be able to access an appropriate slice from (say) a 3-dimensional image if you specify this when you are prompted for the image name (see elsewhere).



next up previous 231
Next: Accessing images using different data types
Up: More advanced image access
Previous: Getting workspace

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