def pixels(options={})
      pixels = nil
      if exists?(PIXEL_TAG)
        # For now we only support returning pixel data of the first frame, if the image is located in multiple pixel data items:
        if compression?
          pixels = decompress(image_strings.first)
        else
          pixels = decode_pixels(image_strings.first)
        end
        if pixels
          # Remap the image from pixel values to presentation values if the user has requested this:
          if options[:remap] or options[:level]
            if options[:narray]
              # Use numerical array (faster):
              pixels = process_presentation_values_narray(pixels, -65535, 65535, options[:level]).to_a
            else
              # Use standard Ruby array (slower):
              pixels = process_presentation_values(pixels, -65535, 65535, options[:level])
            end
          end
        else
          logger.warn("Decompressing the Pixel Data failed. Pixel values can not be extracted.")
        end
      end
      return pixels
    end
def pixels(options={})
      pixels = nil
      if exists?(PIXEL_TAG)
        # For now we only support returning pixel data of the first frame, if the image is located in multiple pixel data items:
        if compression?
          pixels = decompress(image_strings.first)
        else
          pixels = decode_pixels(image_strings.first)
        end
        if pixels
          # Remap the image from pixel values to presentation values if the user has requested this:
          if options[:remap] or options[:level]
            if options[:narray]
              # Use numerical array (faster):
              pixels = process_presentation_values_narray(pixels, -65535, 65535, options[:level]).to_a
            else
              # Use standard Ruby array (slower):
              pixels = process_presentation_values(pixels, -65535, 65535, options[:level])
            end
          end
        else
          logger.warn("Decompressing the Pixel Data failed. Pixel values can not be extracted.")
        end
      end
      return pixels
    end
Extracts the Pixel Data values in an ordinary Ruby Array.
 Returns nil if no pixel data is present, and false if it fails to retrieve pixel data which is present.

 The returned array does not carry the dimensions of the pixel data:
 It is put in a one dimensional Array (vector).

 @param [Hash] options the options to use for extracting the pixel data
 @option options [TrueClass, Array<Integer>] :level if true, window leveling is performed using default values from the DICOM object, or if an array ([center, width]) is specified, these custom values are used instead
 @option options [Boolean] :narray if true, forces the use of NArray for the pixel remap process (for faster execution)
 @option options [Boolean] :remap if true, the returned pixel values are remapped to presentation values
 @return [Array, NilClass, FalseClass] an Array of pixel values, alternatively nil (if no image present) or false (if image decode failed)

 @example Simply retrieve the pixel data
   pixels = dcm.pixels
 @example Retrieve the pixel data remapped to presentation values according to window center/width settings
   pixels = dcm.pixels(:remap => true)
 @example Retrieve the remapped pixel data while using numerical array (~twice as fast)
   pixels = dcm.pixels(:remap => true, :narray => true)