Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CLI for conversions from and to standard types (.png, .tiff, .geojson, ...) #231

Open
2 tasks
LucaMarconato opened this issue Nov 1, 2024 · 2 comments
Open
2 tasks

Comments

@LucaMarconato
Copy link
Member

If we have a single image, say a .tiff file, it would be convenient to be able to:

  • convert it to a SpatialData Zarr stored object with a single image
  • add the image to an existing SpatialData object
    All using the CLI.
@LucaMarconato
Copy link
Member Author

LucaMarconato commented Nov 1, 2024

Note, we have a already a parser for .geojson data into a shapes object in ShapesModel.parse(). It could be a good starting point to move that into a CLI function.

Instead, for say .png -> .zarr conversion, the pseudocode would look something like this:

  1. use skimage.imread to read the image lazily
  2. use Image2DModel.parse to parse the image
  3. construct a SpatialData object and write it to disk.

@LucaMarconato
Copy link
Member Author

LucaMarconato commented Nov 1, 2024

In particular a very convenient use case would be to quick extract an image in, say, .png, from a Zarr store.

@quentinblampey quentinblampey moved this to 🏗️ In Progress in Basel Hackathon Nov 2024 Nov 13, 2024
@quentinblampey quentinblampey moved this from 🏗️ In Progress to 👀 In review in Basel Hackathon Nov 2024 Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 👀 In review
Development

No branches or pull requests

1 participant