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

Support storage of external images #529

Open
rly opened this issue Sep 28, 2022 · 0 comments
Open

Support storage of external images #529

rly opened this issue Sep 28, 2022 · 0 comments
Labels
category: extension proposed extensions priority: medium non-critical problem and/or affecting only a small set of NWB users

Comments

@rly
Copy link
Contributor

rly commented Sep 28, 2022

In rly/ndx-pose#9, we would like to support the storage of single images both internally and externally. Only the ImageSeries type supports external image storage, but this is intended for images over time, not single time-less order-less images.

We could follow the same model as ImageSeries which takes both internal and external data, BUT when ImageSeries stores data externally and not using data, it breaks a rule of inheritance and creates problems. So I propose we take a different approach:

  1. Create a new BaseImage (or AbstractImage) type that extends NWBData. It has a description and maybe a resolution, and is not meant to be instantiated.
  2. Clarify that the Image type is meant for storing internal images and make it inherit from BaseImage instead of NWBData.
  3. Create a new ExternalImage type that has a path to an external image file and cached dimensions.
  4. Adapt the Images and ImageReferences types to work on BaseImage instead of Image.

This would also be useful if users want to store their visual stimulus presentations outside of the NWB file as PNGs or other formats. Note that this will expand the number of different data types allowed to be associated with an NWB file. We would want to add a best practice naming convention like we did for external ImageSeries data.

@bendichter @oruebel what do you think?

@stephprince stephprince added priority: medium non-critical problem and/or affecting only a small set of NWB users category: extension proposed extensions labels May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: extension proposed extensions priority: medium non-critical problem and/or affecting only a small set of NWB users
Projects
None yet
Development

No branches or pull requests

2 participants