{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Volume data in vedo" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from vedo import Volume, settings, dataurl\n", "from vedo.applications import RayCastPlotter\n", "\n", "settings.default_backend = \"vtk\" # or k3d, ipyvtk, or 2d" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "
\n", "\n", "
\n", "vedo.volume.Volume\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
bounds
(x/y/z)
0 ... 1.290e+4
0 ... 8219
0 ... 1.103e+4
dimensions (125, 80, 107)
voxel spacing (104, 104, 104)
in memory size 1MB
point data array Tiff Scalars
scalar range (0, 150.0)
\n", "
" ], "text/plain": [ "" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "vol = Volume(dataurl + \"embryo.tif\")\n", "vol.mode(1).cmap(\"jet\") # change appearance" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "plt = RayCastPlotter(vol, bg=\"blackboard\", axes=7)\n", "plt.show(viewup=\"z\")\n", "plt.close()" ] } ], "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.10.10" } }, "nbformat": 4, "nbformat_minor": 2 }