trescope.toolbox

trescope.toolbox. color_from_label ( label : int , max_label : int = 100 ) → int [source]

Generate color by integer .

Parameters
  • label – int label

  • max_label – max label number

Returns

color

trescope.toolbox. simpleDisplayOutputs ( rows : int , columns : int , output_ids : Union [ None , List [ str ] ] = None ) → trescope.core.OutputManager.DisplayOutputManager [source]

Convenient method to specify uniform , square display output .

Parameters
  • rows – row number

  • columns – column number

  • output_ids – ID of output , default None

Returns

trescope.DisplayOutputManager

trescope.toolbox. simpleFileOutputs ( directory : str , fileNames : List [ Union [ str , int ] ] , widthPixel : int = 640 , heightPixel : int = 480 ) → trescope.core.OutputManager.FileOutputManager [source]

Convenient method to specify file output.

Parameters
  • directory – directory to generate files

  • fileNames – names of file

  • widthPixel – width of image file in pixel

  • heightPixel – height of image file in pixel

Returns

trescope.FileOutputManager

trescope.toolbox. visualize_front3d_mesh ( 0, scene_dict, focus_meshes_fetcher=lambda mesh_table: mesh_table[mesh_table['type'].isin(['Floor'])], ignore_meshes_fetcher=lambda mesh_table: mesh_table[mesh_table['type'].isin(['WallOuter', 'WallInner'])] ) [source]
Parameters
  • output_id – output id

  • scene – scene

  • focus_meshes_fetcher – focus_meshes_fetcher

  • ignore_meshes_fetcher – ignore_meshes_fetcher

  • material_when_unavailable – material_when_unavailable