next up previous 231
Next: Accessing multiple images
Up: Examples of using IMG from C
Previous: Using ``images'' which are not 2-dimensional

Accessing images using different data types

So far all the example shown access the image data assuming a type of float. IMG can also access data in other useful types. A list of these is shown elsewhere. Among the possible calls are:
   double *dPtr;
   imgInD( "image", &nx, &ny, &dPtr, istat );
   float *fPtr;
   imgInF( "image", &nx, &ny, &fPtr, istat );
   short *sPtr;
   imgInS( "image", &nx, &ny, &sPtr, istat );
   int *iPtr;
   imgInI( "image", &nx, &ny, &iPtr, istat );

Requirements for data types and dimensionalities can be mixed as in:

   imgIn1D( 'spectrum', &nx, &ip, istat )
   imgMod2I( 'image', &nx, &ny, &ip, istat )
   imgNew3S( 'cube', &nx, &ny, &nz, ip, istat )
   imgIn2F( 'image', &nx, &ny, &ip, istat )



next up previous 231
Next: Accessing multiple images
Up: Examples of using IMG from C
Previous: Using ``images'' which are not 2-dimensional

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