Repository navigation
feat(masks): add tile_mask for drawing tile outlines - #54
Merged
Merged
Conversation
Ported from the GitLab rationai-masks library so new projects can use ratiopath alone. The docstring example now passes the tile extent as (width, height), matching the drawing code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
Documentation PreviewPreview URL: https://RationAI.github.io/ratiopath/claude-tile-mask/ |
Contributor
Author
Adames4
approved these changes
Oct 13, 2026
matejpekar
approved these changes
Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports
tile_maskfrom the GitLabrationai-maskslibrary intoratiopath.masks. It is part of consolidating our libraries (DEV-161):ratiopathcovers everythingmasksdid except this function, so with it new projects don't needrationai-masksat all.Changes
ratiopath/masks/tile_mask.py: same behaviour as the original. It draws tile outlines into a modeLimage. The docstring example now passes the tile extent as (width, height); the original example passed (height, width), which only worked for square tiles.ratiopath.masks, reference page in the docs and added to the nav.tests/test_tile_mask.py: outline placement, width/height order, empty input.Checks
pytest: 376 passed.mypy: clean.mkdocs build --strict: passes.ruff check/ruff format --check: clean on the changed files. With the current ruff,mainitself already has 11ruff checkfindings (RUF036, BLE001) and 7 filesruff formatwould change. They are untouched here.Not in this PR
rationai-masksis still a dependency of about 12 GitHub repos, includingmlkit(HeatmapAssembler) and themachine-learningtemplate (tissue_mask). Moving those over is a separate step.🤖 Generated with Claude Code