def load_files(files_or_objects)
      files_or_objects = [files_or_objects] unless files_or_objects.is_a?(Array)
      status = true
      message = ""
      objects = Array.new
      abstracts = Array.new
      id = 1
      @presentation_contexts = Hash.new
      files_or_objects.each do |file_or_object|
        if file_or_object.is_a?(String)
          # Temporarily increase the log threshold to suppress messages from the DObject class:
          client_level = logger.level
          logger.level = Logger::FATAL
          dcm = DObject.read(file_or_object)
          # Reset the logg threshold:
          logger.level = client_level
          if dcm.read_success
            # Load the DICOM object:
            objects << dcm
          else
            status = false
            message = "Failed to read a DObject from this file: #{file_or_object}"
          end
        elsif file_or_object.is_a?(DObject)
          # Load the DICOM object and its abstract syntax:
          abstracts << file_or_object.value("0008,0016")
          objects << file_or_object
        else
          status = false
          message = "Array contains invalid object: #{file_or_object.class}."
        end
      end
      # Extract available transfer syntaxes for the various sop classes found amongst these objects
      syntaxes = Hash.new
      objects.each do |dcm|
        sop_class = dcm.value("0008,0016")
        if sop_class
          transfer_syntaxes = available_transfer_syntaxes(dcm.transfer_syntax)
          if syntaxes[sop_class]
            syntaxes[sop_class] << transfer_syntaxes
          else
            syntaxes[sop_class] = transfer_syntaxes
          end
        else
          status = false
          message = "Missing SOP Class UID. Unable to transmit DICOM object"
        end
        # Extract the unique variations of SOP Class and syntaxes and construct the presentation context hash:
        syntaxes.each_pair do |sop_class, ts|
          selected_transfer_syntaxes = ts.flatten.uniq
          @presentation_contexts[sop_class] = Hash.new
          selected_transfer_syntaxes.each do |syntax|
            @presentation_contexts[sop_class][id] = {:transfer_syntaxes => [syntax]}
            id += 2
          end
        end
      end
      return objects, status, message
    end
def load_files(files_or_objects)
      files_or_objects = [files_or_objects] unless files_or_objects.is_a?(Array)
      status = true
      message = ""
      objects = Array.new
      abstracts = Array.new
      id = 1
      @presentation_contexts = Hash.new
      files_or_objects.each do |file_or_object|
        if file_or_object.is_a?(String)
          # Temporarily increase the log threshold to suppress messages from the DObject class:
          client_level = logger.level
          logger.level = Logger::FATAL
          dcm = DObject.read(file_or_object)
          # Reset the logg threshold:
          logger.level = client_level
          if dcm.read_success
            # Load the DICOM object:
            objects << dcm
          else
            status = false
            message = "Failed to read a DObject from this file: #{file_or_object}"
          end
        elsif file_or_object.is_a?(DObject)
          # Load the DICOM object and its abstract syntax:
          abstracts << file_or_object.value("0008,0016")
          objects << file_or_object
        else
          status = false
          message = "Array contains invalid object: #{file_or_object.class}."
        end
      end
      # Extract available transfer syntaxes for the various sop classes found amongst these objects
      syntaxes = Hash.new
      objects.each do |dcm|
        sop_class = dcm.value("0008,0016")
        if sop_class
          transfer_syntaxes = available_transfer_syntaxes(dcm.transfer_syntax)
          if syntaxes[sop_class]
            syntaxes[sop_class] << transfer_syntaxes
          else
            syntaxes[sop_class] = transfer_syntaxes
          end
        else
          status = false
          message = "Missing SOP Class UID. Unable to transmit DICOM object"
        end
        # Extract the unique variations of SOP Class and syntaxes and construct the presentation context hash:
        syntaxes.each_pair do |sop_class, ts|
          selected_transfer_syntaxes = ts.flatten.uniq
          @presentation_contexts[sop_class] = Hash.new
          selected_transfer_syntaxes.each do |syntax|
            @presentation_contexts[sop_class][id] = {:transfer_syntaxes => [syntax]}
            id += 2
          end
        end
      end
      return objects, status, message
    end
Loads one or more DICOM files.
 Returns an array of DObject instances, an array of unique abstract syntaxes found among the files, a status boolean and a message string.

 === Parameters

 * <tt>files_or_objects</tt> -- A single file path or an array of paths, or a DObject or an array of DObject instances.