Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/DeepMicroscopy/Exact
Browse files Browse the repository at this point in the history
  • Loading branch information
FraukeWilm committed Aug 27, 2024
2 parents b63fbc4 + 524b176 commit fa5ce5d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions exact/util/slide_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ def read_region(self, location, level, size, frame=0):
raise OpenSlideError("Invalid level")
if ['fail' for s in size if s < 0]:
raise OpenSlideError("Size %s must be non-negative" % (size,))
# for non-pyramidal tiff files we can only read frame 0
if frame >= self.numberOfLayers:
frame = self.numberOfLayers - 1
# Any corner of the requested region may be outside the bounds of
# the image. Create a transparent tile of the correct size and
# paste the valid part of the region into the correct location.
Expand Down

0 comments on commit fa5ce5d

Please sign in to comment.