code: def vector_to_rgb(image):
      
      if image.pixeltype != 'unsigned char':
          image = image.clone('unsigned char')
      idim = image.dimension
      libfn = utils.get_lib_fn('VectorToRgb%i' % idim)
      new_ptr = libfn(image.pointer)
      new_img = iio.ANTsImage(pixeltype=image.pixeltype, dimension=image.dimension, 
                              components=3, pointer=new_ptr, is_rgb=True)
      return new_img
docs: Convert an Vector ANTsImage to a RGB ANTsImage
  
      Arguments
      ---------
      image : ANTsImage
          RGB image to be converted
  
      Returns
      -------
      ANTsImage
  
      Example
      -------
      >>> import ants
      >>> img = ants.image_read(ants.get_data('r16'), pixeltype='unsigned char')
      >>> img_rgb = img.clone().scalar_to_rgb()
      >>> img_vec = img_rgb.rgb_to_vector()
      >>> img_rgb2 = img_vec.vector_to_rgb()