Skip to content

Commit

Permalink
Merge pull request #1513 from girder/faster-multi-compositing
Browse files Browse the repository at this point in the history
Speed up multi source compositing in tiled cases
  • Loading branch information
manthey authored Apr 24, 2024
2 parents 00fb44e + 7722721 commit 591c842
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
### Improvements
- Improve uint16 image scaling ([#1511](../../pull/1511))
- Read some untiled tiffs using the tiff source ([#1512](../../pull/1512))
- Speed up multi source compositing in tiled cases ([#1513](../../pull/1513))

## 1.28.1

Expand Down
2 changes: 1 addition & 1 deletion sources/multi/large_image_source_multi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1098,12 +1098,12 @@ def _addSourceToTile(self, tile, sourceEntry, corners, scale):
:returns: a numpy array of the tile.
"""
source = self._sources[sourceEntry['sourcenum']]
ts = self._openSource(source, sourceEntry['kwargs'])
# If tile is outside of bounding box, skip it
bbox = source['bbox']
if (corners[2][0] <= bbox['left'] or corners[0][0] >= bbox['right'] or
corners[2][1] <= bbox['top'] or corners[0][1] >= bbox['bottom']):
return tile
ts = self._openSource(source, sourceEntry['kwargs'])
transform = bbox.get('transform')
x = y = 0
# If there is no transform or the diagonals are positive and there is
Expand Down

0 comments on commit 591c842

Please sign in to comment.