Method: DICOM::DClient#send

Defined in:
lib/dicom/d_client.rb

#send(files) ⇒ Object

Sends one or more DICOM files to a service class provider (SCP/PACS).

Examples:

Send a DICOM file to a storage server

node.send('my_file.dcm')

Parameters:



342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
# File 'lib/dicom/d_client.rb', line 342

def send(files)
  # Prepare the DICOM object(s):

  objects, success, message = load_files(files)
  if success
    # Open a DICOM link:

    establish_association
    if association_established?
      if request_approved?
        # Continue with our c-store operation, since our request was accepted.

        # Handle the transmission:

        perform_send(objects)
      end
    end
    # Close the DICOM link:

    establish_release
  else
    # Failed when loading the specified parameter as DICOM file(s). Will not transmit.

    logger.error(message)
  end
end