Save ExtImage
to disk for alabaster
saveObject-ExtImage-method.Rd
Save ExtImage
to disk for alabaster
See also
Other saveObject-SFE-image:
saveObject,BioFormatsImage-method
,
saveObject,SpatRaster-method
Examples
library(SFEData)
fp <- tempfile()
fsave <- file.path(fp, "exi")
x1 <- XeniumOutput(dataset = "v1", file_path = file.path(fp, "xenium1"))
#> see ?SFEData and browseVignettes('SFEData') for documentation
#> loading from cache
#> The downloaded files are in /tmp/RtmpfBErth/file2aa83aa6419a/xenium1/xenium_lr
sfe <- readXenium(x1)
#> >>> Cell segmentations are found in `.csv` file(s)
#> >>> Reading cell and nucleus segmentations
#> >>> Making POLYGON geometries
#> >>> Checking polygon validity
#> >>> Saving geometries to parquet files
#> >>> Reading cell metadata -> `cells.csv`
#> >>> Reading h5 gene count matrix
#> >>> filtering cellSeg geometries to match 16324 cells with counts > 0
#> >>> filtering nucSeg geometries to match 16324 cells with counts > 0
bfi <- getImg(sfe)
exi <- toExtImage(bfi)
#> Resolution subscript out of bound, reading the lowest resolution
saveObject(exi, fsave)
exi2 <- readObject(fsave)
unlink(fsave, recursive = TRUE)