def images(options={})
      images = Array.new
      if exists?(PIXEL_TAG)
        # Gather the pixel data strings, and pick a single frame if indicated by options:
        strings = image_strings(split_to_frames=true)
        strings = [strings[options[:frame]]] if options[:frame]
        if compression?
          # Decompress, either to numbers (RLE) or to an image object (image based compressions):
          if [TXS_RLE].include?(transfer_syntax)
            pixel_frames = Array.new
            strings.each {|string| pixel_frames << decode_rle(num_cols, num_rows, string)}
          else
            images = decompress(strings) || Array.new
            logger.warn("Decompressing pixel values has failed (unsupported transfer syntax: '#{transfer_syntax}' - #{LIBRARY.uid(transfer_syntax) ? LIBRARY.uid(transfer_syntax).name : 'Unknown transfer syntax!'})") unless images.length > 0
          end
        else
          # Uncompressed: Decode to numbers.
          pixel_frames = Array.new
          strings.each {|string| pixel_frames << decode_pixels(string)}
        end
        if pixel_frames
          images = Array.new
          pixel_frames.each do |pixels|
            # Pixel values and pixel order may need to be rearranged if we have color data:
            pixels = process_colors(pixels) if color?
            if pixels
              images << read_image(pixels, num_cols, num_rows, options)
            else
              logger.warn("Processing pixel values for this particular color mode failed, unable to construct image(s).")
            end
          end
        end
      end
      return images
    end
def images(options={})
      images = Array.new
      if exists?(PIXEL_TAG)
        # Gather the pixel data strings, and pick a single frame if indicated by options:
        strings = image_strings(split_to_frames=true)
        strings = [strings[options[:frame]]] if options[:frame]
        if compression?
          # Decompress, either to numbers (RLE) or to an image object (image based compressions):
          if [TXS_RLE].include?(transfer_syntax)
            pixel_frames = Array.new
            strings.each {|string| pixel_frames << decode_rle(num_cols, num_rows, string)}
          else
            images = decompress(strings) || Array.new
            logger.warn("Decompressing pixel values has failed (unsupported transfer syntax: '#{transfer_syntax}' - #{LIBRARY.uid(transfer_syntax) ? LIBRARY.uid(transfer_syntax).name : 'Unknown transfer syntax!'})") unless images.length > 0
          end
        else
          # Uncompressed: Decode to numbers.
          pixel_frames = Array.new
          strings.each {|string| pixel_frames << decode_pixels(string)}
        end
        if pixel_frames
          images = Array.new
          pixel_frames.each do |pixels|
            # Pixel values and pixel order may need to be rearranged if we have color data:
            pixels = process_colors(pixels) if color?
            if pixels
              images << read_image(pixels, num_cols, num_rows, options)
            else
              logger.warn("Processing pixel values for this particular color mode failed, unable to construct image(s).")
            end
          end
        end
      end
      return images
    end
Extracts an array of image objects, created from the encoded pixel data using
 the image related elements in the DICOM object.

 @note Creates an array of image objects in accordance with the selected image processor. Available processors are :rmagick and :mini_magick.

 @param [Hash] options the options to use for extracting the images
 @option options [Integer] :frame makes the method return an array containing only the image object corresponding to the specified frame number
 @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<MagickImage, NilClass>] an array of image objects, alternatively an empty array (if no image present or image decode failed)

 @example Retrieve the pixel data as RMagick image objects
   images = dcm.images
 @example Retrieve the pixel data as RMagick image objects, remapped to presentation values (but without any leveling)
   images = dcm.images(:remap => true)
 @example Retrieve the pixel data as RMagick image objects, remapped to presentation values and leveled using the default center/width values in the DICOM object
   images = dcm.images(:level => true)
 @example Retrieve the pixel data as RMagick image objects, remapped to presentation values, leveled with the specified center/width values and using numerical array for the rescaling (~twice as fast)
   images = dcm.images(:level => [-200,1000], :narray => true)