Skip to content

Commit

Permalink
Rename ZarrTIFFWSIReader to FsspecJsonWSIReader.
Browse files Browse the repository at this point in the history
  • Loading branch information
aacic committed Jan 31, 2025
1 parent e750f2a commit 0209100
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tiatoolbox/wsicore/wsireader.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ def open( # noqa: PLR0911
WSIReader.verify_supported_wsi(input_path)

if is_zarr_tiff_fsspec(input_path):
return FsspecJsonReader(input_path, mpp=mpp, power=power)
return FsspecJsonWSIReader(input_path, mpp=mpp, power=power)

# Handle special cases first (DICOM, Zarr/NGFF, OME-TIFF)
if is_dicom(input_path):
Expand Down Expand Up @@ -4246,11 +4246,11 @@ class docstrings for more information.
return im_region


class FsspecJsonReader(WSIReader):
class FsspecJsonWSIReader(WSIReader):
"""Define FsspecJsonReader."""

def __init__(
self: FsspecJsonReader,
self: FsspecJsonWSIReader,
input_img: str | Path | np.ndarray,
mpp: tuple[Number, Number] | None = None,
power: Number | None = None,
Expand Down Expand Up @@ -4300,7 +4300,7 @@ def __init__(
)
)

def _canonical_shape(self: FsspecJsonReader, shape: IntPair) -> tuple:
def _canonical_shape(self: FsspecJsonWSIReader, shape: IntPair) -> tuple:
# Copy/paste from TIFFWSIReader, clean it up
"""Make a level shape tuple in YXS order.
Expand All @@ -4320,7 +4320,7 @@ def _canonical_shape(self: FsspecJsonReader, shape: IntPair) -> tuple:
msg = f"Unsupported axes `{self._axes}`."
raise ValueError(msg)

def _info(self: FsspecJsonReader) -> WSIMeta:
def _info(self: FsspecJsonWSIReader) -> WSIMeta:
"""TIFF metadata constructor.
Returns:
Expand Down Expand Up @@ -4357,7 +4357,7 @@ def _info(self: FsspecJsonReader) -> WSIMeta:
)

def read_rect(
self: FsspecJsonReader,
self: FsspecJsonWSIReader,
location: IntPair,
size: IntPair,
resolution: Resolution = 0,
Expand Down Expand Up @@ -4595,7 +4595,7 @@ def read_rect(
return utils.transforms.background_composite(image=im_region, alpha=False)

def read_bounds(
self: FsspecJsonReader,
self: FsspecJsonWSIReader,
bounds: IntBounds,
resolution: Resolution = 0,
units: Units = "level",
Expand Down

0 comments on commit 0209100

Please sign in to comment.