The IDLffDICOM::Init function method creates a new IDLffDICOM object and optionally reads the specified file as defined in the IDLffDICOM::Read method.

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


Result = OBJ_NEW( 'IDLffDICOM' [, Filename] [, PROPERTY=value])

or

Result = Obj->[IDLffDICOM::]Init([Filename] [, 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

An optional scalar string argument containing the full path and filename of a DICOM v3.0 Part 10 file to open, read into memory, then close, when the object is created. It is the same as calling: result->Read(Filename).

Note: you can use the VERBOSE keyword to get more information about issues that occur during reading.

Keywords


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

Examples


; Create a DICOM object:
obj = OBJ_NEW( 'IDLffDICOM' )
 
; Create a DICOM object and read in a DICOM file named
; mr_brain.dcm:
obj = OBJ_NEW( 'IDLffDICOM', $
   FILEPATH('mr_brain.dcm', SUBDIRECTORY=['examples', 'data']))
 
; Create a DICOM object and allow the user to choose a DICOM file
; to be read:
obj = OBJ_NEW( 'IDLffDICOM', DIALOG_PICKFILE(FILTER='*'))

Version History


5.2

Introduced