Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]

IDLgrImage::Init


Syntax | Return Value | Arguments | Keywords | Version History

The IDLgrImage::Init function method initializes the image object.

Note
Init methods are special lifecycle methods, and as such cannot be called outside the context of object creation. This means that in most cases, you cannot call the Init method directly. There is one exception to this rule: If you write your own subclass of this class, you can call the Init method from within the Init method of the subclass.

Syntax

Obj = OBJ_NEW('IDLgrImage' [, ImageData] [, PROPERTY=value])

or

Result = Obj->[IDLgrImage::]Init([ImageData] [, PROPERTY=value]) (Only in a subclass' Init method.)

Return Value

When this method is called indirectly, as part of the call to the OBJ_NEW function, the return value is an object reference to the newly-created object.

When called directly within a subclass Init method, the return value is 1 if initialization was successful, or zero otherwise.

Arguments

ImageData

An array of data values to be displayed as an image. If this argument is not already of byte type, it is converted to byte type when the image object is created. Since IDL maintains the image data using the byte type, the input data values should range from 0 through 255. Image objects can have a single channel (one value per pixel-greyscale or color indexed), two channels (greyscale and alpha), three channels (red, green, and blue), or four channels (red, green, blue, and alpha). The alpha channel, if present, determines the transparency of the pixel. The BLEND_FUNCTION property controls the interpretation of the alpha channel values. With channels, the data value of 0 specifies minimum intensity and the data value of 255 specifies maximum intensity. The alpha channel values are also specified in the image data in the range 0 through 255, with an image data value of 0 corresponding to an alpha blend factor of 0 and an image data value of 255 corresponding to an alpha blend factor of 1.0. ImageData can be any of the following, where n is the width of the image, and m is the height:

If the array has more than one channel, the interleave is specified by the INTERLEAVE property.

Keywords

Any property listed under IDLgrImage Properties that contains the word "Yes" in the "Init" column of the properties table can be initialized during object creation using this method. To initialize the value of a property, specify the property name as a keyword set equal to the appropriate property value.

All other keywords are passed to the superclass of this object.

Version History

Introduced: 5.0

CLIP_PLANES keyword added: 5.6


Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]