Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
leoschwarz committed Oct 25, 2024
1 parent a8537b7 commit ec339ff
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/depiction/persistence/format_ome_tiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,4 @@ def read(cls, path: Path) -> xarray.DataArray:
@classmethod
def read_image(cls, path: Path, bg_value: float = 0.0) -> MultiChannelImage:
"""Reads an OME-TIFF file from the specified path and returns the image as a MultiChannelImage."""
data = OmeTiff.read(path)
return MultiChannelImage(
data=data, is_foreground=MultiChannelImage._compute_is_foreground(data=data, bg_value=bg_value)
)
return MultiChannelImage.from_spatial(data=OmeTiff.read(path), bg_value=bg_value)

0 comments on commit ec339ff

Please sign in to comment.