The IDLffDICOM::Init function method creates a new IDLffDICOM object and optionally reads the specified file as defined in the IDLffDICOM::Read method.
| Note |
Result = OBJ_NEW( 'IDLffDICOM' [, Filename] [, PROPERTY=value])
or
Result = Obj->[IDLffDICOM::]Init([Filename] [, PROPERTY=value]) (Only in a subclass' Init method.)
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.
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).
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.
; Create a DICOM object: obj = OBJ_NEW( 'IDLffDICOM' ) ; Create a DICOM object and read in a DICOM file named ct_head.dcm ; under Microsoft Windows: obj = OBJ_NEW( 'IDLffDICOM', $ 'c:\rsi\idl52\examples\data\mr_brain.dcm' ) ; Create a DICOM object and allow the user to choose a DICOM file ; to be read: obj = OBJ_NEW( 'IDLffDICOM', DIALOG_PICKFILE(FILTER='*'))
Introduced: 5.2