-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add WebGPU support for ImageViewer (#65)
* Upgrade TileDB-Viz to version 1.0.3-alpha.6, add additional parameters for image viewer * Bump TileDB-Viz version
- Loading branch information
1 parent
afa26ca
commit 3c0db48
Showing
7 changed files
with
218 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"id": "ece79f11-ab6e-447e-a843-c646d27e9a46", | ||
"metadata": {}, | ||
"source": [ | ||
"# Stream and visualize the Autzen point cloud\n", | ||
"\n", | ||
"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)." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "34b3f824-b53c-4d9d-b4d2-8e900ff7252f", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"from pybabylonjs import Show as show, ImageFeatureType" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "5c4ec8bd-7b69-48f0-b70d-9977e07d2d7d", | ||
"metadata": {}, | ||
"source": [ | ||
"To stream and view point cloud data from a TileDB array a `token` is needed: \n", | ||
"* [sign up for a TileDB account](https://cloud.tiledb.com/auth/signup)\n", | ||
"\n", | ||
"When running this notebook locally:\n", | ||
"* [create a token as described here](https://docs.tiledb.com/cloud/how-to/account/create-api-tokens)\n", | ||
"* uncomment the below cell and add your token (`<token>`)\n", | ||
"* run the below cells\n", | ||
"\n", | ||
"When running this notebook on TileDB Cloud:\n", | ||
"* the token will be automatically loaded\n", | ||
"* remove the token from the list of parameters of `show.image`\n", | ||
"* run the below cells" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "6ce7f8c7-0805-444b-93ad-3b7554de8304", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"# token = \"...\"" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"id": "19e3204d-d1a1-4ab8-a888-5833ed44e41d", | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"show.image(token=token,\n", | ||
" engine_api=\"WEBGPU\",\n", | ||
" name_space=\"TileDB-Inc\",\n", | ||
" array_name=\"tiledb://TileDB-Inc/ee5eae5f-9f68-4471-a762-99e966cada1c\",\n", | ||
" point_group_names=[\"tiledb://TileDB-Inc/a89e17ae-4fc7-433f-a2ee-856ee0ecf216\"],\n", | ||
" tile_uris=[\"https://api.pdok.nl/kadaster/3d-basisvoorziening/ogc/v1_0/collections/terreinen/3dtiles\"],\n", | ||
" default_channels=[{\"index\": 1, \"intensity\": 2000}, {\"index\": 2, \"intensity\": 2000}, {\"index\": 3, \"intensity\": 2000}],\n", | ||
" scene_config={\n", | ||
" \"pointConfigs\":[{\n", | ||
" \"pickable\": False,\n", | ||
" \"features\":[\n", | ||
" {\n", | ||
" \"name\": \"Height\",\n", | ||
" \"type\": ImageFeatureType.RGB.value[0],\n", | ||
" \"interleaved\": True,\n", | ||
" \"attributes\":[\n", | ||
" {\n", | ||
" \"name\": \"Red\",\n", | ||
" \"normalize\": True,\n", | ||
" \"normalizationWindow\": { \"min\": 0, \"max\": 255 }\n", | ||
" },\n", | ||
" {\n", | ||
" \"name\": \"Green\",\n", | ||
" \"normalize\": True,\n", | ||
" \"normalizationWindow\": { \"min\": 0, \"max\": 255 }\n", | ||
" },\n", | ||
" {\n", | ||
" \"name\": \"Blue\",\n", | ||
" \"normalize\": True,\n", | ||
" \"normalizationWindow\": { \"min\": 0, \"max\": 255 }\n", | ||
" }\n", | ||
" ]\n", | ||
" }\n", | ||
" ]\n", | ||
" }]\n", | ||
" },\n", | ||
" width = 1200,\n", | ||
" height = 700)" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.12.6" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.