src.utils.ctransf.class_setter
Classes
|
- class src.utils.ctransf.class_setter.ClassSetter(**kwargs)
- Author:
Alberto M. Esmoris Pena
Class to set the classification field of a point cloud from any other field.
See
ClassTransformer.- Variables:
fname (str) – The name of the feature whose values must be assigned to the classification field. Note that classes must be represented as integer numbers, i.e., the attribute identified with fname must be convertible to integer without loss of precision.
- static extract_ctransf_args(spec)
Extract the arguments to initialize/instantiate a ClassSetter.
- Parameters:
spec – The key-word specification containing the arguments.
- Returns:
The arguments to initialize/instantiate a ClassSetter.
- __init__(**kwargs)
Initialize/instantiate a ClassSetter.
- Parameters:
kwargs – The attributes for the ClassSetter.
- transform(y, f=None, out_prefix=None)
The fundamental transformation logic defining the class transformer.
- Parameters:
y (
np.ndarrayor None) – The point-wise labels.f (
np.ndarray) – The point-wise feature values that will be converted to an integer type so they can be assigned to the labels.out_prefix (str or None) – It will not be used for nothing.
- Returns:
The transformed input feature ready to be assigned to the classification field of a point cloud.
- Return type:
np.ndarray
- transform_pcloud(pcloud, out_prefix=None)