Skip to content

Commit

Permalink
simplify further
Browse files Browse the repository at this point in the history
  • Loading branch information
leoschwarz committed Oct 23, 2024
1 parent 84fa2a6 commit 0e553b1
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/depiction/persistence/format_ome_tiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

# TODO figure out the ideal extension i.e. tif vs tiff!
from pathlib import Path
from typing import Any

import xarray
from bioio import BioImage
Expand Down Expand Up @@ -44,24 +43,3 @@ def read(cls, path: Path) -> xarray.DataArray:
size_x=image.physical_pixel_sizes.X, size_y=image.physical_pixel_sizes.Y, unit="micrometer"
)
return data

@staticmethod
def _get_image_resolution_metadata(pixel_size: PixelSize) -> dict[str, Any]:
assert pixel_size.unit == "micrometer"
return {
"PhysicalSizeX": int(pixel_size.size_x),
"PhysicalSizeY": int(pixel_size.size_y),
}

@staticmethod
def _get_channel_metadata(channel_names: list[str]) -> dict[str, Any]:
return {
"Channels": {
f"{index}": {
"Name": str(name),
# TODO additional metadata e.g.
# "SamplesPerPixel": 1,
}
for index, name in enumerate(channel_names)
},
}

0 comments on commit 0e553b1

Please sign in to comment.