ants.ops.reflect_image

reflect_image(image, axis=None, tx=None, metric='mattes')[source]

Reflect an image along an axis

ANTsR function: reflectImage

Parameters:
  • image (ants.core.ANTsImage) – image to reflect

  • axis (integer (optional)) – which dimension to reflect across, numbered from 0 to imageDimension-1

  • tx (string (optional)) – transformation type to estimate after reflection

  • metric (str) – similarity metric for image registration. see antsRegistration.

Return type:

ants.core.ANTsImage

Example

>>> import ants
>>> fi = ants.image_read( ants.get_ants_data('r16'), 'float' )
>>> axis = 2
>>> asym = ants.reflect_image(fi, axis, 'Affine')['warpedmovout']
>>> asym = asym - fi