def check_header
      # According to the official DICOM standard, a DICOM file shall contain 128 consequtive (zero) bytes,
      # followed by 4 bytes that spell the string 'DICM'. Apparently, some providers seems to skip this in their DICOM files.
      # Check that the string is long enough to contain a valid header:
      if @str.length < 132
        # This does not seem to be a valid DICOM string and so we return.
        return nil
      else
        @stream.skip(128)
        # Next 4 bytes should spell "DICM":
        identifier = @stream.decode(4, "STR")
        @header_length += 132
        if identifier != "DICM" then
          # Header signature is not valid (we will still try to parse it is a DICOM string though):
          logger.warn("This string does not contain the expected DICOM header. Will try to parse the string anyway (assuming a missing header).")
          # As the string is not conforming to the DICOM standard, it is possible that it does not contain a
          # transfer syntax element, and as such, we attempt to choose the most probable encoding values here:
          @explicit = false
          return false
        else
          # Header signature is valid:
          @signature = true
          return true
        end
      end
    end
def check_header
      # According to the official DICOM standard, a DICOM file shall contain 128 consequtive (zero) bytes,
      # followed by 4 bytes that spell the string 'DICM'. Apparently, some providers seems to skip this in their DICOM files.
      # Check that the string is long enough to contain a valid header:
      if @str.length < 132
        # This does not seem to be a valid DICOM string and so we return.
        return nil
      else
        @stream.skip(128)
        # Next 4 bytes should spell "DICM":
        identifier = @stream.decode(4, "STR")
        @header_length += 132
        if identifier != "DICM" then
          # Header signature is not valid (we will still try to parse it is a DICOM string though):
          logger.warn("This string does not contain the expected DICOM header. Will try to parse the string anyway (assuming a missing header).")
          # As the string is not conforming to the DICOM standard, it is possible that it does not contain a
          # transfer syntax element, and as such, we attempt to choose the most probable encoding values here:
          @explicit = false
          return false
        else
          # Header signature is valid:
          @signature = true
          return true
        end
      end
    end
Checks for the official DICOM header signature.

 @return [Boolean] true if the proper signature is present, false if not, and nil if the string was shorter then the length of the DICOM signature