regrender 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- regrender-0.1.0/.github/workflows/ci.yml +29 -0
- regrender-0.1.0/.github/workflows/publish.yml +27 -0
- regrender-0.1.0/.gitignore +195 -0
- regrender-0.1.0/.idea/.gitignore +8 -0
- regrender-0.1.0/.idea/2dccf.iml +18 -0
- regrender-0.1.0/.idea/deployment.xml +23 -0
- regrender-0.1.0/.idea/dictionaries/project.xml +7 -0
- regrender-0.1.0/.idea/inspectionProfiles/Project_Default.xml +8 -0
- regrender-0.1.0/.idea/inspectionProfiles/profiles_settings.xml +6 -0
- regrender-0.1.0/.idea/misc.xml +7 -0
- regrender-0.1.0/.idea/modules.xml +8 -0
- regrender-0.1.0/.idea/regrender.iml +7 -0
- regrender-0.1.0/.idea/vcs.xml +7 -0
- regrender-0.1.0/.python-version +1 -0
- regrender-0.1.0/.readthedocs.yaml +16 -0
- regrender-0.1.0/LICENSE +21 -0
- regrender-0.1.0/PKG-INFO +102 -0
- regrender-0.1.0/README.md +70 -0
- regrender-0.1.0/docs/Makefile +20 -0
- regrender-0.1.0/docs/make.bat +35 -0
- regrender-0.1.0/docs/source/_static/probe.png +0 -0
- regrender-0.1.0/docs/source/_static/register.png +0 -0
- regrender-0.1.0/docs/source/_static/roi.png +0 -0
- regrender-0.1.0/docs/source/conf.py +74 -0
- regrender-0.1.0/docs/source/get_start/data_structure.rst +87 -0
- regrender-0.1.0/docs/source/get_start/index.rst +27 -0
- regrender-0.1.0/docs/source/get_start/installation.rst +100 -0
- regrender-0.1.0/docs/source/get_start/probe.rst +72 -0
- regrender-0.1.0/docs/source/get_start/register.rst +69 -0
- regrender-0.1.0/docs/source/get_start/roi.rst +69 -0
- regrender-0.1.0/docs/source/index.rst +23 -0
- regrender-0.1.0/pyproject.toml +72 -0
- regrender-0.1.0/regrender/__init__.py +0 -0
- regrender-0.1.0/regrender/__main__.py +38 -0
- regrender-0.1.0/regrender/_app.py +326 -0
- regrender-0.1.0/regrender/_core.py +306 -0
- regrender-0.1.0/regrender/main_probe.py +702 -0
- regrender-0.1.0/regrender/main_register.py +638 -0
- regrender-0.1.0/regrender/main_roi.py +489 -0
- regrender-0.1.0/tests/test_core.py +167 -0
- regrender-0.1.0/tests/test_probe.py +24 -0
- regrender-0.1.0/tests/test_roi.py +74 -0
- regrender-0.1.0/uv.lock +4632 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
lint:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- uses: astral-sh/setup-uv@v5
|
|
14
|
+
- run: uvx ruff check .
|
|
15
|
+
- run: uvx mypy regrender/
|
|
16
|
+
|
|
17
|
+
test:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
- uses: astral-sh/setup-uv@v5
|
|
22
|
+
with:
|
|
23
|
+
python-version: "3.12"
|
|
24
|
+
# napari import needs a display + Qt/OpenGL system libs
|
|
25
|
+
- uses: pyvista/setup-headless-display-action@v3
|
|
26
|
+
- run: uv sync --extra test
|
|
27
|
+
- run: uv run pytest -q
|
|
28
|
+
env:
|
|
29
|
+
QT_QPA_PLATFORM: offscreen
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
# Publishes on a version tag push (e.g. `git push origin v0.1.0`).
|
|
4
|
+
# The tag must match the version in pyproject.toml (checked below).
|
|
5
|
+
on:
|
|
6
|
+
push:
|
|
7
|
+
tags:
|
|
8
|
+
- "v*"
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
publish:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
environment: pypi
|
|
14
|
+
permissions:
|
|
15
|
+
id-token: write # trusted publishing (OIDC) — no API token needed
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- uses: astral-sh/setup-uv@v5
|
|
19
|
+
# fail early if the release tag (e.g. v0.1.0) doesn't match pyproject's version
|
|
20
|
+
- name: Check tag matches version
|
|
21
|
+
run: |
|
|
22
|
+
tag="${GITHUB_REF_NAME#v}"
|
|
23
|
+
pkg=$(grep '^version = ' pyproject.toml | cut -d'"' -f2)
|
|
24
|
+
echo "tag=$tag pkg=$pkg"
|
|
25
|
+
[ "$tag" = "$pkg" ] || { echo "tag $tag != pyproject version $pkg"; exit 1; }
|
|
26
|
+
- run: uv build
|
|
27
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
#uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
#poetry.lock
|
|
109
|
+
|
|
110
|
+
# pdm
|
|
111
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
112
|
+
#pdm.lock
|
|
113
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
114
|
+
# in version control.
|
|
115
|
+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
|
116
|
+
.pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
121
|
+
__pypackages__/
|
|
122
|
+
|
|
123
|
+
# Celery stuff
|
|
124
|
+
celerybeat-schedule
|
|
125
|
+
celerybeat.pid
|
|
126
|
+
|
|
127
|
+
# SageMath parsed files
|
|
128
|
+
*.sage.py
|
|
129
|
+
|
|
130
|
+
# Environments
|
|
131
|
+
.env
|
|
132
|
+
.venv
|
|
133
|
+
env/
|
|
134
|
+
venv/
|
|
135
|
+
ENV/
|
|
136
|
+
env.bak/
|
|
137
|
+
venv.bak/
|
|
138
|
+
|
|
139
|
+
# Spyder project settings
|
|
140
|
+
.spyderproject
|
|
141
|
+
.spyproject
|
|
142
|
+
|
|
143
|
+
# Rope project settings
|
|
144
|
+
.ropeproject
|
|
145
|
+
|
|
146
|
+
# mkdocs documentation
|
|
147
|
+
/site
|
|
148
|
+
|
|
149
|
+
# mypy
|
|
150
|
+
.mypy_cache/
|
|
151
|
+
.dmypy.json
|
|
152
|
+
dmypy.json
|
|
153
|
+
|
|
154
|
+
# Pyre type checker
|
|
155
|
+
.pyre/
|
|
156
|
+
|
|
157
|
+
# pytype static type analyzer
|
|
158
|
+
.pytype/
|
|
159
|
+
|
|
160
|
+
# Cython debug symbols
|
|
161
|
+
cython_debug/
|
|
162
|
+
|
|
163
|
+
# PyCharm
|
|
164
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
165
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
166
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
167
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
168
|
+
#.idea/
|
|
169
|
+
|
|
170
|
+
# Abstra
|
|
171
|
+
# Abstra is an AI-powered process automation framework.
|
|
172
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
173
|
+
# Learn more at https://abstra.io/docs
|
|
174
|
+
.abstra/
|
|
175
|
+
|
|
176
|
+
# Visual Studio Code
|
|
177
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
178
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
179
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
180
|
+
# you could uncomment the following to ignore the enitre vscode folder
|
|
181
|
+
# .vscode/
|
|
182
|
+
|
|
183
|
+
# Ruff stuff:
|
|
184
|
+
.ruff_cache/
|
|
185
|
+
|
|
186
|
+
# PyPI configuration file
|
|
187
|
+
.pypirc
|
|
188
|
+
|
|
189
|
+
# Cursor
|
|
190
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
191
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
192
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
193
|
+
.cursorignore
|
|
194
|
+
.cursorindexingignore
|
|
195
|
+
.DS_Store
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="PYTHON_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager">
|
|
4
|
+
<content url="file://$MODULE_DIR$/../neuralib2">
|
|
5
|
+
<excludeFolder url="file://$MODULE_DIR$/../neuralib2/.venv" />
|
|
6
|
+
<excludeFolder url="file://$MODULE_DIR$/../neuralib2/packages/neuralib-imaging/.venv" />
|
|
7
|
+
</content>
|
|
8
|
+
<content url="file://$MODULE_DIR$">
|
|
9
|
+
<excludeFolder url="file://$MODULE_DIR$/.venv" />
|
|
10
|
+
</content>
|
|
11
|
+
<orderEntry type="jdk" jdkName="uv (regrender)" jdkType="Python SDK" />
|
|
12
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
13
|
+
</component>
|
|
14
|
+
<component name="PyDocumentationSettings">
|
|
15
|
+
<option name="format" value="PLAIN" />
|
|
16
|
+
<option name="myDocStringFormat" value="Plain" />
|
|
17
|
+
</component>
|
|
18
|
+
</module>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="PublishConfigData" remoteFilesAllowedToDisappearOnAutoupload="false">
|
|
4
|
+
<serverData>
|
|
5
|
+
<paths name="yuting@172.18.1.31:22 password">
|
|
6
|
+
<serverdata>
|
|
7
|
+
<mappings>
|
|
8
|
+
<mapping local="$PROJECT_DIR$/../neuralib2" web="/" />
|
|
9
|
+
<mapping local="$PROJECT_DIR$" web="/" />
|
|
10
|
+
</mappings>
|
|
11
|
+
</serverdata>
|
|
12
|
+
</paths>
|
|
13
|
+
<paths name="yuting@172.18.1.31:22 password (2)">
|
|
14
|
+
<serverdata>
|
|
15
|
+
<mappings>
|
|
16
|
+
<mapping local="$PROJECT_DIR$/../neuralib2" web="/" />
|
|
17
|
+
<mapping local="$PROJECT_DIR$" web="/" />
|
|
18
|
+
</mappings>
|
|
19
|
+
</serverdata>
|
|
20
|
+
</paths>
|
|
21
|
+
</serverData>
|
|
22
|
+
</component>
|
|
23
|
+
</project>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<component name="InspectionProjectProfileManager">
|
|
2
|
+
<profile version="1.0">
|
|
3
|
+
<option name="myName" value="Project Default" />
|
|
4
|
+
<inspection_tool class="DuplicatedCode" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
|
5
|
+
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
6
|
+
<inspection_tool class="PyInterpreterInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
7
|
+
</profile>
|
|
8
|
+
</component>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="Black">
|
|
4
|
+
<option name="sdkName" value="uv (pycams)" />
|
|
5
|
+
</component>
|
|
6
|
+
<component name="ProjectRootManager" version="2" project-jdk-name="uv (regrender)" project-jdk-type="Python SDK" />
|
|
7
|
+
</project>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module external.system.id="pyproject.toml" type="PYTHON_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager">
|
|
4
|
+
<content url="file://$MODULE_DIR$" />
|
|
5
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
6
|
+
</component>
|
|
7
|
+
</module>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
regrender-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Yu-Ting Wei
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
regrender-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: regrender
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: 2D mouse brain registration, ROI/Probe annotation, and brainrender reconstruction
|
|
5
|
+
Project-URL: Homepage, https://github.com/ytsimon2004/regrender
|
|
6
|
+
Project-URL: Repository, https://github.com/ytsimon2004/regrender
|
|
7
|
+
Project-URL: Documentation, https://regrender.readthedocs.io
|
|
8
|
+
Author-email: Yu-Ting Wei <ytsimon2004@gmail.com>
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: allen-ccf,brain-atlas,brainrender,napari,neuroscience,registration
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
16
|
+
Requires-Python: >=3.12
|
|
17
|
+
Requires-Dist: argclz>=1.0.1
|
|
18
|
+
Requires-Dist: imageio
|
|
19
|
+
Requires-Dist: napari[pyqt5]
|
|
20
|
+
Requires-Dist: neuralib-atlas[brainrender]>=0.7.3
|
|
21
|
+
Requires-Dist: rich
|
|
22
|
+
Provides-Extra: doc
|
|
23
|
+
Requires-Dist: pydata-sphinx-theme; extra == 'doc'
|
|
24
|
+
Requires-Dist: sphinx; extra == 'doc'
|
|
25
|
+
Requires-Dist: sphinx-copybutton; extra == 'doc'
|
|
26
|
+
Provides-Extra: lint
|
|
27
|
+
Requires-Dist: mypy; extra == 'lint'
|
|
28
|
+
Requires-Dist: ruff; extra == 'lint'
|
|
29
|
+
Provides-Extra: test
|
|
30
|
+
Requires-Dist: pytest; extra == 'test'
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
# regrender
|
|
34
|
+
|
|
35
|
+
**Tools for 2D mouse brain registration to the Allen Common Coordinate Framework (CCF)**
|
|
36
|
+
|
|
37
|
+
A napari-based Python toolkit
|
|
38
|
+
For registering histological brain slices to the Allen Brain Atlas, annotating cells/ROIs,
|
|
39
|
+
reconstructing probe tracks, and rendering the results with brainrender.
|
|
40
|
+
|
|
41
|
+
## Features
|
|
42
|
+
|
|
43
|
+
- **Interactive slice→CCF registration** (`regrender register`) — pick landmark pairs in napari, estimate a homography/affine transform.
|
|
44
|
+
- **ROI annotation** (`regrender roi`) — label cells on raw images, project them into CCF space, and render.
|
|
45
|
+
- **Probe-track reconstruction** (`regrender probe`) — reconstruct electrode shanks from dye labels across serial sections.
|
|
46
|
+
- **brainrender rendering** of ROIs and probes in 3D atlas space.
|
|
47
|
+
|
|
48
|
+
## Demo
|
|
49
|
+
|
|
50
|
+
**`regrender register`** — match landmark pairs between the atlas plane (left) and histology (right):
|
|
51
|
+
|
|
52
|
+
<img src="docs/source/_static/register.png" alt="register" width="800">
|
|
53
|
+
|
|
54
|
+
**`regrender roi`** — label cells per channel, then project + render in 3D with brainrender:
|
|
55
|
+
|
|
56
|
+
<img src="docs/source/_static/roi.png" alt="roi" width="800">
|
|
57
|
+
|
|
58
|
+
**`regrender probe`** — pick dye points per shank and reconstruct the tracks in 3D:
|
|
59
|
+
|
|
60
|
+
<img src="docs/source/_static/probe.png" alt="probe" width="800">
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
## Installation
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# Option 1 — one-shot CLI install, no clone or env needed (recommended for users)
|
|
67
|
+
uv tool install git+https://github.com/ytsimon2004/regrender.git
|
|
68
|
+
|
|
69
|
+
# Option 2 — uv virtual environment (development)
|
|
70
|
+
git clone https://github.com/ytsimon2004/regrender.git && cd regrender
|
|
71
|
+
uv venv && source .venv/bin/activate
|
|
72
|
+
uv pip install -e .
|
|
73
|
+
|
|
74
|
+
# Option 3 — conda environment (development)
|
|
75
|
+
git clone https://github.com/ytsimon2004/regrender.git && cd regrender
|
|
76
|
+
conda create -n regrender python=3.12 -y && conda activate regrender
|
|
77
|
+
pip install -e .
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
See the [installation docs](https://regrender.readthedocs.io/en/latest/get_start/installation.html) for details.
|
|
81
|
+
|
|
82
|
+
## Quick Start
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
# 1. label ROIs on raw slices
|
|
86
|
+
regrender roi -D <slices_dir>
|
|
87
|
+
|
|
88
|
+
# 2. register each slice to the CCF
|
|
89
|
+
regrender register -D <slices_dir>
|
|
90
|
+
|
|
91
|
+
# 3. project ROIs to CCF + render (or use the GUI "Project + Render" button)
|
|
92
|
+
regrender roi --project --render -D <slices_dir>
|
|
93
|
+
|
|
94
|
+
# probe tracks
|
|
95
|
+
regrender probe -D <slices_dir>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
See the [full documentation](https://regrender.readthedocs.io) for the complete workflow.
|
|
99
|
+
|
|
100
|
+
## Contact
|
|
101
|
+
|
|
102
|
+
**Yu-Ting Wei** - ytsimon2004@gmail.com
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# regrender
|
|
2
|
+
|
|
3
|
+
**Tools for 2D mouse brain registration to the Allen Common Coordinate Framework (CCF)**
|
|
4
|
+
|
|
5
|
+
A napari-based Python toolkit
|
|
6
|
+
For registering histological brain slices to the Allen Brain Atlas, annotating cells/ROIs,
|
|
7
|
+
reconstructing probe tracks, and rendering the results with brainrender.
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- **Interactive slice→CCF registration** (`regrender register`) — pick landmark pairs in napari, estimate a homography/affine transform.
|
|
12
|
+
- **ROI annotation** (`regrender roi`) — label cells on raw images, project them into CCF space, and render.
|
|
13
|
+
- **Probe-track reconstruction** (`regrender probe`) — reconstruct electrode shanks from dye labels across serial sections.
|
|
14
|
+
- **brainrender rendering** of ROIs and probes in 3D atlas space.
|
|
15
|
+
|
|
16
|
+
## Demo
|
|
17
|
+
|
|
18
|
+
**`regrender register`** — match landmark pairs between the atlas plane (left) and histology (right):
|
|
19
|
+
|
|
20
|
+
<img src="docs/source/_static/register.png" alt="register" width="800">
|
|
21
|
+
|
|
22
|
+
**`regrender roi`** — label cells per channel, then project + render in 3D with brainrender:
|
|
23
|
+
|
|
24
|
+
<img src="docs/source/_static/roi.png" alt="roi" width="800">
|
|
25
|
+
|
|
26
|
+
**`regrender probe`** — pick dye points per shank and reconstruct the tracks in 3D:
|
|
27
|
+
|
|
28
|
+
<img src="docs/source/_static/probe.png" alt="probe" width="800">
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Option 1 — one-shot CLI install, no clone or env needed (recommended for users)
|
|
35
|
+
uv tool install git+https://github.com/ytsimon2004/regrender.git
|
|
36
|
+
|
|
37
|
+
# Option 2 — uv virtual environment (development)
|
|
38
|
+
git clone https://github.com/ytsimon2004/regrender.git && cd regrender
|
|
39
|
+
uv venv && source .venv/bin/activate
|
|
40
|
+
uv pip install -e .
|
|
41
|
+
|
|
42
|
+
# Option 3 — conda environment (development)
|
|
43
|
+
git clone https://github.com/ytsimon2004/regrender.git && cd regrender
|
|
44
|
+
conda create -n regrender python=3.12 -y && conda activate regrender
|
|
45
|
+
pip install -e .
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
See the [installation docs](https://regrender.readthedocs.io/en/latest/get_start/installation.html) for details.
|
|
49
|
+
|
|
50
|
+
## Quick Start
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# 1. label ROIs on raw slices
|
|
54
|
+
regrender roi -D <slices_dir>
|
|
55
|
+
|
|
56
|
+
# 2. register each slice to the CCF
|
|
57
|
+
regrender register -D <slices_dir>
|
|
58
|
+
|
|
59
|
+
# 3. project ROIs to CCF + render (or use the GUI "Project + Render" button)
|
|
60
|
+
regrender roi --project --render -D <slices_dir>
|
|
61
|
+
|
|
62
|
+
# probe tracks
|
|
63
|
+
regrender probe -D <slices_dir>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
See the [full documentation](https://regrender.readthedocs.io) for the complete workflow.
|
|
67
|
+
|
|
68
|
+
## Contact
|
|
69
|
+
|
|
70
|
+
**Yu-Ting Wei** - ytsimon2004@gmail.com
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Minimal makefile for Sphinx documentation
|
|
2
|
+
#
|
|
3
|
+
|
|
4
|
+
# You can set these variables from the command line, and also
|
|
5
|
+
# from the environment for the first two.
|
|
6
|
+
SPHINXOPTS ?=
|
|
7
|
+
SPHINXBUILD ?= sphinx-build
|
|
8
|
+
SOURCEDIR = source
|
|
9
|
+
BUILDDIR = build
|
|
10
|
+
|
|
11
|
+
# Put it first so that "make" without argument is like "make help".
|
|
12
|
+
help:
|
|
13
|
+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
14
|
+
|
|
15
|
+
.PHONY: help Makefile
|
|
16
|
+
|
|
17
|
+
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
18
|
+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
19
|
+
%: Makefile
|
|
20
|
+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
@ECHO OFF
|
|
2
|
+
|
|
3
|
+
pushd %~dp0
|
|
4
|
+
|
|
5
|
+
REM Command file for Sphinx documentation
|
|
6
|
+
|
|
7
|
+
if "%SPHINXBUILD%" == "" (
|
|
8
|
+
set SPHINXBUILD=sphinx-build
|
|
9
|
+
)
|
|
10
|
+
set SOURCEDIR=source
|
|
11
|
+
set BUILDDIR=build
|
|
12
|
+
|
|
13
|
+
%SPHINXBUILD% >NUL 2>NUL
|
|
14
|
+
if errorlevel 9009 (
|
|
15
|
+
echo.
|
|
16
|
+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
|
17
|
+
echo.installed, then set the SPHINXBUILD environment variable to point
|
|
18
|
+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
|
19
|
+
echo.may add the Sphinx directory to PATH.
|
|
20
|
+
echo.
|
|
21
|
+
echo.If you don't have Sphinx installed, grab it from
|
|
22
|
+
echo.https://www.sphinx-doc.org/
|
|
23
|
+
exit /b 1
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
if "%1" == "" goto help
|
|
27
|
+
|
|
28
|
+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
|
29
|
+
goto end
|
|
30
|
+
|
|
31
|
+
:help
|
|
32
|
+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
|
33
|
+
|
|
34
|
+
:end
|
|
35
|
+
popd
|
|
Binary file
|
|
Binary file
|
|
Binary file
|