.. highlightlang:: us .. index:: XYZFilterCallback .. _xyzfiltercallback: XYZFilterCallback ================= .. us.tag XYZFilterCallback ENGLISH New5102 :ref:`XYZFilterCallback` will be invoked in :ref:`XYZCreate` to remove unwanted data points. .. function:: idx = XYZFilterCallback(rvX, rvY, rvZ) .. us.return **Return Value** *idx* is a vector with indices. Only the data points rvX[idx], rvY[idx], rvZ[idx] are used to create the dataset. If idx[1] equals 0 the dataset will not be created. .. us.params **Parameters** .. uparam:: rvX *rvX* is a vector with x-coordinates. .. uparam:: rvY *rvY* is a vector with y-coordinates. .. uparam:: rvZ *rvZ* is a vector with z-coordinates. .. us.comment **Comment** This is the standard implementation of the function. 100 by 100 bins are used. For each bin the median value (center value) will be returned. :ref:`reduce3d` is called twice. The second time the number of bins is specified as a negative number. This will move the bins by half of the bin width. This avoids problems with points that are close to the bin border in neighboring bins. :: def XYZFilterCallback(x, y, z) { idx = reduce3d(x, y, z, 100, "median"); idx2 = reduce3d(x[idx], y[idx], z[idx], -100, "median"); return idx[idx2]; } .. us.example **Example** Siehe :ref:`reduce3d`. .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - 5.10.2 - New. .. seealso:: :ref:`overview-xyz-datasets`, :ref:`XYZCreate`, :ref:`reduce3d` :sub:`id-153479`