Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/spatialdata_io/converters/legacy_anndata.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,10 @@ def from_legacy_anndata(adata: AnnData) -> SpatialData:
"tissue_hires_scalef is required when an the hires image is present"
)
hires_image = Image2DModel.parse(
hires, dims=("y", "x", "c"), transformations={f"{dataset_id}_downscaled_hires": Identity()}
hires,
dims=("y", "x", "c"),
transformations={f"{dataset_id}_downscaled_hires": Identity()},
rgb=None,
)
images[f"{dataset_id}_hires_image"] = hires_image

Expand All @@ -306,7 +309,10 @@ def from_legacy_anndata(adata: AnnData) -> SpatialData:
"tissue_lowres_scalef is required when an the lowres image is present"
)
lowres_image = Image2DModel.parse(
lowres, dims=("y", "x", "c"), transformations={f"{dataset_id}_downscaled_lowres": Identity()}
lowres,
dims=("y", "x", "c"),
transformations={f"{dataset_id}_downscaled_lowres": Identity()},
rgb=None,
)
images[f"{dataset_id}_lowres_image"] = lowres_image

Expand Down
Loading