IDLgrImage

Superclasses | Creation | Properties | Methods | Examples | Version History

An image object represents a mapping from a two-dimensional array of data values to a two dimensional array of pixel colors, resulting in a flat 2-D-scaled version of the image, drawn at Z = 0.

An IDLgrImage object is an atomic graphic object; it is one of the basic drawable elements of the IDL Object Graphics system, and it is not a container for other objects.

Beginning with IDL 6.2, IDLgrImage renders an image by default using a texture-mapped polygon on graphics devices using the RGB color model, for a significant increase in functionality and performance. IDL continues to use a 2D bitmap primitive to draw an image on devices using the indexed color model, since texture mapping is not available on such devices.

Note
With the texture-mapping performance improvements of 6.2, interpolation results may differ slightly across graphics devices and from pre-6.2 results. See INTERPOLATE for details.

Transformations of IDLgrImage Objects

By default, IDLgrImage objects are drawn at Z=0 and are positioned and sized with respect to two points:

p1 = [LOCATION(0), LOCATION(1), 0]  
p2 = [LOCATION(0) + DIMENSION(0), LOCATION(1) + DIMENSION(1), 0].   

where LOCATION and DIMENSION are properties of the image object. These two points are transformed in three dimensions, and then projected onto the screen to form the opposite corners of a 2-D rectangle using screen space points designated as p1' and p2':

[ [p1'[0], p1'[1]], [[p2'[0], p1'[1]],  
   [[p2'[0], p2'[1]], [[p1'[0], p2'[1]] ]  

The image data is drawn on the display as a 2-D image within this 2-D rectangle whose sides are parallel to the screen sides. The image data is scaled in two dimensions (not rotated) to fit into this projected rectangle and then drawn with Z buffering disabled.

To draw an image with the current full 3D transformation (the same way other objects such as polygons are transformed), set the IDLgrImage TRANSFORM_MODE property to 1. See the IDLgrImage TRANSFORM_MODE property for details.

Objects are drawn to a destination device in the order that they are added (via the Add method) to the model, view, or scene that contains them. By default, image objects do not take into account the depth locations of other objects that may be included in the view object unless you enable depth testing (see "DEPTH_TEST_DISABLE" (IDL Reference Guide) for details).

This means that objects that are drawn to the destination object (window or printer) after the image is drawn will appear to be in front of the image, even if they are located behind the image object. Since the image is drawn by default with depth testing disabled, you can think of the image primitive as `painting' the image onto the screen without regard for other objects that might already have been drawn there.

This behavior can be changed by enabling depth testing to make the image primitive behave like other primitives such as polygons when they are drawn with depth testing enabled.

See Displaying Multiple Images in Object Graphics (Object Programming) for an example using the LOCATION property.

Superclasses

IDLitComponent

Creation

See IDLgrImage::Init.

Properties

Objects of this class have the following properties. See IDLgrImage Properties for details on individual properties.

In addition, objects of this class inherit the properties of all superclasses of this class.

Methods

This class has the following methods:

In addition, this class inherits the methods of its superclasses (if any).

Examples

For image object examples see Working with Image Objects (Object Programming). Also see Mapping an Image onto Elevation Data (Image Processing in IDL) for a texture mapping example.

Version History

5.0

Introduced

5.6

Added CLIP_PLANES property

6.2

Removed NO_COPY property and documented it as an IDLgrImage::Init keyword.

Added ALPHA_CHANNEL, DEPTH_OFFSET, RENDER_METHOD, TILE_COLOR, TILE_CURRENT_LEVEL, TILE_DIMENSIONS, TILE_LEVEL_MODE, TILE_NUM_LEVELS, TILE_SHOW_BOUNDARIES, TILED_IMAGE_DIMENSIONS, TILING, and TRANSFORM_MODE properties

Added DeleteTileData and SetTileData methods

6.4

Added IMAGE_1D, INTERNAL_DATA_TYPE, SHADER, and TILE_BORDER_SIZE properties

Added ReadFilteredData and TileDataLoaded methods