Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow free rotation of the atlas #36

Merged
merged 37 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
1a8d415
Fixed contents margins
IgorTatarnikov Jan 15, 2024
e71bbfb
Scaling of sample image added to adjust moving image dropdown
IgorTatarnikov Jan 15, 2024
4bdcdf8
Added brainglobe-utils as dependency
IgorTatarnikov Jan 15, 2024
20b97f7
Merge branch 'move-to-dropdown-parent' into scale-moving-image-resolu…
IgorTatarnikov Jan 15, 2024
35b24bd
Added error message when no images selected
IgorTatarnikov Jan 16, 2024
7d34970
Atlas rotation working using scipy
IgorTatarnikov Jan 16, 2024
2b50fce
Pitch, yaw, roll implemented using one affine transform
IgorTatarnikov Jan 16, 2024
8f42d33
Dask loading for both the reference atlas and the rotation
IgorTatarnikov Jan 16, 2024
94b38b6
Added a 'Reset Atlas' button, blocked while dask computes the rotatio…
IgorTatarnikov Jan 17, 2024
fe109bf
Rotate atlas button also greyed out while daks processes the rotation
IgorTatarnikov Jan 18, 2024
7d17da1
Use the update upload_pypi action (#29)
IgorTatarnikov Feb 2, 2024
5c5cd30
Resolved merge conflicts
IgorTatarnikov Feb 6, 2024
d2bec0d
Added elastix Logs directory to .gitignore
IgorTatarnikov Feb 6, 2024
9bd9ca4
Fixed tests
IgorTatarnikov Feb 6, 2024
8d4635b
Moved run_registration to be imported just as run button is clicked t…
IgorTatarnikov Feb 6, 2024
8480a9c
Atlas rotation works again (might relate to napari 0.4.19
IgorTatarnikov Feb 6, 2024
ae1110a
Added test for atlas_rotation_signal from AdjustMovingImage view
IgorTatarnikov Feb 6, 2024
3640363
[pre-commit.ci] pre-commit autoupdate (#30)
pre-commit-ci[bot] Feb 6, 2024
9d54161
[pre-commit.ci] pre-commit autoupdate (#31)
pre-commit-ci[bot] Apr 4, 2024
ef2174d
Import header from brainglobe-utils (#33)
K-Meech Apr 12, 2024
b02d396
Update requirements (#34)
IgorTatarnikov Apr 22, 2024
6436db4
add codecov token (#35)
K-Meech Apr 22, 2024
7767348
Added tests for calculate_rotated_bounding_box
IgorTatarnikov Apr 23, 2024
9de8014
Fixed docstrings for functions in utils.py
IgorTatarnikov Apr 23, 2024
78fbd78
Keep track of napari layers for the atlas and atlas annotations in th…
IgorTatarnikov Apr 23, 2024
4cbd6be
Added tests for atlas rotation
IgorTatarnikov Apr 23, 2024
503f57e
Fixed pre-commit
IgorTatarnikov Apr 23, 2024
b172fd6
Fixed merge conflicts
IgorTatarnikov Apr 23, 2024
01db43b
Add test for reset_atlas in adjust_moving_image_view
IgorTatarnikov Jun 27, 2024
e675ca0
Add caching
IgorTatarnikov Jun 27, 2024
a44410a
Update the function calls in test_adjust_moving_image_view
IgorTatarnikov Jun 27, 2024
8163101
Apply suggestions from code review
IgorTatarnikov Jul 26, 2024
de3a281
Applied suggestions from code review
IgorTatarnikov Jul 26, 2024
52a640f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 26, 2024
d5bee95
Fixed merge conflicts
IgorTatarnikov Jul 26, 2024
680848b
Applied suggestions from code review
IgorTatarnikov Jul 26, 2024
b129bd6
Merge branch 'atlas-yaw-pitch' of https://github.com/brainglobe/bg-el…
IgorTatarnikov Jul 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,28 @@ jobs:
with:
qt: true

# cache atlases needed by the tests
- name: Cache Atlases
id: atlas-cache
uses: actions/cache@v3
with:
path: | # ensure we don't cache any interrupted atlas download and extraction!
~/.brainglobe/*
!~/.brainglobe/atlas.tar.gz
key: ${{ runner.os }}-cached-atlases
enableCrossOsArchive: false # ~ and $HOME evaluate to different places across OSs!

- if: ${{ steps.atlas-cache.outputs.cache-hit == 'true' }}
name: List files in brainglobe data folder # good to be able to sanity check that user data is as expected
run: |
ls -af ~/.brainglobe/


# Run tests
- uses: neuroinformatics-unit/actions/test@v2
with:
python-version: ${{ matrix.python-version }}
secret-codecov-token: ${{ secrets.CODECOV_TOKEN }}

build_sdist_wheels:
name: Build source distribution
Expand All @@ -66,11 +84,6 @@ jobs:
needs: [build_sdist_wheels]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@v1.5.0
- uses: neuroinformatics-unit/actions/upload_pypi@v2
with:
user: __token__
password: ${{ secrets.TWINE_API_KEY }}
secret-pypi-key: ${{ secrets.TWINE_API_KEY }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,6 @@ venv/

# written by setuptools_scm
**/_version.py

# Elastix related files
/Logs/
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ repos:
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.9
rev: v0.3.5
hooks:
- id: ruff
- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.3.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
rev: v1.9.0
hooks:
- id: mypy
additional_dependencies:
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ include README.md
include .napari-hub/DESCRIPTION.md
include .napari-hub/config.yml
include brainglobe_registration/napari.yaml
include brainglobe_registration/resources/brainglobe.png
exclude .pre-commit-config.yaml

recursive-include brainglobe_registration/parameters *.txt
Expand Down
2 changes: 1 addition & 1 deletion brainglobe_registration/elastix/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import itk
import numpy as np
from bg_atlasapi import BrainGlobeAtlas
from brainglobe_atlasapi import BrainGlobeAtlas


def get_atlas_by_name(atlas_name: str) -> BrainGlobeAtlas:
Expand Down
Loading
Loading