DataFusionTools.visualization
DataFusionTools.visualization#
- class datafusiontools.visualisation.voxeltiles.VoxelTiles(xyz: numpy.ndarray, dxdydz: numpy.ndarray, values: dict, result: int, cmap: Optional[Union[str, matplotlib.colors.Colormap]] = None)[source]#
Bases:
object
3d B3dm tiling from numpy array
- property enu_ecf_transform: numpy.ndarray#
- property voxel_models: numpy.ndarray#
Numpy.array of object containing n*2 open3d.TriangleMesh voxel and values.
- write_tiles(directory: str = '.')[source]#
Generate Cesium b3dm tiles (https://github.com/CesiumGS/3d-tiles/tree/main/specification) from voxels
- directory: str
Output directory path
- class datafusiontools.visualisation.cesium.CesiumViewer(result_folder: str, port: int = 8787)[source]#
Bases:
object
Cesium online viewer for datafusion results
- generate_voxel_tiles(xyz: numpy.ndarray, dxdydz: numpy.ndarray, values: dict, result: int, name: str, cmap: Optional[Union[str, matplotlib.colors.Colormap]] = None)[source]#
Create VoxelTiles object and attach it to the Cesium viewer.
- xyz: array-like, shape (n, 3)
Voxel points positions.
- dxdydz: array-like, shape (n, 3)
Voxels size
- values: dict
dictionary holding voxel data / metadata
- result: int
key of the column of the values you want to visualize
- cmapstr or ~matplotlib.colors.Colormap, default: ‘gist_rainbow’
A .Colormap instance or registered colormap name. cmap is only used if c is an array of floats.
- property voxel_tiles#
- class datafusiontools.visualisation.serve.CesiumServer(tiles_directory: Optional[str] = None, port: int = 8787)[source]#
Bases:
object
Serve cesium viewer locally :param port: pick the port to serve the cesium viewer (default port 8787)
- property tiles_path#
- property tiles_served#
- property tiles_url#
- class datafusiontools.visualisation.serve.ServerThread(app, port)[source]#
Bases:
threading.Thread
Create a thread to run server in backgound :param port: a flask app :param app: pick the port to serve the cesium viewer (default port 8787)
- run()[source]#
Method representing the thread’s activity.
You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.