def image=(image)
      raise ArgumentError, "Expected one of the supported image classes: #{valid_image_objects} (got #{image.class})" unless valid_image_objects.include?(image.class.to_s)
      # Export to pixels using the proper image processor:
      pixels = export_pixels(image, photometry)
      # Encode and write to the Pixel Data Element:
      self.pixels = pixels
    end
def image=(image)
      raise ArgumentError, "Expected one of the supported image classes: #{valid_image_objects} (got #{image.class})" unless valid_image_objects.include?(image.class.to_s)
      # Export to pixels using the proper image processor:
      pixels = export_pixels(image, photometry)
      # Encode and write to the Pixel Data Element:
      self.pixels = pixels
    end
Encodes pixel data from a (Magick) image object and writes it to the
 pixel data element (7FE0,0010).

 Because of pixel value issues related to image objects (images don't like
 signed integers), and the possible difference between presentation values
 and raw pixel values, the use of image=() may result in pixel data where the
 integer values differs somewhat from what is expected. Use with care! For
 precise pixel value processing, use the Array and NArray based pixel data methods instead.

 @param [MagickImage] image the image to be assigned to the pixel data element