The IDLffJPEG2000::Init() function method initializes an IDLffJPEG2000 object that can be used to read (decode) image data from a JPEG2000 image file, or write (encode) image data to a JPEG2000 image file.

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('IDLffJPEG2000' , Filename [, /PERSISTENT] [PROPERTY value])

or

Result  =  Obj->[IDLffJPEG2000::]Init(Filename [, /PERSISTENT] [, PROPERTY value])     (In a lifecycle method only.)

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


Filename

Set this argument to a scalar string containing the path and filename of a file containing JPEG 2000 compressed image data to be accessed through this object. If the file type suffix is .jp2 or .jpx, case insensitive, the file is a JP2 file. Otherwise the file contains a raw JPEG2000 code stream.

Note: The value specified by the Filename argument is used to initialize the value of the FILENAME property of the IDLffJPEG2000 object.

Keywords


In addition to the following keyword, any property listed under IDLffJPEG2000 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.

PERSISTENT

A boolean value that indicates whether the image contained in the object may be accessed more than once. If set to zero, the image contained within the object may not be accessed more than once, and data are discarded whenever possible, minimizing memory usage. The default is PERSISTENT=1, which allows access to the image multiple times. This keyword is ignored if the file is opened for writing

Version History


6.1

Introduced