IDLgrVolume::Init

The IDLgrVolume::Init function method initializes the volume object. At least one volume must be specified, via arguments or keywords.

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.

Note: IDL converts and stores volume data in a BYTE array. Thus, all incoming volume data is converted to BYTE type. This could alter the volume data values if the incoming data cannot accurately be stored as BYTE data.

Syntax

Obj = OBJ_NEW('IDLgrVolume' [, vol0[, vol1 [, vol2 [, vol3]]]] [, PROPERTY=value] [, /NO_COPY])

or

Result = Obj->[IDLgrVolume::]Init([vol0 [, vol1 [, vol2 [, vol3]]]] [, PROPERTY=value] [, /NO_COPY])     (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

Note: The values specified by the vol0, vol1, vol2, and vol3 arguments are used to initialize the values of the DATA0, DATA1, DATA2, and DATA3 properties of the IDLgrVolume object, respectively.

vol0

A three-dimensional array (dx, dy, dz) which specifies a data volume.

vol1

A three-dimensional array (dx, dy, dz) which specifies a data volume.

vol2

A three-dimensional array (dx, dy, dz) which specifies a data volume.

vol3

A three-dimensional array (dx, dy, dz) which specifies a data volume.

Note: If two or more of the above arguments are specified, they must have matching dimensions.

Note On Maximum Renderable Volume Size

On 64-bit platforms, each dimension (dx, dy, dz) of the volume can contain up to a maximum of 232 elements, with a limit of 264 total voxels. On 32-bit platforms, the volume can contain a maximum of 232 voxels.

Keywords

Any property listed under IDLgrVolume 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.

NO_COPY

If this keyword is set to a non-zero value, it relocates the volume data from the input variable to the volume object, leaving the input variable (vol0, vol1, vol2, vol3, or DATA0, DATA1, DATA2, or DATA3) undefined. Only these data-related arguments and properties are affected by the NO_COPY keyword.

vol = BYTARR(30,30,30, /NOZERO)

oVol = OBJ_NEW('IDLgrVolume', vol, /NO_COPY)

 

; Verify the data no longer exists in the input variable.

HELP, vol

; IDL prints VOL UNDEFINED = <Undefined>

If this keyword is omitted, the input volume data will be duplicated and a copy will be stored in the object.

Version History

5.0

Introduced

6.2

Added NO_COPY keyword