NumpyConverter Class Reference

Converting points including their attributes into numpy arrays. More...

+ Inheritance diagram for NumpyConverter:

Static Public Member Functions

def asNumpyDict (self, *args, **kwargs)
 
def compareWithNumpyArray (obj, translator, leaf, classMatrix, mapCol, map, helper, invert, filter=None)
 
def createNumpyDict (rowCount, layout, withCoordinates=True)
 
def fillNumpyDict (self, *args, **kwargs)
 
def setFromNumpyDict (obj, translators, leaf, layout, filter=None)
 

Detailed Description

Converting points including their attributes into numpy arrays.

Member Function Documentation

◆ asNumpyDict()

def asNumpyDict (   self,
args,
**  kwargs 
)
static
  possible calls:
  asNumpyDict(leaf: PointIndexLeaf, layout: AddInfoLayout, withCoordinates: bool, filter: Filter)
  asNumpyDict(leaf: PointIndexLeaf, layout: AddInfoLayout, mapCol: AddInfoLayout, map: IndexMapSet, helper: IndexHelperSet, invert: bool, withCoordinates: bool, filter: Filter)

  @param self (type: object) self pointer
  @param *args  (type: list) mandatory parameter
  @param ** kwargs  (type: dict) mandatory parameter
  @return (type: object)

◆ compareWithNumpyArray()

def compareWithNumpyArray (   obj,
  translator,
  leaf,
  classMatrix,
  mapCol,
  map,
  helper,
  invert,
  filter = None 
)
static
  \brief integral comparison of a specific attribute columns with a given numpy array

  The results are stored in a class comparison matrix
  @param[in] obj              numpy array
  @param[in] translator       python dictionary for translating input values (can be empty)
  @param[in] leaf             point index leaf that should be converter
  @param[in] classMatrix      classification matrix storing cross validation
  @param[in] mapCol           attribute (single column layout) for accessing the relevant map index
  @param[in] map              index map object describing the object indices for selection
  @param[in] helper           index helper object for keeping track of traversed map index (can be empty. the object is extended automatically)
  @param[in] invert           if false all objects listed by the index map are inserted to the numpy dict. Otherwise all objects that are NOT listed are inserted.
  @param[in] filter           optional filter to subselect the points

◆ createNumpyDict()

def createNumpyDict (   rowCount,
  layout,
  withCoordinates = True 
)
static
  \brief Creates a python dictionary mapping columns labels (x,y,z or attribute name) to correctly sized column numpy arrays

  @param[in]  rowCount         size of column numpy arrays
  @param[in]  layout           defines the attributes that should be transferred
  @param[in]  withCoordinates  flag if numpy arrays for coordinates are desired
  @return python dictionary object

◆ fillNumpyDict()

def fillNumpyDict (   self,
args,
**  kwargs 
)
static
  possible calls:
  fillNumpyDict(obj: object, rowIdx: int, leaf: PointIndexLeaf, filter: Filter)
  fillNumpyDict(obj: object, rowIdx: int, mapCol: AddInfoLayout, map: IndexMapSet, helper: IndexHelperSet, invert: bool, leaf: PointIndexLeaf, filter: Filter)

  @param self (type: object) self pointer
  @param *args  (type: list) mandatory parameter
  @param ** kwargs  (type: dict) mandatory parameter
  @return (type: int)

◆ setFromNumpyDict()

def setFromNumpyDict (   obj,
  translators,
  leaf,
  layout,
  filter = None 
)
static
  \brief set attributes of a point index leaf object from a numpy dictionary

  The optional translator objects can be used to map input values to 'translated' values. If a values is not specified in the corresponding                              dictionary object, this value will be treated as null. Since the functionality allows setting multiple attributes at once, an empty list                              (which disables the translator functionality) or a list containing the same number of dictionary objects as provided by the data object and                              the layout columns. The function uses the layout column order for selection the correct translator object.
  @param[in] obj              python dictionary of numpy column arrays
  @param[in] translators      list of python dictionary for translating input values (can be empty)
  @param[in] leaf             point index leaf that should be converter
  @param[in] layout           defines the attributes that should be transferred
  @param[in] filter           optional filter to subselect the points
  @return filled dictionary object