src.utils.ptransf.point_transformer

Classes

PointTransformer(**kwargs)

Exceptions

PointTransformerException([message])

exception src.utils.ptransf.point_transformer.PointTransformerException(message='')
Author:

Alberto M. Esmoris Pena

Class for exceptions related to point transformation components. See VL3DException

__init__(message='')
class src.utils.ptransf.point_transformer.PointTransformer(**kwargs)
Author:

Alberto M. Esmoris Pena

Class for point transformation operations.

Variables:
  • fnames (None or list of str) – The names of the features involved in the transformation (by default None, which will lead to considering all the features in the point cloud).

  • _fnames (np.ndarray of str) – A cache with the names of the features involved in the CURRENT transformation. It can be different to fnames. For example, when fnames is None, _fnames will contain the name for each feature in the point cloud. It must not be used outside the scope of an ongoing transformation (consistency is not guaranteed).

static extract_ptransf_args(spec)
__init__(**kwargs)

Initialize/instantiate a PointTransformer.

Parameters:

kwargs – The attributes for the PointTransformer.

abstractmethod transform(X=None, F=None, y=None, yhat=None, out_prefix=None, **kwargs)

The fundamental transformation logic defining the point transformer.

Parameters:
  • X (np.ndarray or None) – The structure space matrix of the point cloud to be transformed.

  • F (np.ndarray or None) – The feature space matrix of the point cloud to be transformed.

  • y (np.ndarray or None) – The references (if any) of the point cloud to be transformed.

  • yhat (np.ndarray or None) – The predictions (if any) on the point cloud to be transformed.

  • out_prefix (str or None) – The output prefix (OPTIONAL). It might be used to particularize output paths, if any.

  • kwargs (dict) – Further key-word arguments defining the transformation.

transform_pcloud(pcloud, out_prefix=None, **kwargs)

Apply the transform method to a point cloud.

See point_transformer.PointTransformer.transform().

Parameters:
  • pcloud (PointCloud) – The point cloud to be transformed.

  • out_prefix (str or None) – The output prefix (OPTIONAL). It might be used to particularize output paths, if any.

  • kwargs (dict) – Further key-word arguments defining the transformation.

Returns:

Whatever the transform method of the non-abstract derived class returns. Thus, in general, this method will need to be overridden to properly return a point cloud (see PointCloud).