Open ArkashJ opened 2 weeks ago
What was the error?
This was the code and I kept getting Jupyter Kernel Crashed error. I added pyvista.start_xvfb() and it worked with mamba but not with uv
Possibly related to #8429 — hard to say without more details though.
I'm linking my jupyter notebook for reference here, I basically setup my uv environment and installed the packages from the setup.py. When I run the code from the ss above, it fails,
{
"cells": [
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"from cell_interactome.visualization.visualize_3d import (\n",
" load_volume,\n",
" np_to_grid,\n",
" get_cell_interior_transfer_function,\n",
")\n",
"from pathlib import Path\n",
"import pyvista as pv\n",
"import matplotlib.pyplot as plt\n",
"\n",
"%config InlineBackend.figure_format = \"retina\"\n",
"\n",
"pv.set_jupyter_backend(\"trame\")\n",
"\n",
"%load_ext autoreload\n",
"%autoreload 2"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"data_path = Path(\n",
" \"/nfs/scratch2/shared_image_recog_ml/llsm_3d_ds/20221220_p5_p55_sCMOS_Anwesha_Anand_Ricky__CS1_vps35egfp_pHrodored_A647Tf__Ex04_488_100mW_560_100mW_642_200mW_z0p5/488nm_CAM1/3D/frame_30/part_0.pth\"\n",
")\n",
"# data_path = Path(\n",
"# \"/nfs/scratch2/shared_image_recog_ml/llsm_3d_ds/20221006_p5_p55_sCMOS_vps4_Galectin_care__processed__CS1__Ex02_488_200mW_560_100mW_z0p5/488nm_CamA/3D/frame_30/part_0.pth\"\n",
"# )"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
"volume = load_volume(data_path)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(84, 600, 687)"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"volume.shape"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABC0AAANYCAYA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+PgAAADRFrrTYATNnzoz+/fvHvHnzYs8994zrrrsufv7zn8fUqVPj17/+dVx++eVRXV0dU6ZMiSFDhsS6des2e/2f/vSnWLNmTUREHHnkkbF8+fL4yle+Eu3bt48uXbrEwQcfHO3atYuBAwfGCy+8UIF3CAAAAJXnSosdMHz48Hjvvffi6KOPjmeeeSbat2+/2fpBgwbF6aefHoMHD45XXnklxowZExdffHFx/WuvvVZc/vDDD6NXr14xY8aMzfaxdu3a+M1vfhPPPfdc3HLLLXHttdeW9k0BAABAMq602E4vvvhivPzyyxER8fDDD28RLDb61Kc+FZ/97GcjIrZ4Isnf//734vKtt94aM2bMiE996lMxefLkWLNmTSxZsiRGjx4d7dq1i0KhECNHjix+nAQAAACaCtFiOz399NMREXHYYYfFkUceWee2J5xwQkRETJkyZbObcq5cubK4vGbNmhg4cGCMHz8+evfuHS1atIgOHTrEF7/4xRg/fnzstts//hNdd9110cSeTgsAAEATJ1psp6lTp0ZExJtvvhlVVVV1fm18Ksi6des2u7rin2+weeutt0azZs22OFa/fv3irLPOioiI119/PV599dVSvS0AAABIR7TYTkuWLNmh161ataq4vMceexSXO3ToEEcffXStrzv11FOLy1OmTNmhYwMAAEBj5Eac22nDhg0REfGJT3wifvrTn9b7dQceeGBxuXPnzsXlTp061fm6TbddunRpvY8HAAAAjZ1osZ322WefiIhYsWJFfOxjH9uhfXz0ox8tLm+MILXZdH11tf9cAAAANB0+HrKdNn6UY/bs2fHWW2/t0D4OOuig6NKlS0REzJ07t84bbM6aNau4vOnVGgAAALCrEy220xlnnBEREYVCIe66664d3s+wYcMiImL58uXx3HPP1brdk08+WVzu16/fDh8PAAAAGhvRYjsNGjQo+vTpExERt99+e4wdO7bO7V999dUYN27cFr//la98pfgUka997WuxfPnyLbb56U9/Gi+88EJERAwePHiz+1sAAADArq6qUNdnE3ZBL730UsycObP462XLlsW///u/R0TEcccdFxdddNFm248YMWKLfcyaNSv69OlTfIzpZz7zmTj33HPj0EMPjWbNmsWSJUti2rRpMW7cuPjd734XV199dXzve9/bYj+33357XHPNNRERcdhhh8W1114bH//4x2P58uXx5JNPxujRo2PDhg2x5557xtSpU+PQQw9tqD8GAAAASK/JRYsRI0bEww8/XO/ta/vjmT59egwbNiz+/Oc/b3MfN910U9xwww1bXXfdddfFrbfeWutxOnbsGE899VT07du33mMGAACAXYFosQ11/fFs2LAhxo4dG0888URMmTIlli5dGhs2bIh99tknDjvssOjXr18MHTo0/uVf/qXOY0yaNClGjx4dL774YixevDhatmwZPXr0iDPOOCOuvPLKaNeuXb3HCwAAALuKJhctAAAAgMbBjTgBAACAlEQLAAAAICXRAgAAAEhJtAAAAABSqq70AEppzZo18eqrr0ZERIcOHaK6epd+uwAAAFAR69evj6VLl0ZExJFHHhktW7ZskP3u0j/Fv/rqq9GnT59KDwMAAACajMmTJ0fv3r0bZF8+HgIAAACktEtfadGhQ4fi8uTJk2P//fev4GgAAABg17R48eLiJx02/Vl8Z+3S0WLTe1jsv//+0alTpwqOBgAAAHZ9DXk/SR8PAQAAAFISLQAAAICURAsAAAAgJdECAAAASEm0AAAAAFISLQAAAICURAsAAAAgJdECAAAASEm0AAAAAFISLQAAAICURAsAAAAgJdECAAAASEm0AAAAAFISLQAAAICURAsAAAAgJdECAAAASEm0AAAAAFISLQAAAICURAsAAAAgJdECAAAASEm0AAAAAFISLQAAAICURAsAAAAgJdECAAAASEm0AAAAAFISLQAAAICURAsAAAAgJdECAAAASEm0AAAAAFISLQAAAICURAsAAAAgJdECAAAASEm0AAAAAFKqrvQA2LquIydsc5u5owaXYSQAAABQGa60AAAAAFISLQAAAICURAsAAAAgJdECAAAASEm0AAAAAFISLQAAAICURAsAAAAgJdECAAAASEm0AAAAAFISLQAAAICURAsAAAAgJdECAAAASEm0AAAAAFISLQAAAICURAsAAAAgJdECAAAASEm0AAAAAFISLQAAAICURAsAAAAgJdECAAAASEm0AAAAAFISLQAAAICURAsAAAAgJdECAAAASEm0AAAAAFISLQAAAICURAsAAAAgJdECAAAASEm0AAAAAFIS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RECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUqpYtLj22mujqqqq+PXCCy9UaigAAABAQhWJFn/84x/jP//zPytxaAAAAKCRKHu0+PDDD+OSSy6J9evXR8eOHct9eAAAAKCRKHu0+MEPfhBTpkyJnj17xoUXXljuwwMAAACNRFmjxV//+tf4xje+ERER99xzTzRv3rychwcAAAAakbJGi8svvzxWrFgRw4cPj/79+5fz0AAAAEAjU7ZoMXbs2Bg/fnzsvffe8b3vfa9chwUAAAAaqepyHOTdd9+Nq666KiIibr311mjfvn2D7HfBggV1rl+8eHGDHAcAAAAov7JEi2uuuSbeeuutOO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17J4QAAAACJVDRaREQMGTIkIiJWrlwZ//u//1vh0QAAAABZVDxadOjQobg8b968Co4EAAAAyKTi0WLhwoXF5bZt21ZwJAAAAEAmFY8Wjz32WHH5yCOPrOBIAAAAgExKFi3GjBkTa9asqXObO++8M375y19GRMTBBx8cxx9/fKmGAwAAADQyJXvk6Te/+c24+uqrY9iwYdGvX7/o1q1btG3bNt5///149dVX47/+679i4sSJERHRvHnzuO+++6JZs2alGg4AAADQyJQsWkRE/P3vf4/7778/7r///lq36dSpU/z4xz+OU045pZRDAQAAABqZkkWLX//61zFhwoSYOHFizJw5M/72t7/F22+/Ha1atYqOHTvGUUcdFaeffnqcc8450bp161INAwAAAGikShYtDjvssDjssMPia1/7WqkOAQAAAOzCKv70EAAAAICtES0AAACAlEQLAAAAICXRAgAAAEhJtAAAAABSEi0AAACAlEQLAAAAICXRAgAAAEhJtAAAAABSEi0AAACAlEQLAAAAICXRAgAAAEhJtAAAAABSEi0AAACAlEQLAAAAICXRAgAAAEhJtAAAAABSEi0AAACAlEQLAAAAICXRAgAAAEhJtAAAAABSEi0AAACAlEQLAAAAICXRAgAAAEhJtAAAAABSEi0AAACAlEQLAAAAICXRAgAAAEhJtAAAAABSEi0AAACAlEQLAAAAICXRAgAAAEhJtAAAAABSEi0AAACAlEQLAAAAICXRAgAAAEhJtAAAAABSEi0AAACAlEQLAAAAICXRAgAAAEhJtAAAAABSEi0AAACAlEQLAAAAICXRAgAAAEhJtAAAAABSEi0AAACAlEQLAAAAICXRAgAAAEiputIDAMiq68gJ29xm7qjBZRgJAAA0Ta60AAAAAFISLQAAAICURAsAAAAgJdECAAAASEm0AAAAAFISLQAAAICURAsAAAAgJdECAAAASEm0AAAAAFKqrvQAgM11HTlhm9vMHTW4DCMBAACoLFdaAAAAACmJFgAAAEBKogUAAACQkmgBAAAApCRaAAAAACmJFgAAAEBKogUAAACQkmgBAAAApCRaAAAAACmJFgAAAEBKogUAAACQkmgBAAAApCRaAAAAACmJFgAAAEBKogUAAAC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J69OgRV199damHAwAAADQSVYVCoVDqg4wbNy4+//nPx/Lly7e6vkePHjFhwoTo3r17qYcCAAAANBJliRYREfPmzYu77rorJkyYEAsWLIjmzZtH9+7d4+yzz44rrrgiWrduXY5hAAAAAI1E2aIFAAAAwPYo6Y04AQAAAHaUaAEAAACkJFoAAAAAKYkWAAAAQEqiBQAAAJCSaAEAAACkJFoAAAAAKYkWAAAAQEqiRSLz5s2Lq6++Onr27Blt2rSJvffeO3r37h233357rFq1qtLDo4mqqqqq19eJJ564zX396le/iqFDh0anTp2iRYsW0alTpxg6dGj86le/Kv0bYZezZMmSGD9+fNxwww1x2mmnRfv27YvzccSIEdu9v4aYn+vXr4977rknjj/++OjQoUO0atUqunXrFpdeemn85S9/2e4xsWtriDk8ZsyYep+nx4wZs839rVq1Km677bbo3bt37L333tGmTZvo2bNnXH311TFv3ryde8PscqZOnRrf+ta3YtCgQcVzZ9u2baNHjx5xwQUXxEsvvbRd+3MeptwaYg47D5dBgRSefvrpwp577lmIiK1+9ejRozBjxoxKD5MmqLY5+c9f/fv3r3UfGzZsKFx44YV1vv6iiy4qbNiwoXxvjEavrvk0fPjweu+noebn0qVLC7179651Hy1atCjcf//9O/mu2ZU0xBx+6KGH6n2efuihh+rc14wZMwqHHnpora/fc889C+PGjdv5N84u4fjjj6/XvDv//PMLH3zwQZ37ch6mEhpqDjsPl171FhWDsps2bVqce+65sXr16mjbtm1cd911MWDAgFi9enU8+uijcf/998f06dNj8ODBMXXq1Nhjjz0qPWSaoC996Utx2WWX1bq+TZs2ta67/vrr48EHH4yIiKOPPjquueaa6NatW8yaNStuu+22mDZtWjzwwAPRoUOHuPnmmxt87Oz6unTpEj179oxnnnlmu1/bEPNzw4YNMXTo0JgyZUpERJx11llx8cUXx9577x2vvPJKfOc734klS5bEpZdeGgceeGCcdtppO/5m2SXtzBze6Ne//nUccMABta7v1KlTrevef//9GDx4cMyYMSMiIi6++OL43Oc+F61atYrnn38+brnllli+fHmce+65MXHixDjqqKN2e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vLhhx++xXrnYbLb1hz+Z87DpSFaVNCaNWti2bJlEVH3nWQjIj7ykY8Un84wf/78ko8N/tlrr70Wr7/+eqxevTpWrFgRM2fOjEceeSROOumkGDp0aPGStk0tWLCguLytOd65c+fisjlOOTTU/NyR/RQKhc1eBw3hhRdeiMWLF8e6devi7bffjldeeSW++93vRvfu3ePee++t9XUb52KbNm1ir732qvMYG+fw0qVLN/sXSPhnH374YYwaNar463POOWeLbZyHyaw+c/ifOQ+XhkeeVtD7779fXG7btu02t2/Tpk2sXLkyVqxYUcphwWZat24dZ5xxRpx88snRs2fPaNu2bSxdujRqamrinnvuibfffjueeuqpGDJkSDz77LOx++67F1+7PXN800emmuOUQ0PNT/OcSjvkkEPirLPOir59+xa/mZ09e3Y88cQT8fjjj8eaNWvii1/8YlRVVcUll1yyxes3zuH6fi+y0YoVK6JFixYN9C7Y1dx5550xefLkiPjH40e39jFo52Eyq88c3sh5uLREiwpas2ZNcbl58+bb3H7jhFy9enXJxgT/bOHChVstvgMHDowrr7wyTjvttJg2bVrU1NTE6NGj48tf/nJxm+2Z45uecM1xyqGh5qd5TiUNHTo0hg8fHlVVVZv9fu/evePcc8+N8ePHx1lnnRXr1q2Lr371q3HGGWfEfvvtt9m2G+fw9nwvEmEOU7uampoYOXJkRER07NgxRo8evdXtnIfJqr5zOMJ5uBx8PKSCWrZsWVxeu3btNrffePlPq1atSjYm+Gd1XaK27777xuOPP168uuLuu+/ebP32zPFNL28zxymHhpqf5jmV1K5duy2+Ud7U6aefHjfccENERKxatSoefPDBLbbZOIe353uRCHOYrfvLX/4SQ4cOjfXr10fLli3jsccei44dO251W+dhMtqeORzhPFwOokUF7bHHHsXl+lyetvFmQfW5bAjK5ZBDDomBAwdGRMTMmTOLdwGP2L45vunNsMxxyqGh5qd5TnaXXHJJ8RvqTW8qt9HGObw934tEmMNsac6cOTFo0KB45513olmzZvHoo4/GCSecUOv2zsNks71zuL6ch3eOaFFBLVu2jH322SciYps3AnrnnXeKE3TTGxFB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BYvXp1PProo3HfffdFxD8q8tSpUze7QzKUUteuXWPdunUxbNiw6Nu3b3Tt2jVatWoVy5YtixdeeCHuvffe4qVu/fr1i9/85jdbvSHQddddF6NGjYqIiKOPPjquvfba6NatW8yaNStuvfXWmDZtWnG7m2++uXxvkEbtpZdeipkzZxZ/vWzZsvj3f//3iPjHJZMXXXTRZtuPGDFiq/tpiPm5YcOG6N+/f0ycODEiIoYNGxYXX3xxfOQjH4nJkyfHt7/97ViyZEnstttuMX78+DjttNN26r2za9jZOfzCCy/EgAEDom/fvvGZz3wmPvGJTxQfyzd79ux4/PHH4/HHHy/+i92PfvSjuOyyy7Y6lvfffz969epVvHT+kksuic997nPRqlWreP755+Pmm2+OFStWRKtWreLll1+Oo446qiH+CGjEhg0bFk8++WRERJx00knx/e9/v84rJZs3bx49evTY6jrnYSqhIeaw83CZVLaZsNHTTz9drL9b++rRo0dhxowZlR4mTcxBBx1U65zc9GvYsGGFd955p9b9bNiwofBv//Zvde7jwgsvLGzYsKF8b45Gb/jw4fWanxu/atNQ83Pp0qWF3r1717qPFi1aFO6///6G/mOgEdvZOfz888/X63WtW7cu3Hvvvdscz4wZMwqHHnporfvZc889C+PGjSvFHwWN0PbM3YgoHHTQQbXuy3mYSmiIOew8XB6utEhk3rx5cdddd8WECRNiwYIF0bx58+jevXucffbZccUVV0Tr1q0rPUSamJqamqipqYlJkybF7NmzY9myZbF8+fJo27ZtdO7cOT75yU/G8OHDo2/fvvXa3y9/+cu47777YsqUKbFs2bJo37599O7dOy699FL/4sF2GzFiRDz88MP13n5b/7triPm5fv36uP/+++NnP/tZvP7667Fy5co44IAD4uSTT46rrroqPvrRj9Z7vOz6dnYOv//++/H000/HpEmTYurUqbF48eJYtmxZrF+/Pj7ykY/ERz/60Tj55JPjoosuKv7L37asXLkyfvSjH8Vjjz0WM2fOjLVr10bnzp3j05/+dFx11VVx0EEHbdd7ZNe1vfefOuigg2Lu3Ll1buM8TDk1xBx2Hi4P0QIAAABIydNDAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUhItAAAAgJRECwAAACAl0QIAAABISbQAAAAAUvp//RbIN8hEGmoAAAAASUVORK5CYII=",
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {
"image/png": {
"height": 428,
"width": 534
}
},
"output_type": "display_data"
}
],
"source": [
"fig, ax = plt.subplots()\n",
"ax.hist(volume.flatten(), bins=100)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"mean, std = volume.mean(), volume.std()\n",
"maximum = volume.max()"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"opacity = get_cell_interior_transfer_function(maximum, std)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
" 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,\n",
" 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,\n",
" 255, 255, 255, 255, 255, 255, 255, 255, 255], dtype=uint8)"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"opacity"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "0e5b63c08d93410d9c6e30cdda07b6fb",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Widget(value='<iframe src=\"http://localhost:37703/index.html?ui=P_0x7fb3533161d0_1&reconnect=auto\" class=\"pyvi…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"pv.start_xvfb()\n",
"\n",
"pl = pv.Plotter()\n",
"pl.add_volume(\n",
" volume,\n",
" opacity=\"sigmoid\",\n",
" cmap=\"gray\", # You can choose other colormaps\n",
" show_scalar_bar=False,\n",
" shade=False,\n",
" n_colors=256,\n",
")\n",
"pl.camera_position = \"yx\"\n",
"pl.camera.elevation = 60\n",
"pl.background_color = \"black\"\n",
"\n",
"pl.show(jupyter_backend=\"server\")"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'pv' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[2], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mpv\u001b[49m\u001b[38;5;241m.\u001b[39mstart_xvfb()\n\u001b[1;32m 2\u001b[0m pl \u001b[38;5;241m=\u001b[39m pv\u001b[38;5;241m.\u001b[39mPlotter()\n\u001b[1;32m 3\u001b[0m pl\u001b[38;5;241m.\u001b[39madd_volume(\n\u001b[1;32m 4\u001b[0m volume,\n\u001b[1;32m 5\u001b[0m opacity\u001b[38;5;241m=\u001b[39mopacity,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 9\u001b[0m n_colors\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m256\u001b[39m,\n\u001b[1;32m 10\u001b[0m )\n",
"\u001b[0;31mNameError\u001b[0m: name 'pv' is not defined"
]
}
],
"source": [
"pv.start_xvfb()\n",
"pl = pv.Plotter()\n",
"pl.add_volume(\n",
" volume,\n",
" opacity=opacity,\n",
" cmap=\"gray\", # You can choose other colormaps\n",
" show_scalar_bar=False,\n",
" shade=False,\n",
" n_colors=256,\n",
")\n",
"pl.camera_position = \"yx\"\n",
"pl.camera.elevation = 60\n",
"pl.background_color = \"black\"\n",
"\n",
"pl.show(jupyter_backend=\"server\")"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {},
"outputs": [],
"source": [
"grid = np_to_grid(volume)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"pl = pv.Plotter()\n",
"pl.add_volume(\n",
" grid,\n",
" opacity=\"sigmoid\", # use for full opacity\n",
" cmap=\"gray\", # You can choose other colormaps\n",
" show_scalar_bar=False,\n",
" n_colors=256,\n",
")\n",
"pl.camera_position = \"yx\"\n",
"pl.camera.elevation = 60\n",
"pl.background_color = \"black\"\n",
"pl.show(jupyter_backend=\"server\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"pl = pv.Plotter()\n",
"pl.add_volume(\n",
" grid,\n",
" opacity=opacity,\n",
" cmap=\"gray\", # You can choose other colormaps\n",
" show_scalar_bar=False,\n",
" n_colors=256,\n",
")\n",
"pl.camera_position = \"yx\"\n",
"pl.camera.elevation = 60\n",
"pl.background_color = \"black\"\n",
"pl.show(jupyter_backend=\"server\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": ".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.15"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
I'm working on a remote machine doing 3D computer vision and needed to install VTK for pyvista for enabling a GPU implementation for generating movies. uv fails in this case and the kernel kept crashing. I read every documentation page to debug the error and ended up using mamba instead. I was using
uv pip install -e ".[dev, xformers,viz3d]"
and switched to a mamba environment with a python installation ofpython3 -m pip install -e".[dev, xformers,viz3d]"
and it worked. Is this a uv issues?https://docs.pyvista.org/extras/building_vtk.html