class documentation

Container class that holds multiple members of a single component type.

This class groups together all components of a particular type (i.g. an object named tbeams that holds all tbeams from the scene). It contains both the three-dimensional point cloud and two dimensional slice, and the key points of each component

Method __init__ Undocumented
Method denoise Removes noise
Method get_contours Apply the primitives to the binary image to obtain the key points
Method process_grid Obtain the binary image of the cross section from the point cloud
Method thin Thins lines with mutliple pixels in width
Instance Variable cloud point cloud of shape (n,3) of all constituent components
Instance Variable cntrs list of lists of key points that describe the entire component_group
Instance Variable grid a (2,n) array giving a binary image of the cross-section of the component group. Values are 1 or 0.
Instance Variable grid_density number of squares in image space per square unit in point cloud space
Instance Variable grid_dim an array of size (2,2) describing the location of the bottom-left and top-right corners of the grid in grid space
Instance Variable name the component type. If the type is known, type-specific code will be used to provide the key points from the primtive. Else, a fallback function will be used
Instance Variable plane desired cutting plane
Instance Variable tolerance amount of deviation from the cutting plane permitted
def __init__(self, name, cloud, plane, grid_density, tolerance, grid_dim):

Undocumented

def denoise(self, grid):

Removes noise

Returns
np.ndarrayAn array of size (n,3) giving a binary image of the cross-section of the component group. Values are 1 or 0.
def get_contours(self, img):

Apply the primitives to the binary image to obtain the key points

Parameters
img:np.ndarrayAn array of size (n,3) giving a binary image of the cross-section of the component group. Values are 1 or 0.
Returns
listA list of lists, with each list containing the ordered set of key points for a specific component
def process_grid(self):

Obtain the binary image of the cross section from the point cloud

Returns
np.ndarrayAn array of size (n,3) giving a binary image of the cross-section of the component group. Values are 1 or 0.
def thin(self, grid):

Thins lines with mutliple pixels in width

Returns
np.ndarrayAn array of size (n,3) giving a binary image of the cross-section of the component group. Values are 1 or 0.
cloud: numpy.ndarray =

point cloud of shape (n,3) of all constituent components

cntrs: list =

list of lists of key points that describe the entire component_group

grid: numpy.ndarray =

a (2,n) array giving a binary image of the cross-section of the component group. Values are 1 or 0.

grid_density: int =

number of squares in image space per square unit in point cloud space

grid_dim: numpy.ndarray =

an array of size (2,2) describing the location of the bottom-left and top-right corners of the grid in grid space

name: str =

the component type. If the type is known, type-specific code will be used to provide the key points from the primtive. Else, a fallback function will be used

plane: float =

desired cutting plane

tolerance: float =

amount of deviation from the cutting plane permitted