Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
487 commits
Select commit Hold shift + click to select a range
47b9494
DEV: Update to latest `black` format (#274)
shaneahmed Feb 1, 2022
fd04a90
DOC: Add conda recipe badge (#277)
sarthakpati Feb 2, 2022
600e14f
DEV: Fix Flake8 Errors And Typos In `stainextract.py` (#268)
shaneahmed Feb 2, 2022
c7a3728
NEW: Add DICOM Read Support (#270)
John-P Feb 7, 2022
1a801c3
[DOC/DEV]: Update After conda-forge Release (#278)
shaneahmed Feb 8, 2022
a53684a
[skip travis] DOC: Remove duplicate conda badge (#282)
shaneahmed Feb 8, 2022
fbce1b7
BUG: Fix Graph Functions (#283)
John-P Feb 16, 2022
b6751f9
ENH: Improve Error Messages (#280)
John-P Feb 18, 2022
a940ddf
DEV: Fix Flake8 Errors And Typos In `patchextraction.py` (#281)
shaneahmed Feb 18, 2022
b182489
BUG: Fix Travis Detection (#292)
shaneahmed Feb 21, 2022
9a0319a
DEV: Create dependabot.yml (#290)
John-P Feb 21, 2022
0d45462
DOC: Update docs with Docker instructions (#286)
ghadjigeorghiou Feb 22, 2022
d732dad
DEV: Update forward function for consistent input (#299)
shaneahmed Feb 22, 2022
ad81417
DEV: Dependency upgrades (#300)
shaneahmed Feb 24, 2022
0250fdc
DEV: Update scikit-image Version (#284)
Srijay-lab Feb 24, 2022
ca0ece6
NEW: Add `micronet` (#293)
shaneahmed Feb 24, 2022
4d2d3bf
DEV: Improve CLI (#307)
shaneahmed Mar 11, 2022
e283b4d
DOC: Tidy Annotation Docstrings (#310)
John-P Mar 11, 2022
40b1e1a
DOC: Tidy wsicore Docstrings (#309)
John-P Mar 14, 2022
4841a7c
DOC: Update HoVerNetPlus metrics (#315)
adamshephard Mar 18, 2022
6a78210
DOC: Tidy Miscellaneous Docstrings (#311)
John-P Mar 18, 2022
6e25ee7
TST: Make Stain Norm CLI Tests Use Temp Dir (#319)
John-P Mar 18, 2022
f8ec270
DOC: Update micronet.py docstring (#318)
shaneahmed Mar 23, 2022
c5dd408
DEV: Fix Makefile Docs Command (#316)
John-P Mar 23, 2022
beeffd2
DOC: Tidy Tools Docstrings (#306)
John-P Mar 24, 2022
2afdb9c
DEV: Update Dependencies (#327)
shaneahmed Apr 1, 2022
d7242da
DEV: Bump twine from 3.8.0 to 4.0.0 (#326)
dependabot[bot] Apr 1, 2022
5f87565
BUG: Fixed Performance Issue In semantic_segmentor.py (#313)
vqdang Apr 8, 2022
802106f
DEV: Ignore tmp_path Paths For DeepSource (#332)
John-P Apr 8, 2022
eab24c2
DOC: Update License to BSD 3-clause (#323)
shaneahmed Apr 8, 2022
a8c42fc
ENH: Add Better Support For Tiled TIFFs (#317)
John-P Apr 9, 2022
c253638
TST: Add tests for `misc` and `wsireader` (#333)
shaneahmed Apr 9, 2022
c474425
DOC: Tidy Utils Docstrings (#308)
John-P Apr 9, 2022
862d82f
DOC: Tidy Model Docstrings (#305)
John-P Apr 11, 2022
c7fe785
BUG: Fix AnnotationStore Compile Option Check (#337)
measty Apr 22, 2022
4bf553a
DOC: Add Metrics Tables To Documentation (#335)
simongraham May 6, 2022
7eb34e3
EG: Add Benchmark Notebook For Annotations (#320)
John-P May 6, 2022
6a81f93
ADD: Add Support For Multiple Channel Images (HxWxC) (#328)
vqdang May 6, 2022
bc87030
REL: Release 1.1.0 (#341)
shaneahmed May 7, 2022
1276fd2
Merge branch 'master' into develop
shaneahmed May 7, 2022
d68b446
BUG: Fix deepsource errors (#343)
shaneahmed May 7, 2022
28c3264
DEV: Depreciate Support For Python 3.7. (#344)
shaneahmed May 13, 2022
5abfddd
REF: Rename stainnorm_target() function to stain_norm_target() (#347)
Srijay-lab May 23, 2022
3a433e4
ENH: Fix Bugs & Improve UNet Architecture (#273)
mostafajahanifar May 23, 2022
1e808d3
DEV: Downgrade `albumentations` requirements (#353)
shaneahmed May 30, 2022
f6a7fc9
DEV: Fix Flake8 Errors architecture/utils (#349)
shaneahmed Jun 10, 2022
17c1066
DEV: Fix Flake8 Errors And Typos In `unet.py` (#345)
shaneahmed Jun 11, 2022
0d74628
DEV: Fix Flake8 Errors and Typos in `architecture/vanilla.py` (#350)
shaneahmed Jun 11, 2022
637cdd0
DEV: Remove nitpick
John-P Jun 13, 2022
8758152
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 13, 2022
f874cca
DEV: Flake8 conf.py
John-P Jun 13, 2022
01443fb
Merge branch 'dev-pre-commit-ci' of github.com:TissueImageAnalytics/t…
John-P Jun 13, 2022
b320fa8
[pre-commit.ci] pre-commit autoupdate (#362)
pre-commit-ci[bot] Jun 13, 2022
7528c17
Merge remote-tracking branch 'origin/develop' into dev-pre-commit-ci
shaneahmed Jun 13, 2022
7d9054c
DEV: Fix flake8 errors docs/conf.py
shaneahmed Jun 13, 2022
3780566
DEV: Fix Flake8 Errors and Typos in `tests_hovernetplus.py` (#363)
shaneahmed Jun 16, 2022
737a905
Merge remote-tracking branch 'origin/develop' into dev-pre-commit-ci
shaneahmed Jun 16, 2022
ada39d8
DEV: Fix Flake8 Errors and Typos in `tests\test_save_tiles.py` (#361)
shaneahmed Jun 16, 2022
3a93d13
Merge remote-tracking branch 'origin/develop' into dev-pre-commit-ci
shaneahmed Jun 17, 2022
ded1cf6
BUGFIX: Fixing for Merging Patch Predictor Output (#358)
vqdang Jun 17, 2022
35c6498
DEV: Resolve Linter Issue lru_cache Potential Memory Leak (#367)
John-P Jun 17, 2022
4722011
DEV: Fix Flake8 SC100 Errors (#368)
shaneahmed Jun 17, 2022
76d07c0
NEW: Add Python 3.10 Support (#373)
shaneahmed Jun 20, 2022
9046f6b
DEV: Fix PT011 Pytest Raises is Too Broad (#371)
shaneahmed Jun 20, 2022
21bf653
DEV: Fix Flake8 Errors in `utils/transforms.py` (#369)
shaneahmed Jun 20, 2022
233070a
DEV: Fix Flake8 Error R504 Unnecessary Variable Assignment Before Ret…
shaneahmed Jun 20, 2022
8d0a8e8
DEV: Fix Flake8 Errors and Typos in `models/dataset/abc` (#366)
shaneahmed Jun 21, 2022
d265a3e
DEP: Remove `get_wsireader` (#375)
shaneahmed Jun 21, 2022
0e6e5a1
TST: Optimise semantic segmentation test for travis runs (#376)
shaneahmed Jun 21, 2022
8647a77
DEV: Fix Flake8 PIE*, C408 and PT* Errors (#377)
shaneahmed Jun 22, 2022
8e31644
DEV: Fix Flake8 `wsireader` (#378)
shaneahmed Jun 22, 2022
84b37a2
DEV: Address Flake8 Linter Issues in `visualization.py` (#381)
John-P Jun 23, 2022
13f7ca0
DEV: Fix Flake8 Errors and Typos in `models/engine/patchpredictor.py`…
shaneahmed Jun 24, 2022
54835c1
DEV: Fix Flake8 Errors in `semantic_segmentor.py` (#379)
shaneahmed Jun 24, 2022
c1dcff8
DEV: Replace PlattScaler With Sklearn LogisticRegression (#380)
John-P Jun 25, 2022
201584f
NEW: CLI For TileServer (#321)
measty Jun 25, 2022
8d4a528
DEV: Add New Pre-Commit Hooks (#374)
John-P Jun 27, 2022
9815feb
BUG: Fix Errors after torch upgrade (#384)
shaneahmed Jul 1, 2022
b4cf2eb
DOC: Add Description for IDARS Algorithm (#383)
DavidBAEpstein Jul 1, 2022
e552ccb
DEV: Restore `nbsphinx` To `requirements.dev.conda.yml` (#387)
DavidBAEpstein Jul 2, 2022
bf0f66b
DEV: Set Up GitHub Actions Workflow (Build, Test & Release) (#386)
John-P Jul 3, 2022
3629cd2
NEW: Add Experimental NGFF Support (#340)
John-P Jul 4, 2022
ffb44e2
TST: Set Test Number of Workers Based on CPU Count (#389)
John-P Jul 4, 2022
75d1a02
BUG: Check That An Input Path Actually Exists (#390)
John-P Jul 4, 2022
a4bd90e
[pre-commit.ci] pre-commit autoupdate (#393)
pre-commit-ci[bot] Jul 5, 2022
407ce58
REV: Revert Changes From #344 (#391)
shaneahmed Jul 5, 2022
f58f50b
[Skip Travis] REL: Release 1.2.0 (#394)
shaneahmed Jul 5, 2022
8db62b9
Merge branch 'master' into develop
shaneahmed Jul 5, 2022
216ba75
[skip ci] DOC: Update Python Notebooks to Fix Errors (#396)
shaneahmed Jul 5, 2022
199a723
[skip travis] DEV: Run GitHub Actions on tags (#399)
shaneahmed Jul 5, 2022
a59e831
Merge branch 'master' into develop
shaneahmed Jul 5, 2022
5fbc1db
[skip travis] DEV: Add tags to release (#402)
shaneahmed Jul 6, 2022
895de0c
DEV: Delete .travis.yml (#404)
John-P Jul 6, 2022
e96405b
DEV: Add GitHub Action To Perform Conda Solve (#398)
John-P Jul 7, 2022
ca89a20
DEV: Add Pre-Commit Hook To Check Requirements Consistency (#392)
John-P Jul 7, 2022
17854cd
BUG: Fix tileserver CLI Issues (#403)
measty Jul 7, 2022
019fceb
REL: Release 1.2.1 (#405)
shaneahmed Jul 7, 2022
c773e1c
BUG: Fix deepsource error PY-W0079 (#407)
shaneahmed Jul 7, 2022
9300481
MAINT: Fix Link To Point To Master Branch (#412)
DavidBAEpstein Jul 13, 2022
dd4e5f9
DEV: Missing Imports Check (Pre-Commit Hook) (#408)
John-P Jul 15, 2022
0fde880
NEW: Dice Metric (#413)
ruqayya Jul 16, 2022
7e9c01f
DEV: Fix DOCS on `readthedocs` (#415)
shaneahmed Jul 16, 2022
8705422
DEV: Fix Pre-commit Error (#416)
shaneahmed Jul 17, 2022
fa97018
MAINT: Refactor Requirements Consistency (#420)
John-P Jul 21, 2022
1f3e07d
DEV: Add Notebook AST Pre-Commit Hook (#417)
John-P Jul 21, 2022
ac40d22
NEW: Annotation Rendering (#330)
measty Jul 22, 2022
8a1397a
TST: Validate Docstring Examples (#409)
John-P Jul 22, 2022
18e133c
BUG: Fix Issue #410: Update colorbar_params arguments in overlay_pred…
Srijay-lab Jul 25, 2022
f525298
ENH: Improve Docstring Validity Test Error Output (#428)
John-P Jul 25, 2022
fee5ac9
DOC: JNB-RTD consistency for 03-tissue-masking.ipynb (#418)
DavidBAEpstein Jul 25, 2022
ba8e2dc
BUG: Corrected error in nucleus instance segmentor engine (#430)
adamshephard Jul 26, 2022
9de3a0d
DOC: - Fix `WSIReader` docstring. (#435)
shaneahmed Jul 28, 2022
b53845f
MAINT: Refactor Code In wsireader (#422)
John-P Jul 28, 2022
af7319e
NEW: Pre-Processing of an Image Pair for Registration (#426)
ruqayya Aug 1, 2022
3bcd9ff
BUG: Fix G200 precommit. (#442)
shaneahmed Aug 15, 2022
eed2871
DOC: Fix Example Gallery (#444)
shaneahmed Aug 17, 2022
810a0ee
NEW: Pre-Alignment of an Image Pair (#427)
ruqayya Aug 19, 2022
c478c06
NEW: Feature Extraction for Deep Feature Based Registration (#437)
ruqayya Aug 22, 2022
030af77
DEV: Add Pre-Commit Hooks To Format Markdown & Notebook Markdown (#441)
John-P Aug 24, 2022
6f1802c
[pre-commit.ci] [DEV] Pre-commit Autoupdate - Update Flake8 Version (…
pre-commit-ci[bot] Aug 26, 2022
b3ace85
DOC: Update Python Version To `3.10` in Readthedocs. (#447)
shaneahmed Aug 26, 2022
4d8288b
[pre-commit.ci] pre-commit autoupdate (#453)
pre-commit-ci[bot] Aug 30, 2022
fd957af
[skip ci] DEV: Use app.add_css_file.
shaneahmed Aug 30, 2022
1ba4272
DEV: FIX Requirements Versions (#455)
shaneahmed Sep 1, 2022
fb7f884
DOC: Improve 07-advanced-modeling.ipynb (#439)
DavidBAEpstein Sep 2, 2022
e4534d1
NEW: Add SCCNN Cell Detection Architecture (#434)
shaneahmed Sep 2, 2022
fe1112f
NEW: Add MapDe architecture. (#443)
shaneahmed Sep 2, 2022
11b1e10
MAINT: fix typo (#458)
DavidBAEpstein Sep 5, 2022
fcfcfc2
[pre-commit.ci] pre-commit autoupdate (#460)
pre-commit-ci[bot] Sep 5, 2022
cb45dba
DEV: Create pip Install From Git Workflow (#456)
John-P Sep 6, 2022
6e1f151
DOC: JNB-RTD consistency for idars.ipynb (#421)
DavidBAEpstein Sep 6, 2022
966a608
DEP: Remove flake8-sql (#459)
shaneahmed Sep 6, 2022
2720662
DOC: JNB-RTD consistency for 05-patch-prediction.ipynb (#432)
DavidBAEpstein Sep 6, 2022
2e8a0b6
BUG: Fix Flake8 Error B024 (#461)
shaneahmed Sep 6, 2022
61fd43c
ENH: Add Min Mask Ratio Parameter in PatchExtractor (#451)
rogertrullo Sep 6, 2022
f399b8f
DOC: JNB-RTD consistency for full-pipelines/slide-graph.ipynb (#425)
DavidBAEpstein Sep 8, 2022
09eff6c
DOC: JNB-RTD consistency for 01-wsi-reading.ipynb (#429)
DavidBAEpstein Sep 9, 2022
c45ac10
DOC: Change HTML Theme to furo (#457)
shaneahmed Sep 9, 2022
73f9d1f
DOC: Fix Docstring Rendering and Typos (#463)
shaneahmed Sep 9, 2022
89f95c6
DOC: minor changes to 02-stain-normalization.ipynb (#466)
DavidBAEpstein Sep 12, 2022
3d5a375
[skip ci] DOC: Remove `nbgallery` (#469)
shaneahmed Sep 13, 2022
3af817d
NEW: Feature Matching for Deep Feature Based Registration (#440)
ruqayya Sep 13, 2022
8b7855d
DEV: Add `docs/requirements.txt` to `requirements_dev.txt` (#470)
shaneahmed Sep 13, 2022
d047331
Minor cnanges to 04-patch-extraction.ipynb (#468)
DavidBAEpstein Sep 14, 2022
419d7bb
BUG: Fix the `colorbar` Bug with `plt` (#473)
measty Sep 16, 2022
1757f84
DEV: Use `requirements.txt` in `setup.py` (#467)
shaneahmed Sep 23, 2022
3babb4a
DEV: Add macOS To pip Install Workflow (#464)
John-P Sep 23, 2022
fafa65e
DEV: Fix PIP Install Workflow (#477)
shaneahmed Sep 23, 2022
06e8a4f
[skip ci] DOC: Update citation in README.md and CITATION.cff (#480)
shaneahmed Sep 26, 2022
bb0a09a
DEV: Run PIP Workflow `requirements` files Only (#481)
shaneahmed Sep 27, 2022
2595d37
DEV: Improve TIAToolbox Import (#478)
shaneahmed Sep 27, 2022
62dc5bd
Improve 09-multi-task-segmentation.ipynb (#479)
DavidBAEpstein Sep 27, 2022
d938763
DEV: Fix Circular import `wsireader` (#484)
shaneahmed Oct 7, 2022
39af08a
[skip ci] DEV: Remove nbsphinx and replace it with myst-nb. (#454)
shaneahmed Oct 10, 2022
348a1ec
[pre-commit.ci] pre-commit autoupdate (#487)
pre-commit-ci[bot] Oct 11, 2022
00b6e9c
NEW: Add DFBRegistration Function (#465)
ruqayya Oct 13, 2022
bc5ee15
BUG: Read MPP Metadata From NGFF v0.4 Zattrs (#486)
John-P Oct 13, 2022
b0d5981
BUG: Read TIFF Resolution Tags As A Fraction (#489)
John-P Oct 14, 2022
bb4f3a9
ENH: Annotation Storage Additions For Visualization (#445)
measty Oct 18, 2022
ec654f5
NEW: Non-Rigid Registration Using SimpleITK (#488)
ruqayya Oct 20, 2022
3134e7e
[skip ci] DOC: DFBR Jupyter Notebook (#485)
ruqayya Oct 20, 2022
d19d935
BUG: Update HoVer-Net+ Post-processing (#431)
adamshephard Oct 21, 2022
fae4189
BUG: Fix Bug When OME-TIFF Missing Objective Power (#492)
John-P Oct 21, 2022
b2556dd
REL: Release 1.3.0 (#493)
shaneahmed Oct 21, 2022
dd846ec
Merge branch 'master' into develop
shaneahmed Oct 21, 2022
3cefac1
[skip ci] BUG: Fix FLK-D202 No blank lines allowed after function doc…
shaneahmed Oct 21, 2022
aee5481
BUG: Fix R505 flake8 error (#505)
shaneahmed Nov 4, 2022
a90b330
TST: Prevent Test Dumping File To Root (#507)
John-P Nov 4, 2022
6b6fd91
MANT: Refactor Parameterized Tests (#501)
John-P Nov 11, 2022
1f0c8ea
NEW: Add NuClick architecture (#449)
mostafajahanifar Nov 14, 2022
0ee4d7a
ENH: Add Annotation Store Reader (#476)
measty Nov 17, 2022
6553b62
🐳 DEV: Publishing Docker Images (#504)
mostafajahanifar Nov 22, 2022
b603aec
DEV: Update bump2version config (#511)
shaneahmed Nov 23, 2022
b7fdf50
DEV: Update Dependencies (#498)
shaneahmed Nov 24, 2022
9be4bf5
DEV: Fix Flake8 E800 for tests (#512)
shaneahmed Nov 25, 2022
934b145
DOC: Copy Sample SVS Loader From docs-examples-1 (#517)
John-P Dec 6, 2022
7425f3d
[skip ci] DOCS: Simplify Example Notebook 1 (#503)
John-P Dec 6, 2022
3a31586
:sparkles: NEW: DFBR for Registering Images (#510)
ruqayya Dec 9, 2022
e87bf25
DEV: Restrict shapely version to less than 2.0.0 (#520)
shaneahmed Dec 14, 2022
5eec6a3
📝 [skip ci] DOC: DFBR Jupyter Notebook revised (#494)
ruqayya Dec 19, 2022
76fcfff
:bug: BUG: Fix Deepsource Errors (#522)
shaneahmed Dec 20, 2022
b5874b6
🔖 REL: REL: Release 1.3.1 (#524)
shaneahmed Dec 20, 2022
a4f6487
➖ DEV: Remove Python 3.7 Support (#526)
shaneahmed Jan 17, 2023
aab2df9
:arrow_up: DEV: Upgrade dependencies (#527)
shaneahmed Jan 17, 2023
147c77d
:bug: BUG: Fix Flake8 Errors (#528)
shaneahmed Feb 13, 2023
8a7e4cc
:pushpin: DEV: Update isort version (#536)
shaneahmed Feb 13, 2023
bfed42a
:pushpin: DEV: Update black version (#537)
shaneahmed Feb 13, 2023
4007525
:ambulance: BUG: Fix DICOMWSIReader metadata reading (#539)
shaneahmed Feb 16, 2023
633feb7
🔖 REL: Release 1.3.2 (#542)
shaneahmed Feb 17, 2023
ba76880
:boom: API: Change API for SCCNN input (#544)
shaneahmed Feb 20, 2023
287d505
:white_check_mark: TST: Fix Local Tests for Windows/Linux (#550)
shaneahmed Feb 23, 2023
d42f323
:arrow_up: DEP: Fix scipy deprecation (#547)
shaneahmed Feb 24, 2023
0cbef86
:bug: BUG: Fix B028 Flake8 Error (#549)
shaneahmed Mar 2, 2023
e345d64
:pushpin: DEV: Pin scikit-image to less than 0.20 (#551)
shaneahmed Mar 2, 2023
cd0e9c3
:arrow_up: DEP: Update matplotlib Based Code (#545)
shaneahmed Mar 2, 2023
51b638c
🔖 REL: Release 1.3.3 (#554)
shaneahmed Mar 2, 2023
5517d03
:arrow_up: UP: Update Shapely version (#548)
shaneahmed Mar 3, 2023
215591f
:rotating_light: DEV: Use logger Instead Of print (`save_tiles.py`) (…
shaneahmed Mar 3, 2023
2ddab87
:arrow_up: DEV: Upgrade Scikit-image Dependency (#553)
shaneahmed Mar 9, 2023
3f7eedd
:adhesive_bandage: ENH: Apply Stain Augmentation to Tissue Regions (#…
navidstuv Mar 9, 2023
a2930e9
:wrench: DEV: Filter Logger Output to `stdout` and `stderr` (#557)
shaneahmed Mar 10, 2023
54b9e22
:heavy_minus_sign: DEP: Remove `tox` Dependency (#561)
shaneahmed Mar 10, 2023
bf5f7c6
🚨 DEV: Use logger Instead Of print (slide_info.py) (#562)
shaneahmed Mar 13, 2023
adf42f5
:art: ENH: Move `WSIReader` and `WSIMeta` import to top-level (#560)
shaneahmed Mar 13, 2023
8ce0ebf
:memo: DOC: Improve Annotation Store Documentation + Fix Bug (#565)
John-P Mar 16, 2023
6fb0e31
:bug: BUG: Fix Level When Using DICOM `read_region` (#564)
measty Mar 17, 2023
6388513
🐛 BUG: Fix Docker Build for Ubuntu OS(s) (#569)
mostafajahanifar Mar 20, 2023
2122f97
:memo: DOC: Improve Installation Instructions (#567)
shaneahmed Mar 23, 2023
09bd197
:art: Move Models to Top-Level Import (#574)
shaneahmed Mar 24, 2023
6ec1083
🩹 BUG: Fix Parsing Missing Omero Version NGFF Metadata (#568)
John-P Mar 27, 2023
40a1036
:wrench: Use `pyproject.toml` for `bdist_wheel` configuration (#575)
shaneahmed Mar 31, 2023
eb979f3
🔧 Use pyproject.toml for pytest Configuration (#573)
shaneahmed Mar 31, 2023
1529a04
:wrench: Use `pyproject.toml` for `isort` Configuration (#572)
shaneahmed Mar 31, 2023
8b18a44
🔧 Use `pyproject.toml` for `pytest` Configuration (#579)
shaneahmed Mar 31, 2023
41b3c66
✨ Return True for `is_ngff` With Warning Above Max NGFF Version (#577)
John-P Mar 31, 2023
e413e6c
🐛 Fix for Recent `wsidicom` Update (#580)
measty Mar 31, 2023
64b6e31
➕ Add joblib as a dependency (#581)
shaneahmed Apr 3, 2023
e9b7768
:pushpin: Update `black` Version to `23.3.0` (#585)
shaneahmed Apr 6, 2023
dd9ca06
⚡ Faster Filtering in Patch Dataset (#571)
measty Apr 6, 2023
df7655d
📌 Pin Pandas Version to `>=2.0.0` (#583)
shaneahmed Apr 9, 2023
875c2d9
🚨 Use `logger` Instead Of `warnings` for `patchextraction.py` (#589)
shaneahmed Apr 11, 2023
4d62747
✅ Add tests for lazy import (#591)
shaneahmed Apr 12, 2023
5236997
🚨 Use `logger` Instead Of `warnings` for `pyramid.py` and `storage.py…
shaneahmed Apr 14, 2023
f331aac
🚨 Use `logger` Instead Of `warnings` for `utils` Package (#586)
shaneahmed Apr 14, 2023
149324a
:page_facing_up: Update Documentation for License on Model Weights (#…
simongraham Apr 14, 2023
a1d7cc7
[skip ci] :bug: Fix Docstring and License Badge (#593)
shaneahmed Apr 17, 2023
267b91a
✨ Feature Engine for Multi-Task Segmenter (#424)
adamshephard Apr 18, 2023
7541f57
🚨 Use `logger` Instead Of `warnings` for `wsireader.py` (#584)
shaneahmed Apr 21, 2023
4079147
🧑‍💻 Add Notebook URL Replacement Command (#519)
John-P Apr 21, 2023
2ddf346
:recycle: Move `requirements*.txt` to `requirements` Folder (#563)
shaneahmed Apr 21, 2023
84183ed
🐛 Fix `deepsource` Errors (#594)
shaneahmed Apr 21, 2023
9eb04b2
:memo: Update HISTORY.md with release notes
shaneahmed Apr 24, 2023
66ef49c
:memo: Update HISTORY.md with release notes
shaneahmed Apr 24, 2023
ab4c64f
Bump version: 1.3.3 → 1.4.0
shaneahmed Apr 24, 2023
8e3dcba
:memo: Update Jupyter notebook links
shaneahmed Apr 24, 2023
1358c79
:pushpin: Pin dependencies for long term stable release
shaneahmed Apr 24, 2023
8cd1056
:pencil2: Fix Typo (#596)
blaginin Apr 27, 2023
8fdabbf
Merge branch 'develop' into pre-release
shaneahmed Apr 27, 2023
28c52bf
🐛 Fix `MultiTaskSegmentor` Example (#597)
blaginin May 3, 2023
bb78d2e
:arrow_up: Upgrade `numpy` Dependency (#543)
shaneahmed May 3, 2023
be40b1a
Merge branch 'develop' into pre-release
shaneahmed May 3, 2023
c6273dd
:pushpin: Update `numpy` pin
shaneahmed May 3, 2023
6039197
:sparkles: ENH: Add Neighbourhood Querying Support To `AnnotationStor…
John-P May 4, 2023
591482c
🐍 Update Supported Python Versions (add 3.11 ) (#500)
John-P May 5, 2023
e49cb71
🚨 Use `logger` Instead Of `warnings` for `models` Package (#588)
shaneahmed May 5, 2023
1c42e39
🚨 Use `logger` Instead Of `warnings` for `wsi_registration.py` (#587)
shaneahmed May 5, 2023
0438f4b
Merge branch 'develop' into pre-release
shaneahmed May 5, 2023
74d04b9
:memo: Update HISTORY.md
shaneahmed May 5, 2023
3e56f5f
:pushpin: Pin dependecies
shaneahmed May 5, 2023
1524323
Merge branch 'master' into pre-release
shaneahmed May 5, 2023
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
Prev Previous commit
Next Next commit
BUG: Fix Graph Functions (#283)
- Fix some issues in graph.py

1. Fix typos in docstrings.
2. Fix typo in function name triangle -> triangle
3. Fix a bug in graph visualization where some edges would not be drawn.

Some other things have been fixed as they were discovered during this PR:
1. Fix a bug in function to convert edge index to triangles (it would find the same triangle twice in a different order).
2. Add tests.

Co-authored-by: John Pocock <John-P@users.noreply.github.com>
Co-authored-by: Shan Raza <13048456+shaneahmed@users.noreply.github.com>
Co-authored-by: Dang Vu <24943262+vqdang@users.noreply.github.com>
  • Loading branch information
John-P authored Feb 16, 2022
commit fbce1b75dacd0dffbe4acb306cfd22574ea7e813
56 changes: 45 additions & 11 deletions tests/test_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
affinity_to_edge_index,
delaunay_adjacency,
edge_index_to_triangles,
traingle_signed_area,
triangle_signed_area,
)


Expand Down Expand Up @@ -92,7 +92,7 @@ def test_affinity_to_edge_index_fuzz_output_shape():
n = len(affinity_matrix)
two, m = edge_index.shape
assert two == 2
assert 0 <= m <= n ** 2
assert 0 <= m <= n**2


def test_affinity_to_edge_index_invalid_fuzz_input_shape():
Expand All @@ -118,34 +118,68 @@ def test_edge_index_to_triangles_invalid_input():
edge_index_to_triangles(edge_index)


def test_traingle_signed_area():
def test_triangle_signed_area():
"""Test that the signed area of a triangle is correct."""
# Triangle with positive area
points = np.array([[0, 0], [1, 0], [0, 1]])
area = traingle_signed_area(points)
area = triangle_signed_area(points)
assert area == 0.5

# Triangle with negative area
points = np.array([[0, 0], [1, 0], [0, -1]])
area = traingle_signed_area(points)
area = triangle_signed_area(points)
assert area == -0.5

# Triangle with co-linear points
points = np.array([[0, 0], [1, 1], [2, 2]])
area = traingle_signed_area(points)
area = triangle_signed_area(points)
assert area == 0

# Triangle with larger area
points = np.array([[0, 0], [2, 0], [0, 2]])
area = traingle_signed_area(points)
area = triangle_signed_area(points)
assert area == 2


def test_traingle_signed_area_invalid_input():
def test_triangle_signed_area_invalid_input():
"""Test that the signed area of a triangle with invalid input fails."""
points = np.random.rand(3, 3)
with pytest.raises(ValueError, match="3x2"):
traingle_signed_area(points)
triangle_signed_area(points)


def test_edge_index_to_trainangles_single():
"""Test edge_index_to_triangles with a simple 2XM input matrix.

Basic test case for a single triangle.

0 -- 1
| /
| /
2
"""
edge_index = np.array([[0, 1], [0, 2], [1, 2]]).T
triangles = edge_index_to_triangles(edge_index)
assert triangles.shape == (1, 3)
assert np.array_equal(triangles, np.array([[0, 1, 2]]))


def test_edge_index_to_trainangles_many():
"""Test edge_index_to_triangles with a simple 2XM input matrix.

Moderate test case for a few trainangles.

4 -- 3
| / |
|/ |
0 -- 1
| /
| /
2
"""
edge_index = np.array([[0, 1], [0, 2], [1, 2], [0, 3], [1, 3], [0, 4], [4, 3]]).T
triangles = edge_index_to_triangles(edge_index)
assert triangles.shape == (3, 3)


def pytest_generate_tests(metafunc):
Expand Down Expand Up @@ -210,7 +244,7 @@ def test_build(graph_constructor):
two, m = edge_index.shape
n = len(x)
assert two == 2
assert 0 <= m <= n ** 2
assert 0 <= m <= n**2

@staticmethod
def test_visualise(graph_constructor):
Expand Down Expand Up @@ -279,5 +313,5 @@ def test_visualise_invalid_input(graph_constructor):
graph_constructor.visualise({})
with pytest.raises(ValueError, match="must contain edge_index"):
graph_constructor.visualise({"x": []})
with pytest.raises(ValueError, match="must contain coords"):
with pytest.raises(ValueError, match="must contain coordinates"):
graph_constructor.visualise({"x": [], "edge_index": []})
57 changes: 29 additions & 28 deletions tiatoolbox/tools/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ def delaunay_adjacency(points: ArrayLike, dthresh: Number) -> list:
return adjacency


def traingle_signed_area(triangle: ArrayLike) -> int:
def triangle_signed_area(triangle: ArrayLike) -> int:
"""Determine the signed area of a triangle.

Args:
triangle (ArrayLike): A 3x2 list of coordinates.

Returns:
int: The signed area of the triange. It will be negative if
int: The signed area of the triangle. It will be negative if
the triangle has a clockwise winding, negative if the
triangle has a counter-clockwise winding, and zero if the
triangles points are collinear.
Expand All @@ -121,7 +121,7 @@ def traingle_signed_area(triangle: ArrayLike) -> int:


def edge_index_to_triangles(edge_index: ArrayLike) -> ArrayLike:
"""Convert an edged index to traingle simplices.
"""Convert an edged index to triangle simplices (triplets of coordinate indices).

Args:
edge_index (ArrayLike):
Expand Down Expand Up @@ -151,13 +151,13 @@ def edge_index_to_triangles(edge_index: ArrayLike) -> ArrayLike:
# Remove any nodes with less than two neighbours
nodes = [node for node in nodes if len(neighbours[node]) >= 2]
# Find the triangles
triangles = []
triangles = set()
for node in nodes:
for neighbour in neighbours[node]:
overlap = neighbours[node].intersection(neighbours[neighbour])
while overlap:
triangles.append([node, neighbour, overlap.pop()])
return np.array(triangles, dtype=np.int32, order="C")
triangles.add(frozenset({node, neighbour, overlap.pop()}))
return np.array([list(tri) for tri in triangles], dtype=np.int32, order="C")


def affinity_to_edge_index(
Expand Down Expand Up @@ -217,7 +217,7 @@ def _umap_reducer(graph: Dict[str, ArrayLike]) -> ArrayLike:
Args:
graph (dict):
A graph with keys "x", "edge_index", and optionally
"coords".
"coordinates".
Returns:
ArrayLike: A UMAP embedding of `graph["x"]` with shape (N, 3)
and values ranging from 0 to 1.
Expand All @@ -241,7 +241,7 @@ def build(
) -> Dict[str, ArrayLike]:
"""Build a graph via hybrid clustering in spatial and feature space.

The graph is constructed via hybrid heirachical clustering followed
The graph is constructed via hybrid hierarchical clustering followed
by Delaunay triangulation of these cluster centroids.
This is part of the SlideGraph pipeline but may be used to construct
a graph in general from point coordinates and features.
Expand All @@ -254,7 +254,7 @@ def build(
Points which are spatially further apart than
`neighbour_search_radius` are given a similarity of 1 (most
dissimilar). This significantly speeds up computation. This distance
metric is then used to form clusters via hierachical/agglomerative
metric is then used to form clusters via hierarchical/agglomerative
clustering.

Next, a Delaunay triangulation is applied to the clusters to connect
Expand Down Expand Up @@ -283,7 +283,7 @@ def build(
feature_range_thresh (Number):
Minimal range for which a feature is considered significant.
Features which have a range less than this are ignored.
Defaults to 1e-4. If falsey (None, False, 0, etc.), then
Defaults to 1e-4. If falsy (None, False, 0, etc.), then
no features are removed.

Returns:
Expand Down Expand Up @@ -319,8 +319,8 @@ def build(

# Build a kd-tree and rank neighbours according to the euclidean
# distance (nearest -> farthest).
ckdtree = cKDTree(points)
neighbour_distances_ckd, neighbour_indexes_ckd = ckdtree.query(
kd_tree = cKDTree(points)
neighbour_distances_ckd, neighbour_indexes_ckd = kd_tree.query(
x=points, k=len(points)
)

Expand Down Expand Up @@ -396,7 +396,7 @@ def build(
return {
"x": feature_centroids,
"edge_index": edge_index,
"coords": point_centroids,
"coordinates": point_centroids,
}

@classmethod
Expand All @@ -411,7 +411,7 @@ def visualise(
"""Visualise a graph.

The visualisation is a scatter plot of the graph nodes
and the connections bneewn them. By default, nodes are coloured
and the connections between them. By default, nodes are coloured
according to the features of the graph via a UMAP embedding to
the sRGB color space. This can be customised by passing a color
argument which can be a single color, a list of colors, or a
Expand All @@ -428,7 +428,7 @@ def visualise(
- :class:`numpy.ndarray` - edge_index:
Edge index matrix defining connectivity.
Required
- :class:`numpy.ndarray` - coords:
- :class:`numpy.ndarray` - coordinates:
Coordinates of each node within the WSI (mean of point
in a cluster).
Required
Expand Down Expand Up @@ -464,35 +464,36 @@ def visualise(
>>> plt.show()

"""
from matplotlib import collections as mc

# Check that the graph is valid
if "x" not in graph:
raise ValueError("Graph must contain x")
if "edge_index" not in graph:
raise ValueError("Graph must contain edge_index")
if "coords" not in graph:
raise ValueError("Graph must contain coords")
if "coordinates" not in graph:
raise ValueError("Graph must contain coordinates")
if ax is None:
_, ax = plt.subplots()
if color is None:
color = cls._umap_reducer

nodes = graph["coordinates"]
edges = graph["edge_index"]

# Plot the edges
triangles = edge_index_to_triangles(graph["edge_index"])
# Ensure triangles are counter-clockwise
for i, tri in enumerate(triangles):
if traingle_signed_area(graph["coords"][tri]) < 0:
triangles[i] = triangles[i][::-1]
ax.triplot(
graph["coords"][:, 0], graph["coords"][:, 1], triangles, color=edge_color
line_segments = nodes[edges.T]
edge_collection = mc.LineCollection(
line_segments, colors=edge_color, linewidths=1
)
ax.add_collection(edge_collection)

# Plot the nodes
ax.scatter(
graph["coords"][:, 0],
graph["coords"][:, 1],
plt.scatter(
*nodes.T,
c=color(graph) if isinstance(color, Callable) else color,
s=node_size(graph) if isinstance(node_size, Callable) else node_size,
zorder=1,
zorder=2,
)

return ax