{ "cells": [ { "cell_type": "markdown", "id": "a099b12a", "metadata": {}, "source": [ "# 1st notebook" ] }, { "cell_type": "code", "execution_count": null, "id": "2f8d1da2", "metadata": {}, "outputs": [], "source": [ "%pip install git+https://github.com/nndt-team/nndt.git\n", "%pip install ipyvtklink" ] }, { "cell_type": "code", "execution_count": 14, "id": "8452034d", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'0.0.3b1'" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import nndt\n", "import nndt.space2 as spc\n", "from nndt.datasets import ACDC\n", "\n", "nndt.__version__" ] }, { "cell_type": "markdown", "id": "1a57c1a0", "metadata": {}, "source": [ "`nndt.init_colab()` turns on interactive plots in google collaboratory. This string is not necessary in py-scripts or jupyter notebook." ] }, { "cell_type": "code", "execution_count": 15, "id": "d917ac03", "metadata": {}, "outputs": [], "source": [ "# nndt.init_colab()" ] }, { "cell_type": "markdown", "id": "e83f972d", "metadata": {}, "source": [ "`spc.load_from_path` detects files in some path and loads objects automatically." ] }, { "cell_type": "code", "execution_count": null, "id": "c54974ea", "metadata": {}, "outputs": [], "source": [ "ACDC().load()" ] }, { "cell_type": "code", "execution_count": 16, "id": "03ee0c70", "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "Downloading...\n", "From: https://drive.google.com/uc?export=download&id=1UzC2WPkjMQSxzI5sj1rMT47URuZbQhYb\n", "To: /home/kostanew/PycharmProjects/nndt/tutorials/.datasets/ACDC_5/temp.7z\n", "100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 9.01M/9.01M [00:02<00:00, 4.31MB/s]\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Loading complete\n", "\u001b[33mS:space\u001b[90m 0.0.3b1\u001b[39m\n", "├── \u001b[32mO3D:patient009\u001b[37m ((0.00, 0.00, 0.00), (0.00, 0.00, 0.00))\u001b[39m\n", "│ ├── \u001b[32mFS:colored_obj\u001b[37m mesh_obj ./.datasets/ACDC_5/patient009/colored.obj\u001b[39m\n", "│ ├── \u001b[32mFS:sdf_npy\u001b[37m sdt ./.datasets/ACDC_5/patient009/sdf.npy\u001b[39m\n", "│ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ └── \u001b[39munload_from_memory()\u001b[39m\n", "├── \u001b[32mO3D:patient029\u001b[37m ((0.00, 0.00, 0.00), (0.00, 0.00, 0.00))\u001b[39m\n", "│ ├── \u001b[32mFS:colored_obj\u001b[37m mesh_obj ./.datasets/ACDC_5/patient029/colored.obj\u001b[39m\n", "│ ├── \u001b[32mFS:sdf_npy\u001b[37m sdt ./.datasets/ACDC_5/patient029/sdf.npy\u001b[39m\n", "│ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ └── \u001b[39munload_from_memory()\u001b[39m\n", "├── \u001b[32mO3D:patient049\u001b[37m ((0.00, 0.00, 0.00), (0.00, 0.00, 0.00))\u001b[39m\n", "│ ├── \u001b[32mFS:colored_obj\u001b[37m mesh_obj ./.datasets/ACDC_5/patient049/colored.obj\u001b[39m\n", "│ ├── \u001b[32mFS:sdf_npy\u001b[37m sdt ./.datasets/ACDC_5/patient049/sdf.npy\u001b[39m\n", "│ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ └── \u001b[39munload_from_memory()\u001b[39m\n", "├── \u001b[32mO3D:patient069\u001b[37m ((0.00, 0.00, 0.00), (0.00, 0.00, 0.00))\u001b[39m\n", "│ ├── \u001b[32mFS:colored_obj\u001b[37m mesh_obj ./.datasets/ACDC_5/patient069/colored.obj\u001b[39m\n", "│ ├── \u001b[32mFS:sdf_npy\u001b[37m sdt ./.datasets/ACDC_5/patient069/sdf.npy\u001b[39m\n", "│ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ └── \u001b[39munload_from_memory()\u001b[39m\n", "├── \u001b[32mO3D:patient089\u001b[37m ((0.00, 0.00, 0.00), (0.00, 0.00, 0.00))\u001b[39m\n", "│ ├── \u001b[32mFS:colored_obj\u001b[37m mesh_obj ./.datasets/ACDC_5/patient089/colored.obj\u001b[39m\n", "│ ├── \u001b[32mFS:sdf_npy\u001b[37m sdt ./.datasets/ACDC_5/patient089/sdf.npy\u001b[39m\n", "│ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ └── \u001b[39munload_from_memory()\u001b[39m\n", "├── \u001b[39minit()\u001b[39m\n", "├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "├── \u001b[39mpreload(identity|shift_and_scale|to_cube, scale, keep_in_memory=True)\u001b[39m\n", "├── \u001b[39mprint(default|source|full)\u001b[39m\n", "├── \u001b[39msave_space_to_file(filepath)\u001b[39m\n", "├── \u001b[39mto_json()\u001b[39m\n", "└── \u001b[39munload_from_memory()\u001b[39m\n" ] } ], "source": [ "space = spc.load_from_path(\"./.datasets/ACDC_5\")\n", "print(space.print())" ] }, { "cell_type": "markdown", "id": "b1aeb60c", "metadata": {}, "source": [ "After file detection, each file must be read at least once. Use `.preload()` to do this" ] }, { "cell_type": "code", "execution_count": 17, "id": "a049bf49", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "a5d237d5b4444d2487eb5659508d5c80", "version_major": 2, "version_minor": 0 }, "text/plain": [ "ViewInteractiveWidget(height=768, layout=Layout(height='auto', width='100%'), width=1024)" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "space.preload()\n", "space.plot(notebook=True)" ] }, { "cell_type": "markdown", "id": "0d6392d8", "metadata": {}, "source": [ "All methods of the tree above are available for the call and will work correctly with corresponding data" ] }, { "cell_type": "code", "execution_count": 18, "id": "14a5237e", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Help on method sampling_grid in module nndt.space2.method_set:\n", "\n", "sampling_grid(spacing: (, , ) = (2, 2, 2)) -> jax._src.numpy.ndarray.ndarray method of nndt.space2.method_set.SamplingMethodSetNode instance\n", " Sample points from a bounding box (bbox) according to vertex of uniform mesh.\n", " This method work for the normalized space.\n", " \n", " Data transformation\n", " sampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\n", " \n", " :param spacing: Number of slices for each coordinates of the bbox.\n", " :return: 4-dimensional tensor, the last axis is (x,y,z) point position.\n", "\n" ] } ], "source": [ "help(space.patient009.sampling_grid)" ] }, { "cell_type": "code", "execution_count": 19, "id": "a334b772", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "DeviceArray([[[[ 0. , 0. , 0. ],\n", " [ 0. , 0. , 9.333333],\n", " [ 0. , 0. , 18.666666],\n", " ...,\n", " [ 0. , 0. , 65.33333 ],\n", " [ 0. , 0. , 74.666664],\n", " [ 0. , 0. , 84. ]],\n", "\n", " [[ 0. , 20.333334, 0. ],\n", " [ 0. , 20.333334, 9.333333],\n", " [ 0. , 20.333334, 18.666666],\n", " ...,\n", " [ 0. , 20.333334, 65.33333 ],\n", " [ 0. , 20.333334, 74.666664],\n", " [ 0. , 20.333334, 84. ]],\n", "\n", " [[ 0. , 40.666668, 0. ],\n", " [ 0. , 40.666668, 9.333333],\n", " [ 0. , 40.666668, 18.666666],\n", " ...,\n", " [ 0. , 40.666668, 65.33333 ],\n", " [ 0. , 40.666668, 74.666664],\n", " [ 0. , 40.666668, 84. ]],\n", "\n", " ...,\n", "\n", " [[ 0. , 142.33334 , 0. ],\n", " [ 0. , 142.33334 , 9.333333],\n", " [ 0. , 142.33334 , 18.666666],\n", " ...,\n", " [ 0. , 142.33334 , 65.33333 ],\n", " [ 0. , 142.33334 , 74.666664],\n", " [ 0. , 142.33334 , 84. ]],\n", "\n", " [[ 0. , 162.66667 , 0. ],\n", " [ 0. , 162.66667 , 9.333333],\n", " [ 0. , 162.66667 , 18.666666],\n", " ...,\n", " [ 0. , 162.66667 , 65.33333 ],\n", " [ 0. , 162.66667 , 74.666664],\n", " [ 0. , 162.66667 , 84. ]],\n", "\n", " [[ 0. , 183. , 0. ],\n", " [ 0. , 183. , 9.333333],\n", " [ 0. , 183. , 18.666666],\n", " ...,\n", " [ 0. , 183. , 65.33333 ],\n", " [ 0. , 183. , 74.666664],\n", " [ 0. , 183. , 84. ]]],\n", "\n", "\n", " [[[ 14.888889, 0. , 0. ],\n", " [ 14.888889, 0. , 9.333333],\n", " [ 14.888889, 0. , 18.666666],\n", " ...,\n", " [ 14.888889, 0. , 65.33333 ],\n", " [ 14.888889, 0. , 74.666664],\n", " [ 14.888889, 0. , 84. ]],\n", "\n", " [[ 14.888889, 20.333334, 0. ],\n", " [ 14.888889, 20.333334, 9.333333],\n", " [ 14.888889, 20.333334, 18.666666],\n", " ...,\n", " [ 14.888889, 20.333334, 65.33333 ],\n", " [ 14.888889, 20.333334, 74.666664],\n", " [ 14.888889, 20.333334, 84. ]],\n", "\n", " [[ 14.888889, 40.666668, 0. ],\n", " [ 14.888889, 40.666668, 9.333333],\n", " [ 14.888889, 40.666668, 18.666666],\n", " ...,\n", " [ 14.888889, 40.666668, 65.33333 ],\n", " [ 14.888889, 40.666668, 74.666664],\n", " [ 14.888889, 40.666668, 84. ]],\n", "\n", " ...,\n", "\n", " [[ 14.888889, 142.33334 , 0. ],\n", " [ 14.888889, 142.33334 , 9.333333],\n", " [ 14.888889, 142.33334 , 18.666666],\n", " ...,\n", " [ 14.888889, 142.33334 , 65.33333 ],\n", " [ 14.888889, 142.33334 , 74.666664],\n", " [ 14.888889, 142.33334 , 84. ]],\n", "\n", " [[ 14.888889, 162.66667 , 0. ],\n", " [ 14.888889, 162.66667 , 9.333333],\n", " [ 14.888889, 162.66667 , 18.666666],\n", " ...,\n", " [ 14.888889, 162.66667 , 65.33333 ],\n", " [ 14.888889, 162.66667 , 74.666664],\n", " [ 14.888889, 162.66667 , 84. ]],\n", "\n", " [[ 14.888889, 183. , 0. ],\n", " [ 14.888889, 183. , 9.333333],\n", " [ 14.888889, 183. , 18.666666],\n", " ...,\n", " [ 14.888889, 183. , 65.33333 ],\n", " [ 14.888889, 183. , 74.666664],\n", " [ 14.888889, 183. , 84. ]]],\n", "\n", "\n", " [[[ 29.777779, 0. , 0. ],\n", " [ 29.777779, 0. , 9.333333],\n", " [ 29.777779, 0. , 18.666666],\n", " ...,\n", " [ 29.777779, 0. , 65.33333 ],\n", " [ 29.777779, 0. , 74.666664],\n", " [ 29.777779, 0. , 84. ]],\n", "\n", " [[ 29.777779, 20.333334, 0. ],\n", " [ 29.777779, 20.333334, 9.333333],\n", " [ 29.777779, 20.333334, 18.666666],\n", " ...,\n", " [ 29.777779, 20.333334, 65.33333 ],\n", " [ 29.777779, 20.333334, 74.666664],\n", " [ 29.777779, 20.333334, 84. ]],\n", "\n", " [[ 29.777779, 40.666668, 0. ],\n", " [ 29.777779, 40.666668, 9.333333],\n", " [ 29.777779, 40.666668, 18.666666],\n", " ...,\n", " [ 29.777779, 40.666668, 65.33333 ],\n", " [ 29.777779, 40.666668, 74.666664],\n", " [ 29.777779, 40.666668, 84. ]],\n", "\n", " ...,\n", "\n", " [[ 29.777779, 142.33334 , 0. ],\n", " [ 29.777779, 142.33334 , 9.333333],\n", " [ 29.777779, 142.33334 , 18.666666],\n", " ...,\n", " [ 29.777779, 142.33334 , 65.33333 ],\n", " [ 29.777779, 142.33334 , 74.666664],\n", " [ 29.777779, 142.33334 , 84. ]],\n", "\n", " [[ 29.777779, 162.66667 , 0. ],\n", " [ 29.777779, 162.66667 , 9.333333],\n", " [ 29.777779, 162.66667 , 18.666666],\n", " ...,\n", " [ 29.777779, 162.66667 , 65.33333 ],\n", " [ 29.777779, 162.66667 , 74.666664],\n", " [ 29.777779, 162.66667 , 84. ]],\n", "\n", " [[ 29.777779, 183. , 0. ],\n", " [ 29.777779, 183. , 9.333333],\n", " [ 29.777779, 183. , 18.666666],\n", " ...,\n", " [ 29.777779, 183. , 65.33333 ],\n", " [ 29.777779, 183. , 74.666664],\n", " [ 29.777779, 183. , 84. ]]],\n", "\n", "\n", " ...,\n", "\n", "\n", " [[[104.22223 , 0. , 0. ],\n", " [104.22223 , 0. , 9.333333],\n", " [104.22223 , 0. , 18.666666],\n", " ...,\n", " [104.22223 , 0. , 65.33333 ],\n", " [104.22223 , 0. , 74.666664],\n", " [104.22223 , 0. , 84. ]],\n", "\n", " [[104.22223 , 20.333334, 0. ],\n", " [104.22223 , 20.333334, 9.333333],\n", " [104.22223 , 20.333334, 18.666666],\n", " ...,\n", " [104.22223 , 20.333334, 65.33333 ],\n", " [104.22223 , 20.333334, 74.666664],\n", " [104.22223 , 20.333334, 84. ]],\n", "\n", " [[104.22223 , 40.666668, 0. ],\n", " [104.22223 , 40.666668, 9.333333],\n", " [104.22223 , 40.666668, 18.666666],\n", " ...,\n", " [104.22223 , 40.666668, 65.33333 ],\n", " [104.22223 , 40.666668, 74.666664],\n", " [104.22223 , 40.666668, 84. ]],\n", "\n", " ...,\n", "\n", " [[104.22223 , 142.33334 , 0. ],\n", " [104.22223 , 142.33334 , 9.333333],\n", " [104.22223 , 142.33334 , 18.666666],\n", " ...,\n", " [104.22223 , 142.33334 , 65.33333 ],\n", " [104.22223 , 142.33334 , 74.666664],\n", " [104.22223 , 142.33334 , 84. ]],\n", "\n", " [[104.22223 , 162.66667 , 0. ],\n", " [104.22223 , 162.66667 , 9.333333],\n", " [104.22223 , 162.66667 , 18.666666],\n", " ...,\n", " [104.22223 , 162.66667 , 65.33333 ],\n", " [104.22223 , 162.66667 , 74.666664],\n", " [104.22223 , 162.66667 , 84. ]],\n", "\n", " [[104.22223 , 183. , 0. ],\n", " [104.22223 , 183. , 9.333333],\n", " [104.22223 , 183. , 18.666666],\n", " ...,\n", " [104.22223 , 183. , 65.33333 ],\n", " [104.22223 , 183. , 74.666664],\n", " [104.22223 , 183. , 84. ]]],\n", "\n", "\n", " [[[119.111115, 0. , 0. ],\n", " [119.111115, 0. , 9.333333],\n", " [119.111115, 0. , 18.666666],\n", " ...,\n", " [119.111115, 0. , 65.33333 ],\n", " [119.111115, 0. , 74.666664],\n", " [119.111115, 0. , 84. ]],\n", "\n", " [[119.111115, 20.333334, 0. ],\n", " [119.111115, 20.333334, 9.333333],\n", " [119.111115, 20.333334, 18.666666],\n", " ...,\n", " [119.111115, 20.333334, 65.33333 ],\n", " [119.111115, 20.333334, 74.666664],\n", " [119.111115, 20.333334, 84. ]],\n", "\n", " [[119.111115, 40.666668, 0. ],\n", " [119.111115, 40.666668, 9.333333],\n", " [119.111115, 40.666668, 18.666666],\n", " ...,\n", " [119.111115, 40.666668, 65.33333 ],\n", " [119.111115, 40.666668, 74.666664],\n", " [119.111115, 40.666668, 84. ]],\n", "\n", " ...,\n", "\n", " [[119.111115, 142.33334 , 0. ],\n", " [119.111115, 142.33334 , 9.333333],\n", " [119.111115, 142.33334 , 18.666666],\n", " ...,\n", " [119.111115, 142.33334 , 65.33333 ],\n", " [119.111115, 142.33334 , 74.666664],\n", " [119.111115, 142.33334 , 84. ]],\n", "\n", " [[119.111115, 162.66667 , 0. ],\n", " [119.111115, 162.66667 , 9.333333],\n", " [119.111115, 162.66667 , 18.666666],\n", " ...,\n", " [119.111115, 162.66667 , 65.33333 ],\n", " [119.111115, 162.66667 , 74.666664],\n", " [119.111115, 162.66667 , 84. ]],\n", "\n", " [[119.111115, 183. , 0. ],\n", " [119.111115, 183. , 9.333333],\n", " [119.111115, 183. , 18.666666],\n", " ...,\n", " [119.111115, 183. , 65.33333 ],\n", " [119.111115, 183. , 74.666664],\n", " [119.111115, 183. , 84. ]]],\n", "\n", "\n", " [[[134. , 0. , 0. ],\n", " [134. , 0. , 9.333333],\n", " [134. , 0. , 18.666666],\n", " ...,\n", " [134. , 0. , 65.33333 ],\n", " [134. , 0. , 74.666664],\n", " [134. , 0. , 84. ]],\n", "\n", " [[134. , 20.333334, 0. ],\n", " [134. , 20.333334, 9.333333],\n", " [134. , 20.333334, 18.666666],\n", " ...,\n", " [134. , 20.333334, 65.33333 ],\n", " [134. , 20.333334, 74.666664],\n", " [134. , 20.333334, 84. ]],\n", "\n", " [[134. , 40.666668, 0. ],\n", " [134. , 40.666668, 9.333333],\n", " [134. , 40.666668, 18.666666],\n", " ...,\n", " [134. , 40.666668, 65.33333 ],\n", " [134. , 40.666668, 74.666664],\n", " [134. , 40.666668, 84. ]],\n", "\n", " ...,\n", "\n", " [[134. , 142.33334 , 0. ],\n", " [134. , 142.33334 , 9.333333],\n", " [134. , 142.33334 , 18.666666],\n", " ...,\n", " [134. , 142.33334 , 65.33333 ],\n", " [134. , 142.33334 , 74.666664],\n", " [134. , 142.33334 , 84. ]],\n", "\n", " [[134. , 162.66667 , 0. ],\n", " [134. , 162.66667 , 9.333333],\n", " [134. , 162.66667 , 18.666666],\n", " ...,\n", " [134. , 162.66667 , 65.33333 ],\n", " [134. , 162.66667 , 74.666664],\n", " [134. , 162.66667 , 84. ]],\n", "\n", " [[134. , 183. , 0. ],\n", " [134. , 183. , 9.333333],\n", " [134. , 183. , 18.666666],\n", " ...,\n", " [134. , 183. , 65.33333 ],\n", " [134. , 183. , 74.666664],\n", " [134. , 183. , 84. ]]]], dtype=float32)" ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "space.patient009.sampling_grid((10, 10, 10))" ] }, { "cell_type": "markdown", "id": "22e317f3", "metadata": {}, "source": [ "Neural network requires data normalization before training.\n", "\n", "Normalization for space units is integrated inside the `.preload()`\n", "\n", "NNDT v0.0.2 supports three method\n", " - `\"identity\"` is lack of normalization\n", " - `\"shift_and_scale\"` shifts the bounding box of object to center and divides physical units to `scale` parameter\n", " - `\"to_cube\"` push object to cube with edge size of `[-1,1]`" ] }, { "cell_type": "code", "execution_count": 20, "id": "79f485bb", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "29e53155979f4a519193a65c06bdb616", "version_major": 2, "version_minor": 0 }, "text/plain": [ "ViewInteractiveWidget(height=768, layout=Layout(height='auto', width='100%'), width=1024)" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "space = spc.load_from_path(\"../tests/acdc_for_test\")\n", "space.preload(\"shift_and_scale\", scale=50)\n", "space.plot()" ] }, { "cell_type": "code", "execution_count": 21, "id": "5a897168", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "754bb2435b9d4c9caa54cd35e4c8cf09", "version_major": 2, "version_minor": 0 }, "text/plain": [ "ViewInteractiveWidget(height=768, layout=Layout(height='auto', width='100%'), width=1024)" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "space = spc.load_from_path(\"../tests/acdc_for_test\")\n", "space.preload(\"to_cube\")\n", "space.plot()" ] }, { "cell_type": "markdown", "id": "5fc5ec09", "metadata": {}, "source": [ "`.print()` supports several modes for pretty printing of 3D object tree.\n", " - `\"default\"` shows sources, transformations, method sets, and major functions of Object3D.\n", " - `\"sources\"` shows sources only\n", " - `\"full\"` shows full tree and all methods" ] }, { "cell_type": "code", "execution_count": 22, "id": "e0103430", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[33mS:space\u001b[90m 0.0.3b1\u001b[39m\n", "├── \u001b[32mO3D:patient009\u001b[37m ((-1.00, -1.00, -1.00), (1.00, 1.00, 1.00))\u001b[39m\n", "│ ├── \u001b[32mFS:colored_obj\u001b[37m mesh_obj^ ../tests/acdc_for_test/patient009/colored.obj\u001b[39m\n", "│ ├── \u001b[32mFS:sdf_npy\u001b[37m sdt^ ../tests/acdc_for_test/patient009/sdf.npy\u001b[39m\n", "│ └── \u001b[31mTR:transform\u001b[37m to_cube\u001b[39m\n", "├── \u001b[32mO3D:patient029\u001b[37m ((-1.00, -1.00, -1.00), (1.00, 1.00, 1.00))\u001b[39m\n", "│ ├── \u001b[32mFS:colored_obj\u001b[37m mesh_obj^ ../tests/acdc_for_test/patient029/colored.obj\u001b[39m\n", "│ ├── \u001b[32mFS:sdf_npy\u001b[37m sdt^ ../tests/acdc_for_test/patient029/sdf.npy\u001b[39m\n", "│ └── \u001b[31mTR:transform\u001b[37m to_cube\u001b[39m\n", "├── \u001b[32mO3D:patient049\u001b[37m ((-1.00, -1.00, -1.00), (1.00, 1.00, 1.00))\u001b[39m\n", "│ ├── \u001b[32mFS:colored_obj\u001b[37m mesh_obj^ ../tests/acdc_for_test/patient049/colored.obj\u001b[39m\n", "│ ├── \u001b[32mFS:sdf_npy\u001b[37m sdt^ ../tests/acdc_for_test/patient049/sdf.npy\u001b[39m\n", "│ └── \u001b[31mTR:transform\u001b[37m to_cube\u001b[39m\n", "├── \u001b[32mO3D:patient069\u001b[37m ((-1.00, -1.00, -1.00), (1.00, 1.00, 1.00))\u001b[39m\n", "│ ├── \u001b[32mFS:colored_obj\u001b[37m mesh_obj^ ../tests/acdc_for_test/patient069/colored.obj\u001b[39m\n", "│ ├── \u001b[32mFS:sdf_npy\u001b[37m sdt^ ../tests/acdc_for_test/patient069/sdf.npy\u001b[39m\n", "│ └── \u001b[31mTR:transform\u001b[37m to_cube\u001b[39m\n", "└── \u001b[32mO3D:patient089\u001b[37m ((-1.00, -1.00, -1.00), (1.00, 1.00, 1.00))\u001b[39m\n", " ├── \u001b[32mFS:colored_obj\u001b[37m mesh_obj^ ../tests/acdc_for_test/patient089/colored.obj\u001b[39m\n", " ├── \u001b[32mFS:sdf_npy\u001b[37m sdt^ ../tests/acdc_for_test/patient089/sdf.npy\u001b[39m\n", " └── \u001b[31mTR:transform\u001b[37m to_cube\u001b[39m\n" ] } ], "source": [ "print(space.print(\"source\"))" ] }, { "cell_type": "code", "execution_count": 23, "id": "1604771c", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[33mS:space\u001b[90m 0.0.3b1\u001b[39m\n", "├── \u001b[32mO3D:patient009\u001b[37m ((-1.00, -1.00, -1.00), (1.00, 1.00, 1.00))\u001b[39m\n", "│ ├── \u001b[32mFS:colored_obj\u001b[37m mesh_obj^ ../tests/acdc_for_test/patient009/colored.obj\u001b[39m\n", "│ ├── \u001b[32mFS:sdf_npy\u001b[37m sdt^ ../tests/acdc_for_test/patient009/sdf.npy\u001b[39m\n", "│ ├── \u001b[31mTR:transform\u001b[37m to_cube\u001b[39m\n", "│ ├── \u001b[33mMS:mesh\u001b[39m\n", "│ ├── \u001b[33mMS:mesh_colors\u001b[39m\n", "│ ├── \u001b[33mMS:sampling\u001b[39m\n", "│ ├── \u001b[33mMS:sdt\u001b[39m\n", "│ ├── \u001b[33mMS:train_task\u001b[39m\n", "│ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ ├── \u001b[39msampling_eachN_from_mesh(count=N, step=M, shift=K) -> (ns_ind[N], ns_xyz[N])\u001b[39m\n", "│ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msave_mesh(filepath, {name, array})\u001b[39m\n", "│ ├── \u001b[39msurface_ind2rgba(ind[..,1]) -> rgba[..,4]\u001b[39m\n", "│ ├── \u001b[39msurface_ind2xyz(ind[..,1]) -> ns_xyz[..,3]\u001b[39m\n", "│ ├── \u001b[39msurface_rgba() -> xyz[N,4]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz() -> xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2ind(ns_xyz[..,3]) -> ns_dist[..,1], ns_ind[..,1]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2localsdt(ns_xyz[3], spacing=(D,H,W), scale=1.) -> ns_xyz[D,H,W,3], ns_localsdt[D,H,W,1]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2rgba(ns_xyz[..,3]) -> rgba[..,4]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2sdt(ns_xyz[..,3]) -> ns_sdt[..,1]\u001b[39m\n", "│ ├── \u001b[39mtrain_task_sdt2sdf(filename, **kwargs)\u001b[39m\n", "│ ├── \u001b[39mtransform_sdt_ns2ps(ns_sdt[..]) -> ps_sdt[..]\u001b[39m\n", "│ ├── \u001b[39mtransform_sdt_ps2ns(ps_sdt[..]) -> ns_sdt[..]\u001b[39m\n", "│ ├── \u001b[39mtransform_xyz_ns2ps(ns_xyz[..,3]) -> ps_xyz[..,3]\u001b[39m\n", "│ ├── \u001b[39mtransform_xyz_ps2ns(ps_xyz[..,3]) -> ns_xyz[..,3]\u001b[39m\n", "│ └── \u001b[39munload_from_memory()\u001b[39m\n", "├── \u001b[32mO3D:patient029\u001b[37m ((-1.00, -1.00, -1.00), (1.00, 1.00, 1.00))\u001b[39m\n", "│ ├── \u001b[32mFS:colored_obj\u001b[37m mesh_obj^ ../tests/acdc_for_test/patient029/colored.obj\u001b[39m\n", "│ ├── \u001b[32mFS:sdf_npy\u001b[37m sdt^ ../tests/acdc_for_test/patient029/sdf.npy\u001b[39m\n", "│ ├── \u001b[31mTR:transform\u001b[37m to_cube\u001b[39m\n", "│ ├── \u001b[33mMS:mesh\u001b[39m\n", "│ ├── \u001b[33mMS:mesh_colors\u001b[39m\n", "│ ├── \u001b[33mMS:sampling\u001b[39m\n", "│ ├── \u001b[33mMS:sdt\u001b[39m\n", "│ ├── \u001b[33mMS:train_task\u001b[39m\n", "│ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ ├── \u001b[39msampling_eachN_from_mesh(count=N, step=M, shift=K) -> (ns_ind[N], ns_xyz[N])\u001b[39m\n", "│ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msave_mesh(filepath, {name, array})\u001b[39m\n", "│ ├── \u001b[39msurface_ind2rgba(ind[..,1]) -> rgba[..,4]\u001b[39m\n", "│ ├── \u001b[39msurface_ind2xyz(ind[..,1]) -> ns_xyz[..,3]\u001b[39m\n", "│ ├── \u001b[39msurface_rgba() -> xyz[N,4]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz() -> xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2ind(ns_xyz[..,3]) -> ns_dist[..,1], ns_ind[..,1]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2localsdt(ns_xyz[3], spacing=(D,H,W), scale=1.) -> ns_xyz[D,H,W,3], ns_localsdt[D,H,W,1]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2rgba(ns_xyz[..,3]) -> rgba[..,4]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2sdt(ns_xyz[..,3]) -> ns_sdt[..,1]\u001b[39m\n", "│ ├── \u001b[39mtrain_task_sdt2sdf(filename, **kwargs)\u001b[39m\n", "│ ├── \u001b[39mtransform_sdt_ns2ps(ns_sdt[..]) -> ps_sdt[..]\u001b[39m\n", "│ ├── \u001b[39mtransform_sdt_ps2ns(ps_sdt[..]) -> ns_sdt[..]\u001b[39m\n", "│ ├── \u001b[39mtransform_xyz_ns2ps(ns_xyz[..,3]) -> ps_xyz[..,3]\u001b[39m\n", "│ ├── \u001b[39mtransform_xyz_ps2ns(ps_xyz[..,3]) -> ns_xyz[..,3]\u001b[39m\n", "│ └── \u001b[39munload_from_memory()\u001b[39m\n", "├── \u001b[32mO3D:patient049\u001b[37m ((-1.00, -1.00, -1.00), (1.00, 1.00, 1.00))\u001b[39m\n", "│ ├── \u001b[32mFS:colored_obj\u001b[37m mesh_obj^ ../tests/acdc_for_test/patient049/colored.obj\u001b[39m\n", "│ ├── \u001b[32mFS:sdf_npy\u001b[37m sdt^ ../tests/acdc_for_test/patient049/sdf.npy\u001b[39m\n", "│ ├── \u001b[31mTR:transform\u001b[37m to_cube\u001b[39m\n", "│ ├── \u001b[33mMS:mesh\u001b[39m\n", "│ ├── \u001b[33mMS:mesh_colors\u001b[39m\n", "│ ├── \u001b[33mMS:sampling\u001b[39m\n", "│ ├── \u001b[33mMS:sdt\u001b[39m\n", "│ ├── \u001b[33mMS:train_task\u001b[39m\n", "│ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ ├── \u001b[39msampling_eachN_from_mesh(count=N, step=M, shift=K) -> (ns_ind[N], ns_xyz[N])\u001b[39m\n", "│ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msave_mesh(filepath, {name, array})\u001b[39m\n", "│ ├── \u001b[39msurface_ind2rgba(ind[..,1]) -> rgba[..,4]\u001b[39m\n", "│ ├── \u001b[39msurface_ind2xyz(ind[..,1]) -> ns_xyz[..,3]\u001b[39m\n", "│ ├── \u001b[39msurface_rgba() -> xyz[N,4]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz() -> xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2ind(ns_xyz[..,3]) -> ns_dist[..,1], ns_ind[..,1]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2localsdt(ns_xyz[3], spacing=(D,H,W), scale=1.) -> ns_xyz[D,H,W,3], ns_localsdt[D,H,W,1]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2rgba(ns_xyz[..,3]) -> rgba[..,4]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2sdt(ns_xyz[..,3]) -> ns_sdt[..,1]\u001b[39m\n", "│ ├── \u001b[39mtrain_task_sdt2sdf(filename, **kwargs)\u001b[39m\n", "│ ├── \u001b[39mtransform_sdt_ns2ps(ns_sdt[..]) -> ps_sdt[..]\u001b[39m\n", "│ ├── \u001b[39mtransform_sdt_ps2ns(ps_sdt[..]) -> ns_sdt[..]\u001b[39m\n", "│ ├── \u001b[39mtransform_xyz_ns2ps(ns_xyz[..,3]) -> ps_xyz[..,3]\u001b[39m\n", "│ ├── \u001b[39mtransform_xyz_ps2ns(ps_xyz[..,3]) -> ns_xyz[..,3]\u001b[39m\n", "│ └── \u001b[39munload_from_memory()\u001b[39m\n", "├── \u001b[32mO3D:patient069\u001b[37m ((-1.00, -1.00, -1.00), (1.00, 1.00, 1.00))\u001b[39m\n", "│ ├── \u001b[32mFS:colored_obj\u001b[37m mesh_obj^ ../tests/acdc_for_test/patient069/colored.obj\u001b[39m\n", "│ ├── \u001b[32mFS:sdf_npy\u001b[37m sdt^ ../tests/acdc_for_test/patient069/sdf.npy\u001b[39m\n", "│ ├── \u001b[31mTR:transform\u001b[37m to_cube\u001b[39m\n", "│ ├── \u001b[33mMS:mesh\u001b[39m\n", "│ ├── \u001b[33mMS:mesh_colors\u001b[39m\n", "│ ├── \u001b[33mMS:sampling\u001b[39m\n", "│ ├── \u001b[33mMS:sdt\u001b[39m\n", "│ ├── \u001b[33mMS:train_task\u001b[39m\n", "│ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ ├── \u001b[39msampling_eachN_from_mesh(count=N, step=M, shift=K) -> (ns_ind[N], ns_xyz[N])\u001b[39m\n", "│ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msave_mesh(filepath, {name, array})\u001b[39m\n", "│ ├── \u001b[39msurface_ind2rgba(ind[..,1]) -> rgba[..,4]\u001b[39m\n", "│ ├── \u001b[39msurface_ind2xyz(ind[..,1]) -> ns_xyz[..,3]\u001b[39m\n", "│ ├── \u001b[39msurface_rgba() -> xyz[N,4]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz() -> xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2ind(ns_xyz[..,3]) -> ns_dist[..,1], ns_ind[..,1]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2localsdt(ns_xyz[3], spacing=(D,H,W), scale=1.) -> ns_xyz[D,H,W,3], ns_localsdt[D,H,W,1]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2rgba(ns_xyz[..,3]) -> rgba[..,4]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2sdt(ns_xyz[..,3]) -> ns_sdt[..,1]\u001b[39m\n", "│ ├── \u001b[39mtrain_task_sdt2sdf(filename, **kwargs)\u001b[39m\n", "│ ├── \u001b[39mtransform_sdt_ns2ps(ns_sdt[..]) -> ps_sdt[..]\u001b[39m\n", "│ ├── \u001b[39mtransform_sdt_ps2ns(ps_sdt[..]) -> ns_sdt[..]\u001b[39m\n", "│ ├── \u001b[39mtransform_xyz_ns2ps(ns_xyz[..,3]) -> ps_xyz[..,3]\u001b[39m\n", "│ ├── \u001b[39mtransform_xyz_ps2ns(ps_xyz[..,3]) -> ns_xyz[..,3]\u001b[39m\n", "│ └── \u001b[39munload_from_memory()\u001b[39m\n", "├── \u001b[32mO3D:patient089\u001b[37m ((-1.00, -1.00, -1.00), (1.00, 1.00, 1.00))\u001b[39m\n", "│ ├── \u001b[32mFS:colored_obj\u001b[37m mesh_obj^ ../tests/acdc_for_test/patient089/colored.obj\u001b[39m\n", "│ ├── \u001b[32mFS:sdf_npy\u001b[37m sdt^ ../tests/acdc_for_test/patient089/sdf.npy\u001b[39m\n", "│ ├── \u001b[31mTR:transform\u001b[37m to_cube\u001b[39m\n", "│ ├── \u001b[33mMS:mesh\u001b[39m\n", "│ ├── \u001b[33mMS:mesh_colors\u001b[39m\n", "│ ├── \u001b[33mMS:sampling\u001b[39m\n", "│ ├── \u001b[33mMS:sdt\u001b[39m\n", "│ ├── \u001b[33mMS:train_task\u001b[39m\n", "│ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ ├── \u001b[39msampling_eachN_from_mesh(count=N, step=M, shift=K) -> (ns_ind[N], ns_xyz[N])\u001b[39m\n", "│ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msave_mesh(filepath, {name, array})\u001b[39m\n", "│ ├── \u001b[39msurface_ind2rgba(ind[..,1]) -> rgba[..,4]\u001b[39m\n", "│ ├── \u001b[39msurface_ind2xyz(ind[..,1]) -> ns_xyz[..,3]\u001b[39m\n", "│ ├── \u001b[39msurface_rgba() -> xyz[N,4]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz() -> xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2ind(ns_xyz[..,3]) -> ns_dist[..,1], ns_ind[..,1]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2localsdt(ns_xyz[3], spacing=(D,H,W), scale=1.) -> ns_xyz[D,H,W,3], ns_localsdt[D,H,W,1]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2rgba(ns_xyz[..,3]) -> rgba[..,4]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2sdt(ns_xyz[..,3]) -> ns_sdt[..,1]\u001b[39m\n", "│ ├── \u001b[39mtrain_task_sdt2sdf(filename, **kwargs)\u001b[39m\n", "│ ├── \u001b[39mtransform_sdt_ns2ps(ns_sdt[..]) -> ps_sdt[..]\u001b[39m\n", "│ ├── \u001b[39mtransform_sdt_ps2ns(ps_sdt[..]) -> ns_sdt[..]\u001b[39m\n", "│ ├── \u001b[39mtransform_xyz_ns2ps(ns_xyz[..,3]) -> ps_xyz[..,3]\u001b[39m\n", "│ ├── \u001b[39mtransform_xyz_ps2ns(ps_xyz[..,3]) -> ns_xyz[..,3]\u001b[39m\n", "│ └── \u001b[39munload_from_memory()\u001b[39m\n", "├── \u001b[33mMS:sampling\u001b[39m\n", "├── \u001b[39minit()\u001b[39m\n", "├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "├── \u001b[39mpreload(identity|shift_and_scale|to_cube, scale, keep_in_memory=True)\u001b[39m\n", "├── \u001b[39mprint(default|source|full)\u001b[39m\n", "├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "├── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "├── \u001b[39msave_space_to_file(filepath)\u001b[39m\n", "├── \u001b[39mto_json()\u001b[39m\n", "└── \u001b[39munload_from_memory()\u001b[39m\n" ] } ], "source": [ "print(space.print())" ] }, { "cell_type": "code", "execution_count": 24, "id": "8db2bdc7", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[33mS:space\u001b[90m 0.0.3b1\u001b[39m\n", "├── \u001b[32mO3D:patient009\u001b[37m ((-1.00, -1.00, -1.00), (1.00, 1.00, 1.00))\u001b[39m\n", "│ ├── \u001b[32mFS:colored_obj\u001b[37m mesh_obj^ ../tests/acdc_for_test/patient009/colored.obj\u001b[39m\n", "│ │ ├── \u001b[33mMS:sampling\u001b[39m\n", "│ │ │ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ │ │ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ │ │ └── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ │ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ │ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ │ ├── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ │ └── \u001b[39munload_from_memory()\u001b[39m\n", "│ ├── \u001b[32mFS:sdf_npy\u001b[37m sdt^ ../tests/acdc_for_test/patient009/sdf.npy\u001b[39m\n", "│ │ ├── \u001b[33mMS:sampling\u001b[39m\n", "│ │ │ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ │ │ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ │ │ └── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ │ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ │ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ │ ├── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ │ └── \u001b[39munload_from_memory()\u001b[39m\n", "│ ├── \u001b[31mTR:transform\u001b[37m to_cube\u001b[39m\n", "│ │ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ │ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ │ ├── \u001b[39mtransform_sdt_ns2ps(ns_sdt[..]) -> ps_sdt[..]\u001b[39m\n", "│ │ ├── \u001b[39mtransform_sdt_ps2ns(ps_sdt[..]) -> ns_sdt[..]\u001b[39m\n", "│ │ ├── \u001b[39mtransform_xyz_ns2ps(ns_xyz[..,3]) -> ps_xyz[..,3]\u001b[39m\n", "│ │ ├── \u001b[39mtransform_xyz_ps2ns(ps_xyz[..,3]) -> ns_xyz[..,3]\u001b[39m\n", "│ │ └── \u001b[39munload_from_memory()\u001b[39m\n", "│ ├── \u001b[33mMS:mesh\u001b[39m\n", "│ │ ├── \u001b[39msampling_eachN_from_mesh(count=N, step=M, shift=K) -> (ns_ind[N], ns_xyz[N])\u001b[39m\n", "│ │ ├── \u001b[39msave_mesh(filepath, {name, array})\u001b[39m\n", "│ │ ├── \u001b[39msurface_ind2xyz(ind[..,1]) -> ns_xyz[..,3]\u001b[39m\n", "│ │ ├── \u001b[39msurface_xyz() -> xyz[N,3]\u001b[39m\n", "│ │ └── \u001b[39msurface_xyz2ind(ns_xyz[..,3]) -> ns_dist[..,1], ns_ind[..,1]\u001b[39m\n", "│ ├── \u001b[33mMS:mesh_colors\u001b[39m\n", "│ │ ├── \u001b[39msurface_ind2rgba(ind[..,1]) -> rgba[..,4]\u001b[39m\n", "│ │ ├── \u001b[39msurface_rgba() -> xyz[N,4]\u001b[39m\n", "│ │ └── \u001b[39msurface_xyz2rgba(ns_xyz[..,3]) -> rgba[..,4]\u001b[39m\n", "│ ├── \u001b[33mMS:sampling\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ │ └── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ ├── \u001b[33mMS:sdt\u001b[39m\n", "│ │ ├── \u001b[39msurface_xyz2localsdt(ns_xyz[3], spacing=(D,H,W), scale=1.) -> ns_xyz[D,H,W,3], ns_localsdt[D,H,W,1]\u001b[39m\n", "│ │ └── \u001b[39msurface_xyz2sdt(ns_xyz[..,3]) -> ns_sdt[..,1]\u001b[39m\n", "│ ├── \u001b[33mMS:train_task\u001b[39m\n", "│ │ └── \u001b[39mtrain_task_sdt2sdf(filename, **kwargs)\u001b[39m\n", "│ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ ├── \u001b[39msampling_eachN_from_mesh(count=N, step=M, shift=K) -> (ns_ind[N], ns_xyz[N])\u001b[39m\n", "│ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msave_mesh(filepath, {name, array})\u001b[39m\n", "│ ├── \u001b[39msurface_ind2rgba(ind[..,1]) -> rgba[..,4]\u001b[39m\n", "│ ├── \u001b[39msurface_ind2xyz(ind[..,1]) -> ns_xyz[..,3]\u001b[39m\n", "│ ├── \u001b[39msurface_rgba() -> xyz[N,4]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz() -> xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2ind(ns_xyz[..,3]) -> ns_dist[..,1], ns_ind[..,1]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2localsdt(ns_xyz[3], spacing=(D,H,W), scale=1.) -> ns_xyz[D,H,W,3], ns_localsdt[D,H,W,1]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2rgba(ns_xyz[..,3]) -> rgba[..,4]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2sdt(ns_xyz[..,3]) -> ns_sdt[..,1]\u001b[39m\n", "│ ├── \u001b[39mtrain_task_sdt2sdf(filename, **kwargs)\u001b[39m\n", "│ ├── \u001b[39mtransform_sdt_ns2ps(ns_sdt[..]) -> ps_sdt[..]\u001b[39m\n", "│ ├── \u001b[39mtransform_sdt_ps2ns(ps_sdt[..]) -> ns_sdt[..]\u001b[39m\n", "│ ├── \u001b[39mtransform_xyz_ns2ps(ns_xyz[..,3]) -> ps_xyz[..,3]\u001b[39m\n", "│ ├── \u001b[39mtransform_xyz_ps2ns(ps_xyz[..,3]) -> ns_xyz[..,3]\u001b[39m\n", "│ └── \u001b[39munload_from_memory()\u001b[39m\n", "├── \u001b[32mO3D:patient029\u001b[37m ((-1.00, -1.00, -1.00), (1.00, 1.00, 1.00))\u001b[39m\n", "│ ├── \u001b[32mFS:colored_obj\u001b[37m mesh_obj^ ../tests/acdc_for_test/patient029/colored.obj\u001b[39m\n", "│ │ ├── \u001b[33mMS:sampling\u001b[39m\n", "│ │ │ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ │ │ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ │ │ └── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ │ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ │ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ │ ├── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ │ └── \u001b[39munload_from_memory()\u001b[39m\n", "│ ├── \u001b[32mFS:sdf_npy\u001b[37m sdt^ ../tests/acdc_for_test/patient029/sdf.npy\u001b[39m\n", "│ │ ├── \u001b[33mMS:sampling\u001b[39m\n", "│ │ │ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ │ │ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ │ │ └── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ │ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ │ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ │ ├── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ │ └── \u001b[39munload_from_memory()\u001b[39m\n", "│ ├── \u001b[31mTR:transform\u001b[37m to_cube\u001b[39m\n", "│ │ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ │ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ │ ├── \u001b[39mtransform_sdt_ns2ps(ns_sdt[..]) -> ps_sdt[..]\u001b[39m\n", "│ │ ├── \u001b[39mtransform_sdt_ps2ns(ps_sdt[..]) -> ns_sdt[..]\u001b[39m\n", "│ │ ├── \u001b[39mtransform_xyz_ns2ps(ns_xyz[..,3]) -> ps_xyz[..,3]\u001b[39m\n", "│ │ ├── \u001b[39mtransform_xyz_ps2ns(ps_xyz[..,3]) -> ns_xyz[..,3]\u001b[39m\n", "│ │ └── \u001b[39munload_from_memory()\u001b[39m\n", "│ ├── \u001b[33mMS:mesh\u001b[39m\n", "│ │ ├── \u001b[39msampling_eachN_from_mesh(count=N, step=M, shift=K) -> (ns_ind[N], ns_xyz[N])\u001b[39m\n", "│ │ ├── \u001b[39msave_mesh(filepath, {name, array})\u001b[39m\n", "│ │ ├── \u001b[39msurface_ind2xyz(ind[..,1]) -> ns_xyz[..,3]\u001b[39m\n", "│ │ ├── \u001b[39msurface_xyz() -> xyz[N,3]\u001b[39m\n", "│ │ └── \u001b[39msurface_xyz2ind(ns_xyz[..,3]) -> ns_dist[..,1], ns_ind[..,1]\u001b[39m\n", "│ ├── \u001b[33mMS:mesh_colors\u001b[39m\n", "│ │ ├── \u001b[39msurface_ind2rgba(ind[..,1]) -> rgba[..,4]\u001b[39m\n", "│ │ ├── \u001b[39msurface_rgba() -> xyz[N,4]\u001b[39m\n", "│ │ └── \u001b[39msurface_xyz2rgba(ns_xyz[..,3]) -> rgba[..,4]\u001b[39m\n", "│ ├── \u001b[33mMS:sampling\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ │ └── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ ├── \u001b[33mMS:sdt\u001b[39m\n", "│ │ ├── \u001b[39msurface_xyz2localsdt(ns_xyz[3], spacing=(D,H,W), scale=1.) -> ns_xyz[D,H,W,3], ns_localsdt[D,H,W,1]\u001b[39m\n", "│ │ └── \u001b[39msurface_xyz2sdt(ns_xyz[..,3]) -> ns_sdt[..,1]\u001b[39m\n", "│ ├── \u001b[33mMS:train_task\u001b[39m\n", "│ │ └── \u001b[39mtrain_task_sdt2sdf(filename, **kwargs)\u001b[39m\n", "│ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ ├── \u001b[39msampling_eachN_from_mesh(count=N, step=M, shift=K) -> (ns_ind[N], ns_xyz[N])\u001b[39m\n", "│ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msave_mesh(filepath, {name, array})\u001b[39m\n", "│ ├── \u001b[39msurface_ind2rgba(ind[..,1]) -> rgba[..,4]\u001b[39m\n", "│ ├── \u001b[39msurface_ind2xyz(ind[..,1]) -> ns_xyz[..,3]\u001b[39m\n", "│ ├── \u001b[39msurface_rgba() -> xyz[N,4]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz() -> xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2ind(ns_xyz[..,3]) -> ns_dist[..,1], ns_ind[..,1]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2localsdt(ns_xyz[3], spacing=(D,H,W), scale=1.) -> ns_xyz[D,H,W,3], ns_localsdt[D,H,W,1]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2rgba(ns_xyz[..,3]) -> rgba[..,4]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2sdt(ns_xyz[..,3]) -> ns_sdt[..,1]\u001b[39m\n", "│ ├── \u001b[39mtrain_task_sdt2sdf(filename, **kwargs)\u001b[39m\n", "│ ├── \u001b[39mtransform_sdt_ns2ps(ns_sdt[..]) -> ps_sdt[..]\u001b[39m\n", "│ ├── \u001b[39mtransform_sdt_ps2ns(ps_sdt[..]) -> ns_sdt[..]\u001b[39m\n", "│ ├── \u001b[39mtransform_xyz_ns2ps(ns_xyz[..,3]) -> ps_xyz[..,3]\u001b[39m\n", "│ ├── \u001b[39mtransform_xyz_ps2ns(ps_xyz[..,3]) -> ns_xyz[..,3]\u001b[39m\n", "│ └── \u001b[39munload_from_memory()\u001b[39m\n", "├── \u001b[32mO3D:patient049\u001b[37m ((-1.00, -1.00, -1.00), (1.00, 1.00, 1.00))\u001b[39m\n", "│ ├── \u001b[32mFS:colored_obj\u001b[37m mesh_obj^ ../tests/acdc_for_test/patient049/colored.obj\u001b[39m\n", "│ │ ├── \u001b[33mMS:sampling\u001b[39m\n", "│ │ │ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ │ │ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ │ │ └── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ │ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ │ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ │ ├── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ │ └── \u001b[39munload_from_memory()\u001b[39m\n", "│ ├── \u001b[32mFS:sdf_npy\u001b[37m sdt^ ../tests/acdc_for_test/patient049/sdf.npy\u001b[39m\n", "│ │ ├── \u001b[33mMS:sampling\u001b[39m\n", "│ │ │ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ │ │ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ │ │ └── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ │ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ │ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ │ ├── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ │ └── \u001b[39munload_from_memory()\u001b[39m\n", "│ ├── \u001b[31mTR:transform\u001b[37m to_cube\u001b[39m\n", "│ │ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ │ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ │ ├── \u001b[39mtransform_sdt_ns2ps(ns_sdt[..]) -> ps_sdt[..]\u001b[39m\n", "│ │ ├── \u001b[39mtransform_sdt_ps2ns(ps_sdt[..]) -> ns_sdt[..]\u001b[39m\n", "│ │ ├── \u001b[39mtransform_xyz_ns2ps(ns_xyz[..,3]) -> ps_xyz[..,3]\u001b[39m\n", "│ │ ├── \u001b[39mtransform_xyz_ps2ns(ps_xyz[..,3]) -> ns_xyz[..,3]\u001b[39m\n", "│ │ └── \u001b[39munload_from_memory()\u001b[39m\n", "│ ├── \u001b[33mMS:mesh\u001b[39m\n", "│ │ ├── \u001b[39msampling_eachN_from_mesh(count=N, step=M, shift=K) -> (ns_ind[N], ns_xyz[N])\u001b[39m\n", "│ │ ├── \u001b[39msave_mesh(filepath, {name, array})\u001b[39m\n", "│ │ ├── \u001b[39msurface_ind2xyz(ind[..,1]) -> ns_xyz[..,3]\u001b[39m\n", "│ │ ├── \u001b[39msurface_xyz() -> xyz[N,3]\u001b[39m\n", "│ │ └── \u001b[39msurface_xyz2ind(ns_xyz[..,3]) -> ns_dist[..,1], ns_ind[..,1]\u001b[39m\n", "│ ├── \u001b[33mMS:mesh_colors\u001b[39m\n", "│ │ ├── \u001b[39msurface_ind2rgba(ind[..,1]) -> rgba[..,4]\u001b[39m\n", "│ │ ├── \u001b[39msurface_rgba() -> xyz[N,4]\u001b[39m\n", "│ │ └── \u001b[39msurface_xyz2rgba(ns_xyz[..,3]) -> rgba[..,4]\u001b[39m\n", "│ ├── \u001b[33mMS:sampling\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ │ └── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ ├── \u001b[33mMS:sdt\u001b[39m\n", "│ │ ├── \u001b[39msurface_xyz2localsdt(ns_xyz[3], spacing=(D,H,W), scale=1.) -> ns_xyz[D,H,W,3], ns_localsdt[D,H,W,1]\u001b[39m\n", "│ │ └── \u001b[39msurface_xyz2sdt(ns_xyz[..,3]) -> ns_sdt[..,1]\u001b[39m\n", "│ ├── \u001b[33mMS:train_task\u001b[39m\n", "│ │ └── \u001b[39mtrain_task_sdt2sdf(filename, **kwargs)\u001b[39m\n", "│ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ ├── \u001b[39msampling_eachN_from_mesh(count=N, step=M, shift=K) -> (ns_ind[N], ns_xyz[N])\u001b[39m\n", "│ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msave_mesh(filepath, {name, array})\u001b[39m\n", "│ ├── \u001b[39msurface_ind2rgba(ind[..,1]) -> rgba[..,4]\u001b[39m\n", "│ ├── \u001b[39msurface_ind2xyz(ind[..,1]) -> ns_xyz[..,3]\u001b[39m\n", "│ ├── \u001b[39msurface_rgba() -> xyz[N,4]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz() -> xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2ind(ns_xyz[..,3]) -> ns_dist[..,1], ns_ind[..,1]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2localsdt(ns_xyz[3], spacing=(D,H,W), scale=1.) -> ns_xyz[D,H,W,3], ns_localsdt[D,H,W,1]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2rgba(ns_xyz[..,3]) -> rgba[..,4]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2sdt(ns_xyz[..,3]) -> ns_sdt[..,1]\u001b[39m\n", "│ ├── \u001b[39mtrain_task_sdt2sdf(filename, **kwargs)\u001b[39m\n", "│ ├── \u001b[39mtransform_sdt_ns2ps(ns_sdt[..]) -> ps_sdt[..]\u001b[39m\n", "│ ├── \u001b[39mtransform_sdt_ps2ns(ps_sdt[..]) -> ns_sdt[..]\u001b[39m\n", "│ ├── \u001b[39mtransform_xyz_ns2ps(ns_xyz[..,3]) -> ps_xyz[..,3]\u001b[39m\n", "│ ├── \u001b[39mtransform_xyz_ps2ns(ps_xyz[..,3]) -> ns_xyz[..,3]\u001b[39m\n", "│ └── \u001b[39munload_from_memory()\u001b[39m\n", "├── \u001b[32mO3D:patient069\u001b[37m ((-1.00, -1.00, -1.00), (1.00, 1.00, 1.00))\u001b[39m\n", "│ ├── \u001b[32mFS:colored_obj\u001b[37m mesh_obj^ ../tests/acdc_for_test/patient069/colored.obj\u001b[39m\n", "│ │ ├── \u001b[33mMS:sampling\u001b[39m\n", "│ │ │ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ │ │ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ │ │ └── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ │ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ │ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ │ ├── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ │ └── \u001b[39munload_from_memory()\u001b[39m\n", "│ ├── \u001b[32mFS:sdf_npy\u001b[37m sdt^ ../tests/acdc_for_test/patient069/sdf.npy\u001b[39m\n", "│ │ ├── \u001b[33mMS:sampling\u001b[39m\n", "│ │ │ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ │ │ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ │ │ └── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ │ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ │ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ │ ├── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ │ └── \u001b[39munload_from_memory()\u001b[39m\n", "│ ├── \u001b[31mTR:transform\u001b[37m to_cube\u001b[39m\n", "│ │ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ │ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ │ ├── \u001b[39mtransform_sdt_ns2ps(ns_sdt[..]) -> ps_sdt[..]\u001b[39m\n", "│ │ ├── \u001b[39mtransform_sdt_ps2ns(ps_sdt[..]) -> ns_sdt[..]\u001b[39m\n", "│ │ ├── \u001b[39mtransform_xyz_ns2ps(ns_xyz[..,3]) -> ps_xyz[..,3]\u001b[39m\n", "│ │ ├── \u001b[39mtransform_xyz_ps2ns(ps_xyz[..,3]) -> ns_xyz[..,3]\u001b[39m\n", "│ │ └── \u001b[39munload_from_memory()\u001b[39m\n", "│ ├── \u001b[33mMS:mesh\u001b[39m\n", "│ │ ├── \u001b[39msampling_eachN_from_mesh(count=N, step=M, shift=K) -> (ns_ind[N], ns_xyz[N])\u001b[39m\n", "│ │ ├── \u001b[39msave_mesh(filepath, {name, array})\u001b[39m\n", "│ │ ├── \u001b[39msurface_ind2xyz(ind[..,1]) -> ns_xyz[..,3]\u001b[39m\n", "│ │ ├── \u001b[39msurface_xyz() -> xyz[N,3]\u001b[39m\n", "│ │ └── \u001b[39msurface_xyz2ind(ns_xyz[..,3]) -> ns_dist[..,1], ns_ind[..,1]\u001b[39m\n", "│ ├── \u001b[33mMS:mesh_colors\u001b[39m\n", "│ │ ├── \u001b[39msurface_ind2rgba(ind[..,1]) -> rgba[..,4]\u001b[39m\n", "│ │ ├── \u001b[39msurface_rgba() -> xyz[N,4]\u001b[39m\n", "│ │ └── \u001b[39msurface_xyz2rgba(ns_xyz[..,3]) -> rgba[..,4]\u001b[39m\n", "│ ├── \u001b[33mMS:sampling\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ │ └── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ ├── \u001b[33mMS:sdt\u001b[39m\n", "│ │ ├── \u001b[39msurface_xyz2localsdt(ns_xyz[3], spacing=(D,H,W), scale=1.) -> ns_xyz[D,H,W,3], ns_localsdt[D,H,W,1]\u001b[39m\n", "│ │ └── \u001b[39msurface_xyz2sdt(ns_xyz[..,3]) -> ns_sdt[..,1]\u001b[39m\n", "│ ├── \u001b[33mMS:train_task\u001b[39m\n", "│ │ └── \u001b[39mtrain_task_sdt2sdf(filename, **kwargs)\u001b[39m\n", "│ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ ├── \u001b[39msampling_eachN_from_mesh(count=N, step=M, shift=K) -> (ns_ind[N], ns_xyz[N])\u001b[39m\n", "│ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msave_mesh(filepath, {name, array})\u001b[39m\n", "│ ├── \u001b[39msurface_ind2rgba(ind[..,1]) -> rgba[..,4]\u001b[39m\n", "│ ├── \u001b[39msurface_ind2xyz(ind[..,1]) -> ns_xyz[..,3]\u001b[39m\n", "│ ├── \u001b[39msurface_rgba() -> xyz[N,4]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz() -> xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2ind(ns_xyz[..,3]) -> ns_dist[..,1], ns_ind[..,1]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2localsdt(ns_xyz[3], spacing=(D,H,W), scale=1.) -> ns_xyz[D,H,W,3], ns_localsdt[D,H,W,1]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2rgba(ns_xyz[..,3]) -> rgba[..,4]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2sdt(ns_xyz[..,3]) -> ns_sdt[..,1]\u001b[39m\n", "│ ├── \u001b[39mtrain_task_sdt2sdf(filename, **kwargs)\u001b[39m\n", "│ ├── \u001b[39mtransform_sdt_ns2ps(ns_sdt[..]) -> ps_sdt[..]\u001b[39m\n", "│ ├── \u001b[39mtransform_sdt_ps2ns(ps_sdt[..]) -> ns_sdt[..]\u001b[39m\n", "│ ├── \u001b[39mtransform_xyz_ns2ps(ns_xyz[..,3]) -> ps_xyz[..,3]\u001b[39m\n", "│ ├── \u001b[39mtransform_xyz_ps2ns(ps_xyz[..,3]) -> ns_xyz[..,3]\u001b[39m\n", "│ └── \u001b[39munload_from_memory()\u001b[39m\n", "├── \u001b[32mO3D:patient089\u001b[37m ((-1.00, -1.00, -1.00), (1.00, 1.00, 1.00))\u001b[39m\n", "│ ├── \u001b[32mFS:colored_obj\u001b[37m mesh_obj^ ../tests/acdc_for_test/patient089/colored.obj\u001b[39m\n", "│ │ ├── \u001b[33mMS:sampling\u001b[39m\n", "│ │ │ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ │ │ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ │ │ └── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ │ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ │ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ │ ├── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ │ └── \u001b[39munload_from_memory()\u001b[39m\n", "│ ├── \u001b[32mFS:sdf_npy\u001b[37m sdt^ ../tests/acdc_for_test/patient089/sdf.npy\u001b[39m\n", "│ │ ├── \u001b[33mMS:sampling\u001b[39m\n", "│ │ │ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ │ │ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ │ │ └── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ │ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ │ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ │ ├── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ │ └── \u001b[39munload_from_memory()\u001b[39m\n", "│ ├── \u001b[31mTR:transform\u001b[37m to_cube\u001b[39m\n", "│ │ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ │ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ │ ├── \u001b[39mtransform_sdt_ns2ps(ns_sdt[..]) -> ps_sdt[..]\u001b[39m\n", "│ │ ├── \u001b[39mtransform_sdt_ps2ns(ps_sdt[..]) -> ns_sdt[..]\u001b[39m\n", "│ │ ├── \u001b[39mtransform_xyz_ns2ps(ns_xyz[..,3]) -> ps_xyz[..,3]\u001b[39m\n", "│ │ ├── \u001b[39mtransform_xyz_ps2ns(ps_xyz[..,3]) -> ns_xyz[..,3]\u001b[39m\n", "│ │ └── \u001b[39munload_from_memory()\u001b[39m\n", "│ ├── \u001b[33mMS:mesh\u001b[39m\n", "│ │ ├── \u001b[39msampling_eachN_from_mesh(count=N, step=M, shift=K) -> (ns_ind[N], ns_xyz[N])\u001b[39m\n", "│ │ ├── \u001b[39msave_mesh(filepath, {name, array})\u001b[39m\n", "│ │ ├── \u001b[39msurface_ind2xyz(ind[..,1]) -> ns_xyz[..,3]\u001b[39m\n", "│ │ ├── \u001b[39msurface_xyz() -> xyz[N,3]\u001b[39m\n", "│ │ └── \u001b[39msurface_xyz2ind(ns_xyz[..,3]) -> ns_dist[..,1], ns_ind[..,1]\u001b[39m\n", "│ ├── \u001b[33mMS:mesh_colors\u001b[39m\n", "│ │ ├── \u001b[39msurface_ind2rgba(ind[..,1]) -> rgba[..,4]\u001b[39m\n", "│ │ ├── \u001b[39msurface_rgba() -> xyz[N,4]\u001b[39m\n", "│ │ └── \u001b[39msurface_xyz2rgba(ns_xyz[..,3]) -> rgba[..,4]\u001b[39m\n", "│ ├── \u001b[33mMS:sampling\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ │ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ │ └── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ ├── \u001b[33mMS:sdt\u001b[39m\n", "│ │ ├── \u001b[39msurface_xyz2localsdt(ns_xyz[3], spacing=(D,H,W), scale=1.) -> ns_xyz[D,H,W,3], ns_localsdt[D,H,W,1]\u001b[39m\n", "│ │ └── \u001b[39msurface_xyz2sdt(ns_xyz[..,3]) -> ns_sdt[..,1]\u001b[39m\n", "│ ├── \u001b[33mMS:train_task\u001b[39m\n", "│ │ └── \u001b[39mtrain_task_sdt2sdf(filename, **kwargs)\u001b[39m\n", "│ ├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "│ ├── \u001b[39mprint(default|source|full)\u001b[39m\n", "│ ├── \u001b[39msampling_eachN_from_mesh(count=N, step=M, shift=K) -> (ns_ind[N], ns_xyz[N])\u001b[39m\n", "│ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msave_mesh(filepath, {name, array})\u001b[39m\n", "│ ├── \u001b[39msurface_ind2rgba(ind[..,1]) -> rgba[..,4]\u001b[39m\n", "│ ├── \u001b[39msurface_ind2xyz(ind[..,1]) -> ns_xyz[..,3]\u001b[39m\n", "│ ├── \u001b[39msurface_rgba() -> xyz[N,4]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz() -> xyz[N,3]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2ind(ns_xyz[..,3]) -> ns_dist[..,1], ns_ind[..,1]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2localsdt(ns_xyz[3], spacing=(D,H,W), scale=1.) -> ns_xyz[D,H,W,3], ns_localsdt[D,H,W,1]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2rgba(ns_xyz[..,3]) -> rgba[..,4]\u001b[39m\n", "│ ├── \u001b[39msurface_xyz2sdt(ns_xyz[..,3]) -> ns_sdt[..,1]\u001b[39m\n", "│ ├── \u001b[39mtrain_task_sdt2sdf(filename, **kwargs)\u001b[39m\n", "│ ├── \u001b[39mtransform_sdt_ns2ps(ns_sdt[..]) -> ps_sdt[..]\u001b[39m\n", "│ ├── \u001b[39mtransform_sdt_ps2ns(ps_sdt[..]) -> ns_sdt[..]\u001b[39m\n", "│ ├── \u001b[39mtransform_xyz_ns2ps(ns_xyz[..,3]) -> ps_xyz[..,3]\u001b[39m\n", "│ ├── \u001b[39mtransform_xyz_ps2ns(ps_xyz[..,3]) -> ns_xyz[..,3]\u001b[39m\n", "│ └── \u001b[39munload_from_memory()\u001b[39m\n", "├── \u001b[33mMS:sampling\u001b[39m\n", "│ ├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "│ ├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "│ └── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "├── \u001b[39minit()\u001b[39m\n", "├── \u001b[39mplot(default, filepath=None)\u001b[39m\n", "├── \u001b[39mpreload(identity|shift_and_scale|to_cube, scale, keep_in_memory=True)\u001b[39m\n", "├── \u001b[39mprint(default|source|full)\u001b[39m\n", "├── \u001b[39msampling_grid(spacing=(D,H,W)) -> ns_xyz[D,H,W,3]\u001b[39m\n", "├── \u001b[39msampling_grid_with_noise(key, spacing=(D,H,W), sigma) -> ns_xyz[N,3]\u001b[39m\n", "├── \u001b[39msampling_uniform(key, N) -> ns_xyz[N,3]\u001b[39m\n", "├── \u001b[39msave_space_to_file(filepath)\u001b[39m\n", "├── \u001b[39mto_json()\u001b[39m\n", "└── \u001b[39munload_from_memory()\u001b[39m\n" ] } ], "source": [ "print(space.print(\"full\"))" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3.10.6 ('venv': venv)", "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.10.6" }, "vscode": { "interpreter": { "hash": "7df3f0d875458626a4c317615cae74c2f84a43f9df17c4630077dfa765d920ab" } } }, "nbformat": 4, "nbformat_minor": 5 }