{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "ExecuteTime": { "end_time": "2019-09-10T04:24:17.684090Z", "start_time": "2019-09-10T04:24:17.662336Z" } }, "outputs": [], "source": [ "%load_ext autoreload\n", "%autoreload 2" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "ExecuteTime": { "end_time": "2019-09-10T04:24:23.770225Z", "start_time": "2019-09-10T04:24:17.686194Z" } }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/mnt/cube/tsainbur/conda_envs/tpy3/lib/python3.6/site-packages/tqdm/autonotebook/__init__.py:14: TqdmExperimentalWarning: Using `tqdm.autonotebook.tqdm` in notebook mode. Use `tqdm.tqdm` instead to force console mode (e.g. in jupyter console)\n", " \" (e.g. in jupyter console)\", TqdmExperimentalWarning)\n" ] } ], "source": [ "from birdbrain.atlas import atlas\n", "from birdbrain.utils import um_to_vox\n", "from birdbrain import utils\n", "from birdbrain.paths import DATA_DIR\n", "from birdbrain.visualization.plots_3d.plot_regions_3d import plot_regions_3d" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "ExecuteTime": { "end_time": "2019-09-10T04:24:58.163375Z", "start_time": "2019-09-10T04:24:23.772849Z" } }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "qform_code 32 not valid; setting to 0\n", "qform_code 32 not valid; setting to 0\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Data already download\n", "Loading brain labels...\n", "Getting voxel data from .img files...\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "qform_code 32 not valid; setting to 0\n", "qform_code 32 not valid; setting to 0\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, max=1), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\r" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, max=22), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\r" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, max=12), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\r" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, max=11), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\r", "Getting location for each nucleus/region from voxel data...\n" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, max=45), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\r", "Atlas created\n" ] } ], "source": [ "starling_atlas = atlas(\n", " species = 'starling',\n", " um_mult = 100,\n", " smoothing = ['Brain'],#, 'Nuclei', 'Tracts', 'Brainregions'],\n", " updated_y_sinus = [0, 1500, 0]\n", ")" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "ExecuteTime": { "end_time": "2019-09-10T04:24:59.193497Z", "start_time": "2019-09-10T04:24:58.167835Z" } }, "outputs": [ { "data": { "text/plain": [ "dict_keys(['Brainregions', 'Nuclei', 'Tracts'])" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "starling_atlas.regions.keys()" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "ExecuteTime": { "end_time": "2019-09-10T04:26:30.883402Z", "start_time": "2019-09-10T04:26:16.822716Z" }, "scrolled": false }, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "", "version_major": 2, "version_minor": 0 }, "text/plain": [ "HBox(children=(IntProgress(value=0, max=11), HTML(value='')))" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "\r" ] }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "b5bc809ccc4344da8a8f91c33e4ad318", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Output()" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "e4219906c3f1417abac432cee04db0b3", "version_major": 2, "version_minor": 0 }, "text/plain": [ "FloatSlider(value=0.0, description='medial-lateral:', max=10937.0, min=-10737.0, step=100.0)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "c5d9f2176eda40d6a80378371323a200", "version_major": 2, "version_minor": 0 }, "text/plain": [ "FloatSlider(value=0.0, description='posterior-anterior:', max=13337.0, min=-8337.0, step=100.0)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "351d11feec384565994f4b32a6c74263", "version_major": 2, "version_minor": 0 }, "text/plain": [ "FloatSlider(value=0.0, description='ventral-dorsal:', max=4237.0, min=-17437.0, step=100.0)" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "0122c5fffcd549b68e62802b7dbd4e22", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Dropdown(description='Region:', index=11, options=('Nidopallium', 'Mesopallium', 'Arcopallium', 'Hyperpallium'…" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "plot, vec = plot_regions_3d(\n", " starling_atlas,\n", " regions_to_plot=starling_atlas.regions[\"Brainregions\"],\n", " downsample_frac=1,\n", " polygon_simplification=0,\n", " verbose=False,\n", " height=800,\n", " show_labels=True,\n", ")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.6.7" } }, "nbformat": 4, "nbformat_minor": 2 }