Voxelization#

Converts point data into a voxelized image for visulalization and analysis.

search_indices_rectangle(radius, kernel=None)[source]#

Creates all relative indices within a rectangle.

Arguments

radiustuple or float

Radius of the sphere of the search index list.

Returns

indicesarray

Array of ints of relative indices for the search area voxels.

search_indices_sphere(radius, kernel=None)[source]#

Creates all relative indices within a sphere of specified radius.

Arguments

radiustuple or int

Radius of the sphere of the search index list.

Returns

indicesarray

Array of ints of relative indices for the search area voxels.

voxelize(source, sink=None, shape=None, dtype=None, weights=None, method='sphere', radius=(1, 1, 1), kernel=None, processes=None, verbose=False)[source]#

Converts a list of points into an volumetric image array

Arguments

sourcestr, array or Source

Source of point of nxd coordinates.

sinkstr, array or None

The sink for the voxelized image, if None return array.

shapetuple or None

Shape of the final voxelized data. If None, deterimine from points.

dtypedtype or None

Optional data type of the sink.

weightsarray or None

Weight array of length n for each point. If None, use uniform weights.

methodstr

Method for voxelization: ‘sphere’, ‘rectangle’ or ‘pixel’.

radiustuple

Radius of the voxel region to integrate over.

kernelfunction

Optional function of distance to set weights in the voxelization.

processesint or None

Number of processes to use.

verbosebool

If True, print progress info.

Returns

sinkstr, array

Volumetric data of voxelied point data.