|
| 1 | +{ |
| 2 | + "cells": [ |
| 3 | + { |
| 4 | + "cell_type": "markdown", |
| 5 | + "id": "ece79f11-ab6e-447e-a843-c646d27e9a46", |
| 6 | + "metadata": {}, |
| 7 | + "source": [ |
| 8 | + "# Stream and visualize the Autzen point cloud\n", |
| 9 | + "\n", |
| 10 | + "The original data used in this notebook can be [found here](https://github.com/PDAL/data/tree/master/autzen) and has a BSD license as [described here](https://pdal.io/en/latest/copyright.html#overall-pdal-license-bsd)." |
| 11 | + ] |
| 12 | + }, |
| 13 | + { |
| 14 | + "cell_type": "code", |
| 15 | + "execution_count": null, |
| 16 | + "id": "34b3f824-b53c-4d9d-b4d2-8e900ff7252f", |
| 17 | + "metadata": {}, |
| 18 | + "outputs": [], |
| 19 | + "source": [ |
| 20 | + "from pybabylonjs import Show as show, ImageFeatureType" |
| 21 | + ] |
| 22 | + }, |
| 23 | + { |
| 24 | + "cell_type": "markdown", |
| 25 | + "id": "5c4ec8bd-7b69-48f0-b70d-9977e07d2d7d", |
| 26 | + "metadata": {}, |
| 27 | + "source": [ |
| 28 | + "To stream and view point cloud data from a TileDB array a `token` is needed: \n", |
| 29 | + "* [sign up for a TileDB account](https://cloud.tiledb.com/auth/signup)\n", |
| 30 | + "\n", |
| 31 | + "When running this notebook locally:\n", |
| 32 | + "* [create a token as described here](https://docs.tiledb.com/cloud/how-to/account/create-api-tokens)\n", |
| 33 | + "* uncomment the below cell and add your token (`<token>`)\n", |
| 34 | + "* run the below cells\n", |
| 35 | + "\n", |
| 36 | + "When running this notebook on TileDB Cloud:\n", |
| 37 | + "* the token will be automatically loaded\n", |
| 38 | + "* remove the token from the list of parameters of `show.image`\n", |
| 39 | + "* run the below cells" |
| 40 | + ] |
| 41 | + }, |
| 42 | + { |
| 43 | + "cell_type": "code", |
| 44 | + "execution_count": null, |
| 45 | + "id": "6ce7f8c7-0805-444b-93ad-3b7554de8304", |
| 46 | + "metadata": {}, |
| 47 | + "outputs": [], |
| 48 | + "source": [ |
| 49 | + "# token = \"...\"" |
| 50 | + ] |
| 51 | + }, |
| 52 | + { |
| 53 | + "cell_type": "code", |
| 54 | + "execution_count": null, |
| 55 | + "id": "19e3204d-d1a1-4ab8-a888-5833ed44e41d", |
| 56 | + "metadata": {}, |
| 57 | + "outputs": [], |
| 58 | + "source": [ |
| 59 | + "show.image(token=token,\n", |
| 60 | + " engine_api=\"WEBGPU\",\n", |
| 61 | + " name_space=\"TileDB-Inc\",\n", |
| 62 | + " array_name=\"tiledb://TileDB-Inc/ee5eae5f-9f68-4471-a762-99e966cada1c\",\n", |
| 63 | + " point_group_names=[\"tiledb://TileDB-Inc/a89e17ae-4fc7-433f-a2ee-856ee0ecf216\"],\n", |
| 64 | + " tile_uris=[\"https://api.pdok.nl/kadaster/3d-basisvoorziening/ogc/v1_0/collections/terreinen/3dtiles\"],\n", |
| 65 | + " default_channels=[{\"index\": 1, \"intensity\": 2000}, {\"index\": 2, \"intensity\": 2000}, {\"index\": 3, \"intensity\": 2000}],\n", |
| 66 | + " scene_config={\n", |
| 67 | + " \"pointConfigs\":[{\n", |
| 68 | + " \"pickable\": False,\n", |
| 69 | + " \"features\":[\n", |
| 70 | + " {\n", |
| 71 | + " \"name\": \"Height\",\n", |
| 72 | + " \"type\": ImageFeatureType.RGB.value[0],\n", |
| 73 | + " \"interleaved\": True,\n", |
| 74 | + " \"attributes\":[\n", |
| 75 | + " {\n", |
| 76 | + " \"name\": \"Red\",\n", |
| 77 | + " \"normalize\": True,\n", |
| 78 | + " \"normalizationWindow\": { \"min\": 0, \"max\": 255 }\n", |
| 79 | + " },\n", |
| 80 | + " {\n", |
| 81 | + " \"name\": \"Green\",\n", |
| 82 | + " \"normalize\": True,\n", |
| 83 | + " \"normalizationWindow\": { \"min\": 0, \"max\": 255 }\n", |
| 84 | + " },\n", |
| 85 | + " {\n", |
| 86 | + " \"name\": \"Blue\",\n", |
| 87 | + " \"normalize\": True,\n", |
| 88 | + " \"normalizationWindow\": { \"min\": 0, \"max\": 255 }\n", |
| 89 | + " }\n", |
| 90 | + " ]\n", |
| 91 | + " }\n", |
| 92 | + " ]\n", |
| 93 | + " }]\n", |
| 94 | + " },\n", |
| 95 | + " width = 1200,\n", |
| 96 | + " height = 700)" |
| 97 | + ] |
| 98 | + } |
| 99 | + ], |
| 100 | + "metadata": { |
| 101 | + "kernelspec": { |
| 102 | + "display_name": "Python 3 (ipykernel)", |
| 103 | + "language": "python", |
| 104 | + "name": "python3" |
| 105 | + }, |
| 106 | + "language_info": { |
| 107 | + "codemirror_mode": { |
| 108 | + "name": "ipython", |
| 109 | + "version": 3 |
| 110 | + }, |
| 111 | + "file_extension": ".py", |
| 112 | + "mimetype": "text/x-python", |
| 113 | + "name": "python", |
| 114 | + "nbconvert_exporter": "python", |
| 115 | + "pygments_lexer": "ipython3", |
| 116 | + "version": "3.12.6" |
| 117 | + } |
| 118 | + }, |
| 119 | + "nbformat": 4, |
| 120 | + "nbformat_minor": 5 |
| 121 | +} |
0 commit comments