class_docstr: A collection of points described by coordinates.
  
  Parameters
  ----------
  coords : array-like
    (*N*, *n*) array with *N* being points and columns their *n*-dimensional coordinates
  affine : :class:`numpy.ndarray`
    Affine transform to be applied to coordinates array
  homogeneous : :class:`bool`
    Indicate whether the provided coordinates are homogeneous,
    i.e., homogeneous 3D coordinates have the form ``(x, y, z, 1)``
class_docstr_tok: ["A","collection","of","points","described","by","coordinates",".","Parameters","--","--","--","--","--","coords",":","array-like","(","*","N","*",",","*","n","*",")","array","with","*","N","*","being","points","and","columns","their","*","n","*","-dimensional","coordinates","affine",":",":","class",":","`","numpy.ndarray","`","Affine","transform","to","be","applied","to","coordinates","array","homogeneous",":",":","class",":","`","bool","`","Indicate","whether","the","provided","coordinates","are","homogeneous",",","i.e.",",","homogeneous","3D","coordinates","have","the","form","``","(","x",",","y",",","z",",","1",")","``"]
docstr: Retrieve the coordinates
  
  Parameters
  ----------
  as_homogeneous : :class:`bool`
      Return homogeneous coordinates if ``True``, or Cartesian
      coordinates if ``False``.
  
  name : :class:`str`
      Select a particular coordinate system if more than one may exist.
      By default, `None` is equivalent to `"world"` and corresponds to
      an RAS+ coordinate system.
docstr_tok: ["Retrieve","the","coordinates","Parameters","--","--","--","--","--","as_homogeneous",":",":","class",":","`","bool","`","Return","homogeneous","coordinates","if","``","True","``",",","or","Cartesian","coordinates","if","``","False","``",".","name",":",":","class",":","`","str","`","Select","a","particular","coordinate","system","if","more","than","one","may","exist",".","By","default",",","`","None","`","is","equivalent","to","`","``","world","''","`","and","corresponds","to","an","RAS+","coordinate","system","."]
code: def get_coords(self, *, as_homogeneous: bool = False):
      """Retrieve the coordinates
  
      Parameters
      ----------
      as_homogeneous : :class:`bool`
          Return homogeneous coordinates if ``True``, or Cartesian
          coordinates if ``False``.
  
      name : :class:`str`
          Select a particular coordinate system if more than one may exist.
          By default, `None` is equivalent to `"world"` and corresponds to
          an RAS+ coordinate system.
      """
      ident = np.allclose(self.affine, np.eye(self.affine.shape[0]))
      if self.homogeneous == as_homogeneous and ident:
          return np.asanyarray(self.coordinates)
      coords = self._homogeneous_coords()
      if not ident:
          coords = (self.affine @ coords.T).T
      if not as_homogeneous:
          coords = coords[:, :-1]
      return coords
  
imports: from __future__ import annotations
  import math
  import typing
  from dataclasses import dataclass, replace
  import numpy
  from nibabel.casting import able_int_type
  from nibabel.fileslice import strided_scalar
  from nibabel.spatialimages import SpatialImage
label_desc: Use image node_id 6 for calling the Pointset obj's underlying member method code with example usage: obj.get_coords() and returns: coords, np