Skip to content

Commit aa69c91

Browse files
authored
Save polygons under correct key in vizgen loader (#62)
1 parent 0c35995 commit aa69c91

File tree

1 file changed

+2
-2
lines changed
  • src/datasets/loaders/vizgen_merscope

1 file changed

+2
-2
lines changed

src/datasets/loaders/vizgen_merscope/script.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def read_boundary_hdf5(folder):
115115
elements_renaming_map = {
116116
f"{name}_z3" : "morphology_mip", #TODO: that is actually not the morphology_mip, i.e. either we should rename the label later, or we should actually project over z. But we also want to have 3d at some point anyway
117117
f"{name}_transcripts" : "transcripts",
118-
f"{name}_polygons" : "cell_polygons",
118+
f"{name}_polygons" : "cell_boundaries",
119119
f"table" : "metadata",
120120
}
121121

@@ -144,7 +144,7 @@ def read_boundary_hdf5(folder):
144144
# TODO: Just note that currently the rasterize function has a bug, this error is small though with the given spatial resolution.
145145
# Check https://github.com/scverse/spatialdata/issues/165 for updates on this bug.
146146
sdata["cell_labels"] = sd.rasterize(
147-
sdata["cell_polygons"],
147+
sdata["cell_boundaries"],
148148
["x", "y"],
149149
min_coordinate=[int(img_extent["x"][0]), int(img_extent["y"][0])],
150150
max_coordinate=[int(img_extent["x"][1]), int(img_extent["y"][1])],

0 commit comments

Comments
 (0)