See the documentation on Virtual Bag Generator Block for a description of the Shape List data format and the module ShapeListHandler.
__init__() | Constructor |
create_sim_object() | Function to create an SL object dictionary to add to a shape list |
get_table_img() | generates an SL object dictionary for the scanner table |
get_tray_img() | generates an SL object dictionary for the scanner tray |
get_bag_boundary() | generates an SL object dictionary for the bag boundary |
Desc. | Constructor for the Shape List Handler |
Args | - |
Returns | - |
Desc. | Function to create an object dictionary to add to the shape list. To using this function to create a shape, check the geom key values carefully as they differ for each primtive shape- see Shape List data format for details. |
Args | geom: dict - geometric specs for object shape |
shape: str {'E' | 'C' | 'Y' | 'M' | 'B' | 'S'} - type of object shape | |
obj_material: str - material assigned to object | |
label: int - the label for the obje in the ground truth label image | |
lqd_flag: bool - set to True if the object is a liquid filled container | |
lqd_param: dict - dictionary containing specs for the liquid filled container. (See Shape Lists) | |
Returns | SL dictionary |
Desc. | Function to create a default scanner table object in the image. |
Args | image_dim: int - CT image dimension |
table_thickness: int - thickness of the scanner table | |
material: str - material assigned to the table | |
Returns | tray_img: 2D ndarray - a 2D cross section image of the table |
table_dict: dict - an SL dictionary for the table |
Desc. | Function to create a default scanner tray object in the image. |
Args | orig_dim: int - CT image dimension |
tray_thickness: int - thickness of the scanner tray | |
material: str - material assigned to the tray | |
Returns | tray_img: 2D ndarray - a 2D cross section image of the tray |
tray_dict: dict - an SL dictionary for the tray |
Desc. | Function to create a default scanner table object in the image. |
Args | orig_dim: int - CT image dimension |
bag_dim: tuple dimensions of the bag: (bag_size, bag_thickness) | |
table_thickness: int - thickness of the scanner table | |
material: str - material assigned to the table | |
Returns | bb_img: 2D ndarray - a 2D cross section image of the bag |
bag_dict: dict - an SL dictionary for the bag | |
img_ctr: tuple - center of the bag |