Skip to content

Commit 716785b

Browse files
committed
add vis depth notebook and ivw import
1 parent bf80638 commit 716785b

File tree

2 files changed

+815
-0
lines changed

2 files changed

+815
-0
lines changed

render_inviwo_export.ipynb

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 1,
6+
"id": "ba751520",
7+
"metadata": {
8+
"ExecuteTime": {
9+
"end_time": "2022-03-25T05:19:27.084605Z",
10+
"start_time": "2022-03-25T05:19:20.207121Z"
11+
}
12+
},
13+
"outputs": [
14+
{
15+
"name": "stdout",
16+
"output_type": "stream",
17+
"text": [
18+
"[Taichi] version 0.8.1, llvm 10.0.0, commit cc2dd342, linux, python 3.9.7\n",
19+
"[TaiGLSL] version 0.0.11\n"
20+
]
21+
}
22+
],
23+
"source": [
24+
"from pathlib import Path\n",
25+
"import torch\n",
26+
"import taichi as ti\n",
27+
"\n",
28+
"from torchvtk.datasets import TorchDataset\n",
29+
"from torchvtk.utils import make_4d, tex_from_pts, TFGenerator\n",
30+
"from torchvtk.rendering import plot_tf\n",
31+
"\n",
32+
"from differender.utils import get_tf, in_circles, get_rand_pos\n",
33+
"from differender.volume_raycaster import Raycaster, Mode\n",
34+
"import matplotlib.pyplot as plt"
35+
]
36+
},
37+
{
38+
"cell_type": "code",
39+
"execution_count": 2,
40+
"id": "39f48a72",
41+
"metadata": {
42+
"ExecuteTime": {
43+
"end_time": "2022-03-25T05:21:47.358728Z",
44+
"start_time": "2022-03-25T05:21:47.354221Z"
45+
}
46+
},
47+
"outputs": [],
48+
"source": [
49+
"ivw_export = Path('/home/dome/Dev/SemiTransparentDepth/test_data/inviwo_export')\n",
50+
"pred_path = ivw_export.parent/'predictions'"
51+
]
52+
},
53+
{
54+
"cell_type": "code",
55+
"execution_count": 5,
56+
"id": "55e7259d",
57+
"metadata": {
58+
"ExecuteTime": {
59+
"end_time": "2022-03-25T05:22:55.466404Z",
60+
"start_time": "2022-03-25T05:22:55.461647Z"
61+
}
62+
},
63+
"outputs": [],
64+
"source": [
65+
"fns = list(ivw_export.rglob('*.npy'))\n"
66+
]
67+
},
68+
{
69+
"cell_type": "code",
70+
"execution_count": 6,
71+
"id": "7e5ad29d",
72+
"metadata": {
73+
"ExecuteTime": {
74+
"end_time": "2022-03-25T05:22:55.801409Z",
75+
"start_time": "2022-03-25T05:22:55.792557Z"
76+
}
77+
},
78+
"outputs": [
79+
{
80+
"data": {
81+
"text/plain": [
82+
"[]"
83+
]
84+
},
85+
"execution_count": 6,
86+
"metadata": {},
87+
"output_type": "execute_result"
88+
}
89+
],
90+
"source": [
91+
"fns"
92+
]
93+
}
94+
],
95+
"metadata": {
96+
"kernelspec": {
97+
"display_name": "Python [conda env:stdepth] *",
98+
"language": "python",
99+
"name": "conda-env-stdepth-py"
100+
},
101+
"language_info": {
102+
"codemirror_mode": {
103+
"name": "ipython",
104+
"version": 3
105+
},
106+
"file_extension": ".py",
107+
"mimetype": "text/x-python",
108+
"name": "python",
109+
"nbconvert_exporter": "python",
110+
"pygments_lexer": "ipython3",
111+
"version": "3.9.7"
112+
},
113+
"toc": {
114+
"base_numbering": 1,
115+
"nav_menu": {},
116+
"number_sections": true,
117+
"sideBar": true,
118+
"skip_h1_title": false,
119+
"title_cell": "Table of Contents",
120+
"title_sidebar": "Contents",
121+
"toc_cell": false,
122+
"toc_position": {},
123+
"toc_section_display": true,
124+
"toc_window_display": false
125+
},
126+
"varInspector": {
127+
"cols": {
128+
"lenName": 16,
129+
"lenType": 16,
130+
"lenVar": 40
131+
},
132+
"kernels_config": {
133+
"python": {
134+
"delete_cmd_postfix": "",
135+
"delete_cmd_prefix": "del ",
136+
"library": "var_list.py",
137+
"varRefreshCmd": "print(var_dic_list())"
138+
},
139+
"r": {
140+
"delete_cmd_postfix": ") ",
141+
"delete_cmd_prefix": "rm(",
142+
"library": "var_list.r",
143+
"varRefreshCmd": "cat(var_dic_list()) "
144+
}
145+
},
146+
"types_to_exclude": [
147+
"module",
148+
"function",
149+
"builtin_function_or_method",
150+
"instance",
151+
"_Feature"
152+
],
153+
"window_display": false
154+
}
155+
},
156+
"nbformat": 4,
157+
"nbformat_minor": 5
158+
}

0 commit comments

Comments
 (0)