def summary
      # FIXME: Perhaps this method should be split up in one or two separate methods
      # which just builds the information arrays, and a third method for printing this to the screen.
      sys_info = Array.new
      info = Array.new
      # Version of Ruby DICOM used:
      sys_info << "Ruby DICOM version:   #{VERSION}"
      # System endian:
      cpu = (CPU_ENDIAN ? "Big Endian" : "Little Endian")
      sys_info << "Byte Order (CPU):     #{cpu}"
      # Source (file name):
      if @source
        if @source == :str
          source = "Binary string #{@read_success ? '(successfully parsed)' : '(failed to parse)'}"
        else
          source = "File #{@read_success ? '(successfully read)' : '(failed to read)'}: #{@source}"
        end
      else
        source = 'Created from scratch'
      end
      info << "Source:               #{source}"
      # Modality:
      modality = (LIBRARY.uid(value('0008,0016')) ? LIBRARY.uid(value('0008,0016')).name : "SOP Class unknown or not specified!")
      info << "Modality:             #{modality}"
      # Meta header presence (Simply check for the presence of the transfer syntax data element), VR and byte order:
      ts_status = self['0002,0010'] ? '' : ' (Assumed)'
      ts = LIBRARY.uid(transfer_syntax)
      explicit = ts ? ts.explicit? : true
      endian = ts ? ts.big_endian? : false
      meta_comment = ts ? "" : " (But unknown/invalid transfer syntax: #{transfer_syntax})"
      info << "Meta Header:          #{self['0002,0010'] ? 'Yes' : 'No'}#{meta_comment}"
      info << "Value Representation: #{explicit ? 'Explicit' : 'Implicit'}#{ts_status}"
      info << "Byte Order (File):    #{endian ? 'Big Endian' : 'Little Endian'}#{ts_status}"
      # Pixel data:
      pixels = self[PIXEL_TAG]
      unless pixels
        info << "Pixel Data:           No"
      else
        info << "Pixel Data:           Yes"
        # Image size:
        cols = (exists?("0028,0011") ? self["0028,0011"].value : "Columns missing")
        rows = (exists?("0028,0010") ? self["0028,0010"].value : "Rows missing")
        info << "Image Size:           #{cols}*#{rows}"
        # Frames:
        frames = value("0028,0008") || "1"
        unless frames == "1" or frames == 1
          # Encapsulated or 3D pixel data:
          if pixels.is_a?(Element)
            frames = frames.to_s + " (3D Pixel Data)"
          else
            frames = frames.to_s + " (Encapsulated Multiframe Image)"
          end
        end
        info << "Number of frames:     #{frames}"
        # Color:
        colors = (exists?("0028,0004") ? self["0028,0004"].value : "Not specified")
        info << "Photometry:           #{colors}"
        # Compression:
        compression = (ts ? (ts.compressed_pixels? ? ts.name : 'No') : 'No' )
        info << "Compression:          #{compression}#{ts_status}"
        # Pixel bits (allocated):
        bits = (exists?("0028,0100") ? self["0028,0100"].value : "Not specified")
        info << "Bits per Pixel:       #{bits}"
      end
      # Print the DICOM object's key properties:
      separator = "-------------------------------------------"
      puts "System Properties:"
      puts separator + "\n"
      puts sys_info
      puts "\n"
      puts "DICOM Object Properties:"
      puts separator
      puts info
      puts separator
      return info
    end
def summary
      # FIXME: Perhaps this method should be split up in one or two separate methods
      # which just builds the information arrays, and a third method for printing this to the screen.
      sys_info = Array.new
      info = Array.new
      # Version of Ruby DICOM used:
      sys_info << "Ruby DICOM version:   #{VERSION}"
      # System endian:
      cpu = (CPU_ENDIAN ? "Big Endian" : "Little Endian")
      sys_info << "Byte Order (CPU):     #{cpu}"
      # Source (file name):
      if @source
        if @source == :str
          source = "Binary string #{@read_success ? '(successfully parsed)' : '(failed to parse)'}"
        else
          source = "File #{@read_success ? '(successfully read)' : '(failed to read)'}: #{@source}"
        end
      else
        source = 'Created from scratch'
      end
      info << "Source:               #{source}"
      # Modality:
      modality = (LIBRARY.uid(value('0008,0016')) ? LIBRARY.uid(value('0008,0016')).name : "SOP Class unknown or not specified!")
      info << "Modality:             #{modality}"
      # Meta header presence (Simply check for the presence of the transfer syntax data element), VR and byte order:
      ts_status = self['0002,0010'] ? '' : ' (Assumed)'
      ts = LIBRARY.uid(transfer_syntax)
      explicit = ts ? ts.explicit? : true
      endian = ts ? ts.big_endian? : false
      meta_comment = ts ? "" : " (But unknown/invalid transfer syntax: #{transfer_syntax})"
      info << "Meta Header:          #{self['0002,0010'] ? 'Yes' : 'No'}#{meta_comment}"
      info << "Value Representation: #{explicit ? 'Explicit' : 'Implicit'}#{ts_status}"
      info << "Byte Order (File):    #{endian ? 'Big Endian' : 'Little Endian'}#{ts_status}"
      # Pixel data:
      pixels = self[PIXEL_TAG]
      unless pixels
        info << "Pixel Data:           No"
      else
        info << "Pixel Data:           Yes"
        # Image size:
        cols = (exists?("0028,0011") ? self["0028,0011"].value : "Columns missing")
        rows = (exists?("0028,0010") ? self["0028,0010"].value : "Rows missing")
        info << "Image Size:           #{cols}*#{rows}"
        # Frames:
        frames = value("0028,0008") || "1"
        unless frames == "1" or frames == 1
          # Encapsulated or 3D pixel data:
          if pixels.is_a?(Element)
            frames = frames.to_s + " (3D Pixel Data)"
          else
            frames = frames.to_s + " (Encapsulated Multiframe Image)"
          end
        end
        info << "Number of frames:     #{frames}"
        # Color:
        colors = (exists?("0028,0004") ? self["0028,0004"].value : "Not specified")
        info << "Photometry:           #{colors}"
        # Compression:
        compression = (ts ? (ts.compressed_pixels? ? ts.name : 'No') : 'No' )
        info << "Compression:          #{compression}#{ts_status}"
        # Pixel bits (allocated):
        bits = (exists?("0028,0100") ? self["0028,0100"].value : "Not specified")
        info << "Bits per Pixel:       #{bits}"
      end
      # Print the DICOM object's key properties:
      separator = "-------------------------------------------"
      puts "System Properties:"
      puts separator + "\n"
      puts sys_info
      puts "\n"
      puts "DICOM Object Properties:"
      puts separator
      puts info
      puts separator
      return info
    end
Gathers key information about the DObject as well as some system data, and prints this information to the screen.
 This information includes properties like encoding, byte order, modality and various image properties.

 @return [Array<String>] strings describing the properties of the DICOM object