diff --git a/volumetric_imaging/anaconda-project-lock.yml b/volumetric_imaging/anaconda-project-lock.yml new file mode 100644 index 000000000..103a4e5d3 --- /dev/null +++ b/volumetric_imaging/anaconda-project-lock.yml @@ -0,0 +1,433 @@ +# This is an Anaconda project lock file. +# The lock file locks down exact versions of all your dependencies. +# +# In most cases, this file is automatically maintained by the `anaconda-project` command or GUI tools. +# It's best to keep this file in revision control (such as git or svn). +# The file is in YAML format, please see http://www.yaml.org/start.html for more. +# + +# +# Set to false to ignore locked versions. +# +locking_enabled: true + +# +# A key goes in here for each env spec. +# +env_specs: + default: + locked: true + env_spec_hash: d394747b111fb937e4709cee44a9d55e485797b9 + platforms: + - linux-64 + - osx-64 + - osx-arm64 + - win-64 + packages: + all: + - anyio=4.6.2.post1=pyhd8ed1ab_0 + - argon2-cffi=23.1.0=pyhd8ed1ab_1 + - arrow=1.3.0=pyhd8ed1ab_0 + - asttokens=3.0.0=pyhd8ed1ab_1 + - async-lru=2.0.4=pyhd8ed1ab_0 + - attrs=24.2.0=pyh71513ae_0 + - babel=2.16.0=pyhd8ed1ab_1 + - beautifulsoup4=4.12.3=pyha770c72_1 + - bleach=6.2.0=pyhd8ed1ab_1 + - bokeh=3.6.2=pyhd8ed1ab_0 + - cached-property=1.5.2=hd8ed1ab_1 + - cached_property=1.5.2=pyha770c72_1 + - certifi=2024.8.30=pyhd8ed1ab_0 + - charset-normalizer=3.4.0=pyhd8ed1ab_1 + - colorama=0.4.6=pyhd8ed1ab_1 + - comm=0.2.2=pyhd8ed1ab_0 + - decorator=5.1.1=pyhd8ed1ab_1 + - defusedxml=0.7.1=pyhd8ed1ab_0 + - entrypoints=0.4=pyhd8ed1ab_1 + - exceptiongroup=1.2.2=pyhd8ed1ab_1 + - executing=2.1.0=pyhd8ed1ab_0 + - fqdn=1.5.1=pyhd8ed1ab_1 + - h11=0.14.0=pyhd8ed1ab_1 + - h2=4.1.0=pyhd8ed1ab_1 + - hpack=4.0.0=pyhd8ed1ab_1 + - httpcore=1.0.7=pyh29332c3_1 + - httpx=0.28.0=pyhd8ed1ab_0 + - hyperframe=6.0.1=pyhd8ed1ab_1 + - idna=3.10=pyhd8ed1ab_1 + - importlib-metadata=8.5.0=pyha770c72_1 + - importlib_resources=6.4.5=pyhd8ed1ab_1 + - isoduration=20.11.0=pyhd8ed1ab_0 + - jedi=0.19.2=pyhd8ed1ab_1 + - jinja2=3.1.4=pyhd8ed1ab_1 + - json5=0.10.0=pyhd8ed1ab_1 + - jsonschema-specifications=2024.10.1=pyhd8ed1ab_0 + - jsonschema-with-format-nongpl=4.23.0=hd8ed1ab_0 + - jsonschema=4.23.0=pyhd8ed1ab_0 + - jupyter-lsp=2.2.5=pyhd8ed1ab_0 + - jupyter_client=8.6.3=pyhd8ed1ab_0 + - jupyter_events=0.10.0=pyhd8ed1ab_0 + - jupyter_server=2.14.2=pyhd8ed1ab_1 + - jupyter_server_terminals=0.5.3=pyhd8ed1ab_1 + - jupyterlab=4.3.2=pyhd8ed1ab_0 + - jupyterlab_pygments=0.3.0=pyhd8ed1ab_2 + - jupyterlab_server=2.27.3=pyhd8ed1ab_0 + - linkify-it-py=2.0.3=pyhd8ed1ab_0 + - markdown-it-py=3.0.0=pyhd8ed1ab_1 + - markdown=3.6=pyhd8ed1ab_0 + - matplotlib-inline=0.1.7=pyhd8ed1ab_1 + - mdit-py-plugins=0.4.2=pyhd8ed1ab_0 + - mdurl=0.1.2=pyhd8ed1ab_1 + - mistune=3.0.2=pyhd8ed1ab_1 + - nbclient=0.10.1=pyhd8ed1ab_0 + - nbconvert-core=7.16.4=pyhff2d567_2 + - nbformat=5.10.4=pyhd8ed1ab_1 + - nest-asyncio=1.6.0=pyhd8ed1ab_1 + - notebook-shim=0.2.4=pyhd8ed1ab_1 + - notebook=7.3.1=pyhd8ed1ab_0 + - overrides=7.7.0=pyhd8ed1ab_0 + - packaging=24.2=pyhd8ed1ab_2 + - pandocfilters=1.5.0=pyhd8ed1ab_0 + - panel=1.5.4=pyhd8ed1ab_0 + - param=2.1.1=pyhff2d567_0 + - parso=0.8.4=pyhd8ed1ab_1 + - pickleshare=0.7.5=pyhd8ed1ab_1004 + - pip=24.3.1=pyh8b19718_0 + - pkgutil-resolve-name=1.3.10=pyhd8ed1ab_2 + - platformdirs=4.3.6=pyhd8ed1ab_1 + - prometheus_client=0.21.1=pyhd8ed1ab_0 + - prompt-toolkit=3.0.48=pyha770c72_1 + - pure_eval=0.2.3=pyhd8ed1ab_0 + - pycparser=2.22=pyh29332c3_1 + - pygments=2.18.0=pyhd8ed1ab_1 + - python-dateutil=2.9.0.post0=pyhff2d567_1 + - python-fastjsonschema=2.21.1=pyhd8ed1ab_0 + - python-json-logger=2.0.7=pyhd8ed1ab_0 + - python-tzdata=2024.2=pyhd8ed1ab_1 + - python_abi=3.11=5_cp311 + - pytz=2024.1=pyhd8ed1ab_0 + - pyviz_comms=3.0.3=pyhd8ed1ab_0 + - referencing=0.35.1=pyhd8ed1ab_1 + - requests=2.32.3=pyhd8ed1ab_1 + - rfc3339-validator=0.1.4=pyhd8ed1ab_0 + - rfc3986-validator=0.1.1=pyh9f0ad1d_0 + - setuptools=75.6.0=pyhff2d567_1 + - six=1.17.0=pyhd8ed1ab_0 + - sniffio=1.3.1=pyhd8ed1ab_1 + - soupsieve=2.5=pyhd8ed1ab_1 + - stack_data=0.6.2=pyhd8ed1ab_0 + - tinycss2=1.4.0=pyhd8ed1ab_0 + - tomli=2.2.1=pyhd8ed1ab_1 + - tqdm=4.67.1=pyhd8ed1ab_0 + - traitlets=5.14.3=pyhd8ed1ab_1 + - types-python-dateutil=2.9.0.20241003=pyhd8ed1ab_1 + - typing-extensions=4.12.2=hd8ed1ab_1 + - typing_extensions=4.12.2=pyha770c72_1 + - typing_utils=0.1.0=pyhd8ed1ab_1 + - tzdata=2024b=hc8b5060_0 + - uc-micro-py=1.0.3=pyhd8ed1ab_0 + - uri-template=1.3.0=pyhd8ed1ab_1 + - urllib3=2.2.3=pyhd8ed1ab_1 + - wcwidth=0.2.13=pyhd8ed1ab_1 + - webcolors=24.11.1=pyhd8ed1ab_0 + - webencodings=0.5.1=pyhd8ed1ab_3 + - websocket-client=1.8.0=pyhd8ed1ab_1 + - wheel=0.45.1=pyhd8ed1ab_1 + - xyzservices=2024.9.0=pyhd8ed1ab_1 + - zipp=3.21.0=pyhd8ed1ab_1 + unix: + - ipython=8.30.0=pyh707e725_0 + - jupyter_core=5.7.2=pyh31011fe_1 + - pexpect=4.9.0=pyhd8ed1ab_1 + - ptyprocess=0.7.0=pyhd8ed1ab_1 + - pysocks=1.7.1=pyha55dd90_7 + osx: + - appnope=0.1.4=pyhd8ed1ab_1 + - ipykernel=6.29.5=pyh57ce528_0 + - send2trash=1.8.3=pyh31c8845_1 + - terminado=0.18.1=pyh31c8845_0 + linux-64: + - _libgcc_mutex=0.1=conda_forge + - _openmp_mutex=4.5=2_gnu + - argon2-cffi-bindings=21.2.0=py311h9ecbd09_5 + - brotli-python=1.1.0=py311hfdbb021_2 + - bzip2=1.0.8=h4bc722e_7 + - ca-certificates=2024.8.30=hbcca054_0 + - cffi=1.17.1=py311hf29c0ef_0 + - contourpy=1.3.1=py311hd18a35c_0 + - debugpy=1.8.9=py311hfdbb021_0 + - freetype=2.12.1=h267a509_2 + - ipykernel=6.29.5=pyh3099207_0 + - jsonpointer=3.0.0=py311h38be061_1 + - keyutils=1.6.1=h166bdaf_0 + - krb5=1.21.3=h659f571_0 + - lcms2=2.16=hb7c19ff_0 + - ld_impl_linux-64=2.43=h712a8e2_2 + - lerc=4.0.0=h27087fc_0 + - libblas=3.9.0=25_linux64_openblas + - libcblas=3.9.0=25_linux64_openblas + - libdeflate=1.22=hb9d3cd8_0 + - libedit=3.1.20191231=he28a2e2_2 + - libexpat=2.6.4=h5888daf_0 + - libffi=3.4.2=h7f98852_5 + - libgcc-ng=14.2.0=h69a702a_1 + - libgcc=14.2.0=h77fa898_1 + - libgfortran5=14.2.0=hd5240d6_1 + - libgfortran=14.2.0=h69a702a_1 + - libgomp=14.2.0=h77fa898_1 + - libjpeg-turbo=3.0.0=hd590300_1 + - liblapack=3.9.0=25_linux64_openblas + - liblzma-devel=5.6.3=hb9d3cd8_1 + - liblzma=5.6.3=hb9d3cd8_1 + - libnsl=2.0.1=hd590300_0 + - libopenblas=0.3.28=pthreads_h94d23a6_1 + - libpng=1.6.44=hadc24fc_0 + - libsodium=1.0.20=h4ab18f5_0 + - libsqlite=3.47.0=hadc24fc_1 + - libstdcxx-ng=14.2.0=h4852527_1 + - libstdcxx=14.2.0=hc0a3c3a_1 + - libtiff=4.7.0=he137b08_1 + - libuuid=2.38.1=h0b41bf4_0 + - libwebp-base=1.4.0=hd590300_0 + - libxcb=1.17.0=h8a09558_0 + - libxcrypt=4.4.36=hd590300_1 + - libzlib=1.3.1=hb9d3cd8_2 + - markupsafe=3.0.2=py311h2dc5d0c_1 + - ncurses=6.5=he02047a_1 + - numpy=2.1.3=py311h71ddf71_0 + - openjpeg=2.5.2=h488ebb8_0 + - openssl=3.4.0=hb9d3cd8_0 + - pandas=2.2.3=py311h7db5c69_1 + - pillow=11.0.0=py311h49e9ac3_0 + - psutil=6.1.0=py311h9ecbd09_0 + - pthread-stubs=0.4=hb9d3cd8_1002 + - python=3.11.11=h9e4cc4f_1_cpython + - pyyaml=6.0.2=py311h9ecbd09_1 + - pyzmq=26.2.0=py311h7deb3e3_3 + - readline=8.2=h8228510_1 + - rpds-py=0.22.3=py311h9e33e62_0 + - send2trash=1.8.3=pyh0d859eb_1 + - terminado=0.18.1=pyh0d859eb_0 + - tk=8.6.13=noxft_h4845f30_101 + - tornado=6.4.2=py311h9ecbd09_0 + - xorg-libxau=1.0.11=hb9d3cd8_1 + - xorg-libxdmcp=1.1.5=hb9d3cd8_0 + - xz-gpl-tools=5.6.3=hbcc6ac9_1 + - xz-tools=5.6.3=hb9d3cd8_1 + - xz=5.6.3=hbcc6ac9_1 + - yaml=0.2.5=h7f98852_2 + - zeromq=4.3.5=h3b0a872_7 + - zstandard=0.23.0=py311hbc35293_1 + - zstd=1.5.6=ha6fb4c9_0 + osx-64: + - argon2-cffi-bindings=21.2.0=py311h3336109_5 + - brotli-python=1.1.0=py311hd89902b_2 + - bzip2=1.0.8=hfdf4475_7 + - ca-certificates=2024.8.30=h8857fd0_0 + - cffi=1.17.1=py311h137bacd_0 + - contourpy=1.3.1=py311h4e34fa0_0 + - debugpy=1.8.9=py311hc356e98_0 + - freetype=2.12.1=h60636b9_2 + - jsonpointer=3.0.0=py311h6eed73b_1 + - krb5=1.21.3=h37d8d59_0 + - lcms2=2.16=ha2f27b4_0 + - lerc=4.0.0=hb486fe8_0 + - libblas=3.9.0=25_osx64_openblas + - libcblas=3.9.0=25_osx64_openblas + - libcxx=19.1.5=hf95d169_0 + - libdeflate=1.22=h00291cd_0 + - libedit=3.1.20191231=h0678c8f_2 + - libexpat=2.6.4=h240833e_0 + - libffi=3.4.2=h0d85af4_5 + - libgfortran5=13.2.0=h2873a65_3 + - libgfortran=5.0.0=13_2_0_h97931a8_3 + - libjpeg-turbo=3.0.0=h0dc2134_1 + - liblapack=3.9.0=25_osx64_openblas + - liblzma-devel=5.6.3=hd471939_1 + - liblzma=5.6.3=hd471939_1 + - libopenblas=0.3.28=openmp_hbf64a52_1 + - libpng=1.6.44=h4b8f8c9_0 + - libsodium=1.0.20=hfdf4475_0 + - libsqlite=3.47.0=h2f8c449_1 + - libtiff=4.7.0=h583c2ba_1 + - libwebp-base=1.4.0=h10d778d_0 + - libxcb=1.17.0=hf1f96e2_0 + - libzlib=1.3.1=hd23fc13_2 + - llvm-openmp=19.1.5=ha54dae1_0 + - markupsafe=3.0.2=py311ha3cf9ac_1 + - ncurses=6.5=hf036a51_1 + - numpy=2.1.3=py311h14ed71f_0 + - openjpeg=2.5.2=h7310d3a_0 + - openssl=3.4.0=hd471939_0 + - pandas=2.2.3=py311haeb46be_1 + - pillow=11.0.0=py311h1f68098_0 + - psutil=6.1.0=py311h1314207_0 + - pthread-stubs=0.4=h00291cd_1002 + - pyobjc-core=10.3.2=py311hfbc4093_0 + - pyobjc-framework-cocoa=10.3.2=py311hfbc4093_0 + - python=3.11.11=h9ccd52b_1_cpython + - pyyaml=6.0.2=py311h3336109_1 + - pyzmq=26.2.0=py311h4d3da15_3 + - readline=8.2=h9e318b2_1 + - rpds-py=0.22.3=py311h3b9c2be_0 + - tk=8.6.13=h1abcd95_1 + - tornado=6.4.2=py311h4d7f069_0 + - xorg-libxau=1.0.11=h00291cd_1 + - xorg-libxdmcp=1.1.5=h00291cd_0 + - xz-gpl-tools=5.6.3=h357f2ed_1 + - xz-tools=5.6.3=hd471939_1 + - xz=5.6.3=h357f2ed_1 + - yaml=0.2.5=h0d85af4_2 + - zeromq=4.3.5=h7130eaa_7 + - zstandard=0.23.0=py311hdf6fcd6_1 + - zstd=1.5.6=h915ae27_0 + osx-arm64: + - argon2-cffi-bindings=21.2.0=py311h460d6c5_5 + - brotli-python=1.1.0=py311h3f08180_2 + - bzip2=1.0.8=h99b78c6_7 + - ca-certificates=2024.8.30=hf0a4a13_0 + - cffi=1.17.1=py311h3a79f62_0 + - contourpy=1.3.1=py311h210dab8_0 + - debugpy=1.8.9=py311h155a34a_0 + - freetype=2.12.1=hadb7bae_2 + - jsonpointer=3.0.0=py311h267d04e_1 + - krb5=1.21.3=h237132a_0 + - lcms2=2.16=ha0e7c42_0 + - lerc=4.0.0=h9a09cb3_0 + - libblas=3.9.0=25_osxarm64_openblas + - libcblas=3.9.0=25_osxarm64_openblas + - libcxx=19.1.5=ha82da77_0 + - libdeflate=1.22=hd74edd7_0 + - libedit=3.1.20191231=hc8eb9b7_2 + - libexpat=2.6.4=h286801f_0 + - libffi=3.4.2=h3422bc3_5 + - libgfortran5=13.2.0=hf226fd6_3 + - libgfortran=5.0.0=13_2_0_hd922786_3 + - libjpeg-turbo=3.0.0=hb547adb_1 + - liblapack=3.9.0=25_osxarm64_openblas + - liblzma-devel=5.6.3=h39f12f2_1 + - liblzma=5.6.3=h39f12f2_1 + - libopenblas=0.3.28=openmp_hf332438_1 + - libpng=1.6.44=hc14010f_0 + - libsodium=1.0.20=h99b78c6_0 + - libsqlite=3.47.0=hbaaea75_1 + - libtiff=4.7.0=hfce79cd_1 + - libwebp-base=1.4.0=h93a5062_0 + - libxcb=1.17.0=hdb1d25a_0 + - libzlib=1.3.1=h8359307_2 + - llvm-openmp=19.1.5=hdb05f8b_0 + - markupsafe=3.0.2=py311h4921393_1 + - ncurses=6.5=h7bae524_1 + - numpy=2.1.3=py311h649a571_0 + - openjpeg=2.5.2=h9f1df11_0 + - openssl=3.4.0=h39f12f2_0 + - pandas=2.2.3=py311h9cb3ce9_1 + - pillow=11.0.0=py311h3894ae9_0 + - psutil=6.1.0=py311hae2e1ce_0 + - pthread-stubs=0.4=hd74edd7_1002 + - pyobjc-core=10.3.2=py311hab620ed_0 + - pyobjc-framework-cocoa=10.3.2=py311hab620ed_0 + - python=3.11.11=hc22306f_1_cpython + - pyyaml=6.0.2=py311h460d6c5_1 + - pyzmq=26.2.0=py311h730b646_3 + - readline=8.2=h92ec313_1 + - rpds-py=0.22.3=py311h3ff9189_0 + - tk=8.6.13=h5083fa2_1 + - tornado=6.4.2=py311h917b07b_0 + - xorg-libxau=1.0.11=hd74edd7_1 + - xorg-libxdmcp=1.1.5=hd74edd7_0 + - xz-gpl-tools=5.6.3=h9a6d368_1 + - xz-tools=5.6.3=h39f12f2_1 + - xz=5.6.3=h9a6d368_1 + - yaml=0.2.5=h3422bc3_2 + - zeromq=4.3.5=hc1bb282_7 + - zstandard=0.23.0=py311ha60cc69_1 + - zstd=1.5.6=hb46c0d2_0 + win-64: + - _openmp_mutex=4.5=2_gnu + - argon2-cffi-bindings=21.2.0=py311he736701_5 + - brotli-python=1.1.0=py311hda3d55a_2 + - bzip2=1.0.8=h2466b09_7 + - ca-certificates=2024.8.30=h56e8100_0 + - cffi=1.17.1=py311he736701_0 + - contourpy=1.3.1=py311h3257749_0 + - cpython=3.11.11=py311hd8ed1ab_1 + - debugpy=1.8.9=py311hda3d55a_0 + - freetype=2.12.1=hdaf720e_2 + - intel-openmp=2024.2.1=h57928b3_1083 + - ipykernel=6.29.5=pyh4bbf305_0 + - ipython=8.30.0=pyh7428d3b_0 + - jsonpointer=3.0.0=py311h1ea47a8_1 + - jupyter_core=5.7.2=pyh5737063_1 + - krb5=1.21.3=hdf4eb48_0 + - lcms2=2.16=h67d730c_0 + - lerc=4.0.0=h63175ca_0 + - libblas=3.9.0=25_win64_mkl + - libcblas=3.9.0=25_win64_mkl + - libdeflate=1.22=h2466b09_0 + - libexpat=2.6.4=he0c23c2_0 + - libffi=3.4.2=h8ffe710_5 + - libgcc=14.2.0=h1383e82_1 + - libgomp=14.2.0=h1383e82_1 + - libhwloc=2.11.2=default_ha69328c_1001 + - libiconv=1.17=hcfcfb64_2 + - libjpeg-turbo=3.0.0=hcfcfb64_1 + - liblapack=3.9.0=25_win64_mkl + - liblzma-devel=5.6.3=h2466b09_1 + - liblzma=5.6.3=h2466b09_1 + - libpng=1.6.44=h3ca93ac_0 + - libsodium=1.0.20=hc70643c_0 + - libsqlite=3.47.0=h2466b09_1 + - libtiff=4.7.0=hfc51747_1 + - libwebp-base=1.4.0=hcfcfb64_0 + - libwinpthread=12.0.0.r4.gg4f2fc60ca=h57928b3_8 + - libxcb=1.17.0=h0e4246c_0 + - libxml2=2.13.5=h442d1da_0 + - libzlib=1.3.1=h2466b09_2 + - markupsafe=3.0.2=py311h5082efb_1 + - mkl=2024.2.2=h66d3029_14 + - numpy=2.1.3=py311h35ffc71_0 + - openjpeg=2.5.2=h3d672ee_0 + - openssl=3.4.0=h2466b09_0 + - pandas=2.2.3=py311hcf9f919_1 + - pillow=11.0.0=py311h4fbf6a9_0 + - psutil=6.1.0=py311he736701_0 + - pthread-stubs=0.4=h0e40799_1002 + - pysocks=1.7.1=pyh09c184e_7 + - python=3.11.11=h3f84c4b_1_cpython + - pywin32=307=py311hda3d55a_3 + - pywinpty=2.0.14=py311hda3d55a_0 + - pyyaml=6.0.2=py311he736701_1 + - pyzmq=26.2.0=py311h484c95c_3 + - rpds-py=0.22.3=py311h533ab2d_0 + - send2trash=1.8.3=pyh5737063_1 + - tbb=2021.13.0=h62715c5_1 + - terminado=0.18.1=pyh5737063_0 + - tk=8.6.13=h5226925_1 + - tornado=6.4.2=py311he736701_0 + - ucrt=10.0.22621.0=h57928b3_1 + - vc14_runtime=14.42.34433=he29a5d6_23 + - vc=14.3=ha32ba9b_23 + - vs2015_runtime=14.42.34433=hdffcdeb_23 + - win_inet_pton=1.1.0=pyh7428d3b_8 + - winpty=0.4.3=4 + - xorg-libxau=1.0.11=h0e40799_1 + - xorg-libxdmcp=1.1.5=h0e40799_0 + - xz-tools=5.6.3=h2466b09_1 + - xz=5.6.3=h208afaa_1 + - yaml=0.2.5=h8ffe710_2 + - zeromq=4.3.5=ha9f60a1_7 + - zstandard=0.23.0=py311h53056dc_1 + - zstd=1.5.6=h0ea2cb4_0 + pip: + - atomicwrites==1.4.1 + - cachetools==5.5.0 + - fasteners==0.19 + - google-apitools==0.5.32 + - google-auth==2.36.0 + - httplib2==0.22.0 + - neuroglancer==2.40.1 + - oauth2client==4.1.3 + - pyasn1==0.6.1 + - pyasn1-modules==0.4.1 + - pyparsing==3.2.0 + - rsa==4.9 diff --git a/volumetric_imaging/anaconda-project.yml b/volumetric_imaging/anaconda-project.yml new file mode 100644 index 000000000..f1574d23c --- /dev/null +++ b/volumetric_imaging/anaconda-project.yml @@ -0,0 +1,52 @@ +name: volumetric_imaging +description: Display 3D image and segmentation data in a Jupyter notebook. + +examples_config: + created: 2024-11-22 + maintainers: + - "droumis" + labels: + - "panel" + - "param" + categories: + - Neuroscience + title: "Volumetric Imaging" + deployments: + # - command: notebook + - command: dashboard + no_data_ingestion: true + +user_fields: [examples_config] + +channels: +- conda-forge +- nodefaults + +packages: &pkgs +- notebook>=6.5.2 +- python=3.11 +- panel>=1.5.4 # auto min pinned 2024-12-06 +- jupyterlab>=4.3.1 # auto min pinned 2024-12-06 +- pip +- pip: + - neuroglancer>=2.40.1 # auto min pinned 2024-12-06 + +dependencies: *pkgs + +commands: + lab: + unix: jupyter lab volumetric_imaging.ipynb + windows: jupyter lab volumetric_imaging.ipynb + notebook: + notebook: volumetric_imaging.ipynb + dashboard: + unix: panel serve --rest-session-info --session-history -1 volumetric_imaging.ipynb --show + supports_http_options: true + +variables: {} + +platforms: +- linux-64 +- osx-64 +- win-64 +- osx-arm64 diff --git a/volumetric_imaging/assets/approach1.png b/volumetric_imaging/assets/approach1.png new file mode 100644 index 000000000..89699226c Binary files /dev/null and b/volumetric_imaging/assets/approach1.png differ diff --git a/volumetric_imaging/assets/approach2.png b/volumetric_imaging/assets/approach2.png new file mode 100644 index 000000000..48a8764be Binary files /dev/null and b/volumetric_imaging/assets/approach2.png differ diff --git a/volumetric_imaging/assets/volumetric_imaging_header.png b/volumetric_imaging/assets/volumetric_imaging_header.png new file mode 100644 index 000000000..0312fa2bb Binary files /dev/null and b/volumetric_imaging/assets/volumetric_imaging_header.png differ diff --git a/volumetric_imaging/thumbnails/volumetric_imaging.png b/volumetric_imaging/thumbnails/volumetric_imaging.png new file mode 100644 index 000000000..56407ad17 Binary files /dev/null and b/volumetric_imaging/thumbnails/volumetric_imaging.png differ diff --git a/volumetric_imaging/volumetric_imaging.ipynb b/volumetric_imaging/volumetric_imaging.ipynb new file mode 100644 index 000000000..bb48f6b74 --- /dev/null +++ b/volumetric_imaging/volumetric_imaging.ipynb @@ -0,0 +1,523 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "cc47db48-cd14-4874-a377-e4c13de91cdd", + "metadata": { + "panel-layout": { + "height": 106.01666259765625, + "visible": true, + "width": 100 + } + }, + "source": [ + "# Volumetric Imaging\n", + "\n", + "\"Volumetric\n", + "\n", + "---" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ef81c950-38e8-4c18-aec0-63ce70c34b1f", + "metadata": { + "panel-layout": { + "height": 345, + "visible": true, + "width": 100 + }, + "tags": [ + "remove-input" + ] + }, + "outputs": [], + "source": [ + "from IPython.display import HTML\n", + "HTML(\"\"\"\n", + "
\n", + " \n", + "
\n", + "\"\"\")" + ] + }, + { + "cell_type": "markdown", + "id": "e3b92a30-50eb-4d00-ad83-0354c947f767", + "metadata": { + "panel-layout": { + "height": 779.4500122070312, + "visible": true, + "width": 100 + } + }, + "source": [ + "## Overview\n", + "\n", + "**Volumetric imaging** refers to techniques that capture data in three dimensions, allowing researchers to visualize and analyze the internal structures of objects, including depth and spatial relationships. Unlike traditional 2D imaging, volumetric imaging provides a more comprehensive view of specimens.\n", + "\n", + "One of the most powerful volumetric imaging techniques is **electron microscopy** ([EM](https://en.wikipedia.org/wiki/Electron_microscope)). EM uses a beam of electrons to create high-resolution images at the nanometer scale, enabling the exploration of fine structural details of biological specimens such as cells, tissues, and molecular structures. However, handling and visualizing the massive datasets generated by EM poses significant challenges due to their size and complexity.\n", + "\n", + "### Introducing Neuroglancer\n", + "\n", + "[Neuroglancer](https://github.com/google/neuroglancer) by Google is a WebGL-based viewer designed specifically for volumetric data, offering efficient handling of large-scale datasets through data streaming. Its key features include:\n", + "\n", + "- **Interactive Visualization:** Smooth, real-time navigation through volumetric data.\n", + "- **Customizable Layers:** Support for raw images, segmented regions, and annotations.\n", + "- **Web-Based Interface:** Accessible directly from browsers without the need for specialized software.\n", + "\n", + "Originally developed for neuroscience, Neuroglancer empowers researchers to explore complex 3D structures by tracing neural pathways, identifying cellular components, and annotating regions of interest.\n", + "\n", + "### Integrating Neuroglancer with Jupyter Notebooks\n", + "\n", + "While Neuroglancer is a powerful tool for exploring large volumes, it is typically used as a standalone application. Researchers often utilize **Jupyter Notebooks** to conduct reproducible research and combine code, data analysis, and visualizations.\n", + "\n", + "By integrating Neuroglancer within Jupyter Notebooks using [HoloViz Panel](https://panel.holoviz.org/), researchers can:\n", + "\n", + "- **Consolidate Workflow:** Keep code, data analysis, and visualization in a single environment.\n", + "- **Enhance Reproducibility:** Share notebooks that include both computational steps and interactive visualizations.\n", + "- **Facilitate Collaboration:** Allow collaborators to interact with the same data and visualizations within the notebook.\n", + "\n", + "### Using HoloViz for the Integration\n", + "\n", + "In this workflow, we will demonstrate how to embed Neuroglancer within a Panel application, highlighting how HoloViz tools can seamlessly extend third-party applications. By using Panel, we can:\n", + "\n", + "- Embed the Neuroglancer viewer directly within a notebook cell.\n", + "- Create interactive widgets and controls to manipulate and report the state of the viewer.\n", + "- Combine Neuroglancer views alongside other visualizations.\n", + "\n", + "---\n", + "\n", + "## Prerequisites\n", + "\n", + "| Topic | Type | Notes |\n", + "| --- | --- | --- |\n", + "| [Panel Documentation](https://panel.holoviz.org/) | Prerequisite | Familiarity with Panel for building interactive apps |\n", + "\n", + "---" + ] + }, + { + "cell_type": "markdown", + "id": "a2f77667-f42b-42f6-a13d-5abbe589d7ea", + "metadata": { + "ExecuteTime": { + "end_time": "2024-03-29T17:25:02.532910Z", + "start_time": "2024-03-29T17:25:02.529856Z" + }, + "panel-layout": { + "height": 50.850006103515625, + "visible": false, + "width": 100 + } + }, + "source": [ + "## Imports and Configuration" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c83a8253-e6da-485d-96cd-ce0e783ac00d", + "metadata": { + "panel-layout": { + "height": 101, + "visible": false, + "width": 79.249 + } + }, + "outputs": [], + "source": [ + "import param\n", + "import panel as pn\n", + "import neuroglancer\n", + "\n", + "pn.extension()" + ] + }, + { + "cell_type": "markdown", + "id": "64a50727-8c91-4d88-a82d-626e5a7715ba", + "metadata": { + "panel-layout": { + "height": 102.5, + "visible": true, + "width": 100 + } + }, + "source": [ + "## Defining the `NeuroglancerNB` Class\n", + "\n", + "To embed Neuroglancer within a Panel application, we'll define a custom class `NeuroglancerNB`. This class creates a Panel viewable object that includes the Neuroglancer viewer embedded within an iframe, along with controls to load a Neuroglancer state from a URL, display the current state JSON, and generate shareable links." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ed82c0c5-1e5d-4acc-ad91-e3052c273c2d", + "metadata": {}, + "outputs": [], + "source": [ + "class NeuroglancerNB(pn.viewable.Viewer):\n", + " \"\"\"\n", + " A HoloViz Panel app for visualizing and interacting with Neuroglancer viewers\n", + " within a Jupyter Notebook.\n", + " \"\"\"\n", + " \n", + " source = param.Parameter(default=None, doc=\"\"\"\n", + " Source for the initial state of the viewer, which can be a URL string \n", + " or an existing neuroglancer.viewer.Viewer instance.\n", + " \"\"\")\n", + " height = param.Number(default=600, doc=\"height of the viewer.\")\n", + " width = param.Number(default=800, doc=\"width of the viewer.\")\n", + " show_state = param.Boolean(default=False, doc=\"Show the viewer state for debugging.\")\n", + " load_demo = param.Boolean(default=False, doc=\"Load the demo dataset on initialization.\")\n", + " \n", + " DEMO_URL = \"https://neuroglancer-demo.appspot.com/#!%7B%22dimensions%22%3A%7B%22x%22%3A%5B6.000000000000001e-9%2C%22m%22%5D%2C%22y%22%3A%5B6.000000000000001e-9%2C%22m%22%5D%2C%22z%22%3A%5B3.0000000000000004e-8%2C%22m%22%5D%7D%2C%22position%22%3A%5B5029.42333984375%2C6217.5849609375%2C1182.5%5D%2C%22crossSectionScale%22%3A3.7621853549999242%2C%22projectionOrientation%22%3A%5B-0.05179581791162491%2C-0.8017329573631287%2C0.0831851214170456%2C-0.5895944833755493%5D%2C%22projectionScale%22%3A4699.372698097029%2C%22layers%22%3A%5B%7B%22type%22%3A%22image%22%2C%22source%22%3A%22precomputed%3A%2F%2Fgs%3A%2F%2Fneuroglancer-public-data%2Fkasthuri2011%2Fimage%22%2C%22tab%22%3A%22source%22%2C%22name%22%3A%22original-image%22%7D%2C%7B%22type%22%3A%22image%22%2C%22source%22%3A%22precomputed%3A%2F%2Fgs%3A%2F%2Fneuroglancer-public-data%2Fkasthuri2011%2Fimage_color_corrected%22%2C%22tab%22%3A%22source%22%2C%22name%22%3A%22corrected-image%22%7D%2C%7B%22type%22%3A%22segmentation%22%2C%22source%22%3A%22precomputed%3A%2F%2Fgs%3A%2F%2Fneuroglancer-public-data%2Fkasthuri2011%2Fground_truth%22%2C%22tab%22%3A%22source%22%2C%22selectedAlpha%22%3A0.63%2C%22notSelectedAlpha%22%3A0.14%2C%22segments%22%3A%5B%223208%22%2C%224901%22%2C%2213%22%2C%224965%22%2C%224651%22%2C%222282%22%2C%223189%22%2C%223758%22%2C%2215%22%2C%224027%22%2C%223228%22%2C%22444%22%2C%223207%22%2C%223224%22%2C%223710%22%5D%2C%22name%22%3A%22ground_truth%22%7D%5D%2C%22layout%22%3A%224panel%22%7D\"\n", + "\n", + " def __init__(self, **params):\n", + " super().__init__(**params)\n", + "\n", + " self.source_not_provided = (self.source is None)\n", + " self.viewer = (self.source if isinstance(self.source, neuroglancer.viewer.Viewer)\n", + " else neuroglancer.Viewer())\n", + "\n", + " # Setup UI\n", + " self.url_input = pn.widgets.TextInput(\n", + " placeholder=\"Enter a Neuroglancer URL and click Load\",\n", + " name=\"Input URL\",\n", + " width=self.width,\n", + " )\n", + " self.load_button = pn.widgets.Button(name=\"Load\", button_type=\"primary\", width=75)\n", + " self.demo_button = pn.widgets.Button(name=\"Demo\", button_type=\"warning\", width=75)\n", + " self.json_pane = pn.pane.JSON({}, theme=\"light\", depth=2, name=\"Viewer State\", \n", + " sizing_mode='stretch_both')\n", + " self.shareable_url_pane = pn.pane.Markdown(\"**Shareable URL:**\")\n", + " self.local_url_pane = pn.pane.Markdown(\"**Local URL:**\")\n", + "\n", + " self.iframe = pn.pane.HTML(\n", + " height=self.height,\n", + " width=self.width,\n", + " styles={\"resize\": \"both\", \"overflow\": \"hidden\"},\n", + " )\n", + "\n", + " # Configure viewer and UI\n", + " local_url = self.viewer.get_viewer_url()\n", + " self.local_url_pane.object = self._generate_dropdown_markup(\"Local URL\", local_url)\n", + " iframe_style = ('frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" '\n", + " 'style=\"width:100%; height:100%; min-width:500px; min-height:500px;\"')\n", + " self.iframe.object = f''\n", + "\n", + " # UI Actions\n", + " self.load_button.on_click(self._on_load_button_clicked)\n", + " self.demo_button.on_click(self._on_demo_button_clicked)\n", + " self.viewer.shared_state.add_changed_callback(self._on_viewer_state_changed)\n", + "\n", + " # If a source URL was provided, initialize the viewer from it\n", + " if self.source and not isinstance(self.source, neuroglancer.viewer.Viewer):\n", + " self._initialize_viewer_from_url(self.source)\n", + "\n", + " # Load the demo if requested\n", + " if self.load_demo:\n", + " self.demo_button.clicks += 1\n", + "\n", + " def _initialize_viewer_from_url(self, source: str):\n", + " self.url_input.value = source\n", + " self._load_state_from_url(source)\n", + "\n", + " def _on_demo_button_clicked(self, event):\n", + " self.url_input.value = self.DEMO_URL\n", + " self._load_state_from_url(self.url_input.value)\n", + "\n", + " def _on_load_button_clicked(self, event):\n", + " self._load_state_from_url(self.url_input.value)\n", + "\n", + " def _load_state_from_url(self, url):\n", + " try:\n", + " new_state = neuroglancer.parse_url(url)\n", + " self.viewer.set_state(new_state)\n", + " except Exception as e:\n", + " print(f\"Error loading Neuroglancer state: {e}\")\n", + "\n", + " def _on_viewer_state_changed(self):\n", + " # Update shareable URL and JSON pane\n", + " shareable_url = neuroglancer.to_url(self.viewer.state)\n", + " self.shareable_url_pane.object = self._generate_dropdown_markup(\"Shareable URL\", shareable_url)\n", + " self.json_pane.object = self.viewer.state.to_json()\n", + "\n", + " def _generate_dropdown_markup(self, title, url):\n", + " return f\"\"\"\n", + "
\n", + " {title}:\n", + " {url}\n", + "
\n", + " \"\"\"\n", + "\n", + " def __panel__(self):\n", + " controls_layout = pn.Column(\n", + " pn.Row(self.demo_button, self.load_button),\n", + " pn.Row(self.url_input),\n", + " visible=self.source_not_provided,\n", + " )\n", + " links_layout = pn.Column(self.local_url_pane, self.shareable_url_pane)\n", + "\n", + " state_widget = pn.Card(\n", + " self.json_pane,\n", + " title=\"State\",\n", + " collapsed=False,\n", + " visible=self.show_state,\n", + " styles={\"background\": \"WhiteSmoke\"},\n", + " max_width=350\n", + " )\n", + "\n", + " return pn.Column(\n", + " controls_layout,\n", + " links_layout,\n", + " pn.Row(state_widget, self.iframe)\n", + " )" + ] + }, + { + "cell_type": "markdown", + "id": "4dac819c-c3e9-4a51-be83-bf54b28f62b2", + "metadata": { + "panel-layout": { + "height": 50.850006103515625, + "visible": true, + "width": 100 + } + }, + "source": [ + "## Approach 1: Launching a New Viewer and Loading State from URL\n" + ] + }, + { + "cell_type": "markdown", + "id": "58f1de1e-d307-4e6a-8f49-ec7f4a04cc24", + "metadata": { + "panel-layout": { + "height": 110.35000610351562, + "visible": true, + "width": 100 + } + }, + "source": [ + "In this workflow, we'll initialize a new Neuroglancer viewer and load a dataset using a parameterized URL. This allows us to explore different datasets by simply changing the URL.\n", + "\n", + "Either use `NeuroglancerNB(source=)` or just run `NeuroglancerNB()` and input the URL in the GUI:\n", + "\n", + "To use a demo URL, either `load_demo=True` or click the **Demo** button. You can find other demo links on the [Neuroglancer repository](https://github.com/google/neuroglancer#examples).\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "615b234d-e8f3-4600-826d-c1db1d820bbf", + "metadata": { + "panel-layout": { + "height": 763.5833129882812, + "visible": true, + "width": 100 + }, + "tags": [ + "remove-output" + ] + }, + "outputs": [], + "source": [ + "NeuroglancerNB(show_state=True, load_demo=True)" + ] + }, + { + "cell_type": "markdown", + "id": "9ab67ed5-625f-4be7-8c86-a5657c86a065", + "metadata": { + "panel-layout": { + "height": 68.30000305175781, + "visible": false, + "width": 100 + } + }, + "source": [ + "\"Panel\n", + "\n", + "**Here's a static snapshot of what the previous cell produces. 👉**\n", + "\n", + "
\n" + ] + }, + { + "cell_type": "markdown", + "id": "afa26a39-e22f-4ae8-880e-559350e1bfc9", + "metadata": { + "panel-layout": { + "height": 50.850006103515625, + "visible": true, + "width": 100 + } + }, + "source": [ + "## Approach 2: Displaying a Pre-specified Viewer" + ] + }, + { + "cell_type": "markdown", + "id": "2717e7f4-f098-4ba8-87a5-1e673496d740", + "metadata": { + "panel-layout": { + "height": 185, + "visible": true, + "width": 100 + } + }, + "source": [ + "Alternatively, you can provide a pre-configured `neuroglancer.viewer.Viewer` object as the `source` to display that viewer in the notebook. This allows you to set up the viewer programmatically and then embed it.\n", + "\n", + "- We create a Neuroglancer `Viewer` instance.\n", + "- Within a transaction (`viewer.txn()`), we add layers to the viewer:\n", + " - An image layer from a precomputed data source.\n", + " - A segmentation layer.\n", + "- We then pass this configured viewer to our `NeuroglancerNB` class.\n", + "- The viewer is embedded within the Panel app and displayed in the notebook.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "1d178d1c-7f5b-4be2-b000-26157cb28416", + "metadata": {}, + "outputs": [], + "source": [ + "viewer = neuroglancer.Viewer()\n", + "\n", + "with viewer.txn() as s:\n", + " # Add an image layer from a precomputed data source\n", + " s.layers[\"image\"] = neuroglancer.ImageLayer(\n", + " source=\"precomputed://gs://neuroglancer-janelia-flyem-hemibrain/emdata/clahe_yz/jpeg\",\n", + " )\n", + " # Add a segmentation layer\n", + " s.layers[\"segmentation\"] = neuroglancer.SegmentationLayer(\n", + " source=\"precomputed://gs://neuroglancer-janelia-flyem-hemibrain/v1.1/segmentation\",\n", + " )" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "26d8d75a-4512-4d92-8c96-a5f974fc72c7", + "metadata": { + "panel-layout": { + "height": 664.2999877929688, + "visible": true, + "width": 100 + }, + "tags": [ + "remove-output" + ] + }, + "outputs": [], + "source": [ + "NeuroglancerNB(source=viewer, show_state=True)" + ] + }, + { + "cell_type": "markdown", + "id": "94b0e8a2-4fa3-44b0-b7a4-8b43f9ad081f", + "metadata": { + "panel-layout": { + "height": 68.29998779296875, + "visible": false, + "width": 100 + } + }, + "source": [ + "\"Panel\n", + "\n", + "**Here's a static snapshot of what the previous cell produces. 👉**\n", + "\n", + "
\n" + ] + }, + { + "cell_type": "markdown", + "id": "1247343e-44b5-46a8-a05d-511d1a392e9d", + "metadata": { + "panel-layout": { + "height": 294.66668701171875, + "visible": true, + "width": 100 + } + }, + "source": [ + "## Next Steps\n", + "\n", + "- **Explore Your Own Datasets:** Modify the code to load and visualize your own volumetric datasets.\n", + "- **Extend the Application:** Integrate additional HoloViews plots or other Panel components to create a more comprehensive application. For instance, you might add controls for adjusting visualization parameters.\n", + "- **Share and Collaborate:** Use the shareable URLs generated by the app to share specific views or states with collaborators. Embedding the application in a notebook ensures that your analysis and visualizations are reproducible and shareable.\n", + "\n", + "---\n", + "\n", + "## Resources\n", + "\n", + "| Resource | Description |\n", + "| --- | --- |\n", + "| [Neuroglancer GitHub Repository](https://github.com/google/neuroglancer) | Neuroglancer source code and documentation |\n", + "| [Neuroglancer Python Integration](https://github.com/google/neuroglancer/tree/master/python) | Python interface for controlling Neuroglancer |\n", + "\n", + "---\n" + ] + } + ], + "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.11.11" + }, + "panel-cell-order": [ + "cc47db48-cd14-4874-a377-e4c13de91cdd", + "ef81c950-38e8-4c18-aec0-63ce70c34b1f", + "e3b92a30-50eb-4d00-ad83-0354c947f767", + "a2f77667-f42b-42f6-a13d-5abbe589d7ea", + "c83a8253-e6da-485d-96cd-ce0e783ac00d", + "64a50727-8c91-4d88-a82d-626e5a7715ba", + "4dac819c-c3e9-4a51-be83-bf54b28f62b2", + "58f1de1e-d307-4e6a-8f49-ec7f4a04cc24", + "615b234d-e8f3-4600-826d-c1db1d820bbf", + "9ab67ed5-625f-4be7-8c86-a5657c86a065", + "afa26a39-e22f-4ae8-880e-559350e1bfc9", + "2717e7f4-f098-4ba8-87a5-1e673496d740", + "26d8d75a-4512-4d92-8c96-a5f974fc72c7", + "94b0e8a2-4fa3-44b0-b7a4-8b43f9ad081f", + "1247343e-44b5-46a8-a05d-511d1a392e9d" + ] + }, + "nbformat": 4, + "nbformat_minor": 5 +}