Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


Harris Geospatial / Docs Center / IDL Reference / DICOM Toolkit / IDLffDicomExCfg::Init

IDLffDicomExCfg::Init

IDLffDicomExCfg::Init

The IDLffDicomExCfg::Init function method initializes the IDLffDicomExCfg object. The IDLffDicomExCfg object allows you to set and retrieve the values of IDL DICOM Network Service configuration parameters. See Using IDL DICOM Network Services for more information.

By default, the IDLffDicomExCfg::Init method creates an association between the returned object and the user’s local DICOM Network Services configuration file. Use the SYSTEM keyword to create an object associated with the system-wide configuration file. See Local Versus System Configuration for additional information on the difference between the system and local configurations.

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('IDLffDicomExCfg' [, /SYSTEM])

or

Result = Obj->[IDLffDicomExCfg::]Init( [, /SYSTEM] )
(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.

Note: This feature requires an additional-cost license key to access the functionality. If a valid feature license can not be found, an error is returned. For more information, contact your Exelis VIS sales representative or technical support.

Arguments


None

Keywords


SYSTEM

Set this keyword to create an IDLffDicomExCfg object associated with the DICOM Network Services system configuration file. By default, the created object is associated with the user’s local configuration file.

Example


The following example code shows how to write and read a configuration file.

Note: Executing these commands will change the directory used by your local Storage SCP service. If you have already configured this value, be sure to change it back to your original value before retrieving files.

; Create a new object associated with the system configuration file.
ocfg = OBJ_NEW('IDLffDicomExCfg', /SYSTEM)
 
; Stop the Storage SCP Service before making changes.
status = ocfg->StorageScpService('stop')
PRINT, 'Stopping Storage SCP. Status: ', status
WAIT, 5
 
; Add a Storage SCP Application Entity.
ocfg->SetApplicationEntity, 'my_stor_scp_aen', $
   'my_stor_scp', 'my_machine_name', 2510,  $
   'Storage_SCP_Service_List', 'Storage_SCP'
 
; Set the Storage SCP service to the entry created above.
ocfg->SetValue, 'StorScpServiceAE', 'my_stor_scp_aen'
 
; Set the local IDL Storage SCP directory to the 'MyStorScpDir'
; directory under the user’s HOME directory.
myStorScpDir = GETENV('HOME') + PATH_SEP() + 'MyStorScpDir'
ocfg->SetValue, 'StorScpDir', myStorScpDir
 
; Save the changes and write the configuration file back to disk.
ocfg->Commit
 
; Restart the Storage SCP Service.
status = ocfg->StorageScpService('start')
PRINT, 'Starting Storage SCP. Status: ', status
WAIT, 5
status = ocfg->StorageScpService('status')
PRINT, 'Storage SCP Status: ', status
 
; Retrieve the definition for the Application Entity
; created above.
defAE = ocfg->GetApplicationEntity('my_stor_scp_aen')
HELP, defAE, /STRUCTURE
 
; Retrieve the name of the Application Entity for the 
; Storage SCP service.
serviceAE = ocfg->GetValue('StorScpServiceAE')
PRINT, serviceAE
 
; Retrieve the directory to be used by the Storage SCP service.
scpDir = ocfg->GetValue('StorScpDir')
PRINT, scpDir
 
; Destroy the configuration object.
OBJ_DESTROY, ocfg

Version History


6.3

Introduced



© 2017 Exelis Visual Information Solutions, Inc. |  Legal
My Account    |    Buy    |    Contact Us