next up previous contents
Next: ZOOM Image Zoom Function Up: Image Display Functions Previous: WINLEV Image Window-Level Function   Contents

Subsections

IMAGE Image Display Function

Usage

Displays a scalar (grayscale or colormapped) image on the currently active image window. The general syntax for its use is

  image(x,zoom)

where x is a 2-Dimensional numeric matrix containing the image to be displayed. The data is autoscaled by default to occupy the entire colormap or grayscale-space. The image must be real valued, but can be non-square. The second argument zoom is optional, and specifies the initial zoom of the image. For more details of how the zoom works, see the zoom command.

Example

In this example, we create an image that is 512 x 512 pixels square, and set the background to a noise pattern. We set the central 128 x 256 pixels to be white.

--> x = rand(512);
--> x((-64:63)+256,(-128:127)+256) = 1.0;
--> figure
ans = 
  <int32>  - size: [1 1]
             1  
--> image(x)

The resulting image looks like:

8702



Samit K. Basu 2005-03-16