ants.label.make_points_image

make_points_image(pts, target, radius=5)[source]

Create label image from physical space points

Creates spherical points in the coordinate space of the target image based on the n-dimensional matrix of points that the user supplies. The image defines the dimensionality of the data so if the input image is 3D then the input points should be 2D or 3D.

ANTsR function: makePointsImage

Parameters:
  • pts (numpy.ndarray) – input points

  • target (ants.core.ANTsImage) – Image defining target space

  • radius (int) – radius for the points

Return type:

ants.core.ANTsImage

Example

>>> import ants
>>> import pandas as pd
>>> mni = ants.image_read(ants.get_data('mni'))
>>> powers_pts = pd.read_csv(ants.get_data('powers_mni_itk'))
>>> powers_labels = ants.make_points_image(powers_pts.iloc[:,:3].values, mni, radius=3)