Skip to content

OME, SpatialDataArray/Image versioning mismatch #248

Description

@Artur-man

Some versioning caught my eye while was working on #247. Let me know if these are legit, I can send a small PR to fix, otherwise I won't touch em.

  1. Current RasterFormats versions 0.1, 0.2 and 0.3 for SpatialData uses OME versions 0.4, 0.4-dev-spatialdata, and 0.5-dev-spatialdata, respectively.
    https://github.com/scverse/spatialdata/blob/4e1968129695ec4f3c5ee579ddf79f651ca18faf/src/spatialdata/_io/format.py#L158-L193

    Yet, the current SpatialDataAttrs constructor checks if the version is 0.3, but defaults to 0.4

    spatialdataR/R/sdAttrs.R

    Lines 78 to 85 in 457fb1b

    res <- list(
    omero=list(channels=list(label=letters[seq_len(nch)])),
    multiscales=list(list(
    axes=ax,
    version="0.4",
    coordinateTransformations=ct,
    datasets=list(list(path="0", coordinateTransformations=list(list(type="scale", scale=list(1, 1))))))))
    if (ver == "0.3") res <- list(ome=res)

    It seems if(ver = 0.3) checks the sd raster format, but actually ver used as the ome format. We need to decide which format type ver refers to

  2. .default_ax picks and write axes metadata to attributes, but this does not match with the axes metadata for points and shapes:

spatialdataR/R/sdAttrs.R

Lines 103 to 109 in 457fb1b

frame={
ax <- list(x, y)
if (dim > 2) {
ax <- c(ax, list(z))
if (dim > 3) ax <- c(ax, list(t))
}
},

CC @LucaMarconato @Bisaloo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions