class documentation
class ComponentGroup:
Constructor: ComponentGroup(name, cloud, plane, grid_density, ...)
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 |
Apply the primitives to the binary image to obtain the key points |
| Method | process |
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 |
number of squares in image space per square unit in point cloud space |
| Instance Variable | grid |
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 |
Removes noise
| Returns | |
np.ndarray | An array of size (n,3) giving a binary image of the cross-section of the component group. Values are 1 or 0. |
Apply the primitives to the binary image to obtain the key points
| Parameters | |
img:np.ndarray | An array of size (n,3) giving a binary image of the cross-section of the component group. Values are 1 or 0. |
| Returns | |
list | A list of lists, with each list containing the ordered set of key points for a specific component |
Obtain the binary image of the cross section from the point cloud
| Returns | |
np.ndarray | An array of size (n,3) giving a binary image of the cross-section of the component group. Values are 1 or 0. |
Thins lines with mutliple pixels in width
| Returns | |
np.ndarray | An array of size (n,3) giving a binary image of the cross-section of the component group. Values are 1 or 0. |
an array of size (2,2) describing the location of the bottom-left and top-right corners of the grid in grid space