code: def apply(self, fn):
          
          this_array = self.numpy()
          new_array = fn(this_array)
          return self.new_image_like(new_array)
docs: Apply an arbitrary function to ANTsImage.
  
          Args
          ----
          fn : python function or lambda
              function to apply to ENTIRE image at once
  
          Returns
          -------
          ANTsImage
              image with function applied to it