Method: DICOM::DClient#get_image

Defined in:
lib/dicom/d_client.rb

#get_image(path, options = {}) ⇒ Object

Note:

This method has never actually been tested, and as such, it is probably not working! Feedback is welcome.

Retrieves a DICOM file from a service class provider (SCP/PACS).

Instance level attributes for this procedure:

  • ‘0008,0018’ (SOP Instance UID)

  • ‘0008,0052’ (Query/Retrieve Level)

  • ‘0020,000D’ (Study Instance UID)

  • ‘0020,000E’ (Series Instance UID)

Examples:

Retrieve a file as specified by its UIDs

node.get_image('c:/dicom/', '0008,0018' => sop_uid, '0020,000D' => study_uid, '0020,000E' => series_uid)

Parameters:

  • path (String)

    the directory where incoming files will be saved

  • options (Hash) (defaults to: {})

    the options to use for retrieving the DICOM object

Options Hash (options):

  • 'GGGG,EEEE' (String)

    a tag and value pair to be used for the procedure

[View source]

266
267
268
269
270
271
272
273
274
275
# File 'lib/dicom/d_client.rb', line 266

def get_image(path, options={})
  # Study Root Query/Retrieve Information Model - GET:
  set_default_presentation_context("1.2.840.10008.5.1.4.1.2.2.3")
  # Transfer the current options to the data_elements hash:
  set_command_fragment_get
  # Prepare data elements for this operation:
  set_data_fragment_get_image
  set_data_options(options)
  perform_get(path)
end