Skip to content

Commit

Permalink
Add ExternalImage (#604)
Browse files Browse the repository at this point in the history
Co-authored-by: Ryan Ly <[email protected]>
  • Loading branch information
h-mayorquin and rly authored Feb 20, 2025
1 parent f9fb35f commit 5cfe01d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 10 deletions.
34 changes: 24 additions & 10 deletions core/nwb.base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,17 @@ datasets:
VectorData column stores the start_index and count to indicate the range in time
to be selected as well as an object reference to the TimeSeries.

- neurodata_type_def: Image
- neurodata_type_def: BaseImage
neurodata_type_inc: NWBData
doc: An abstract base type for image data. Parent type for Image and ExternalImage types.
attributes:
- name: description
dtype: text
doc: Description of the image.
required: false

- neurodata_type_def: Image
neurodata_type_inc: BaseImage
dtype: numeric
dims:
- - x
Expand All @@ -44,29 +53,34 @@ datasets:
- - null
- null
- 4
doc: An abstract data type for an image. Shape can be 2-D (x, y), or 3-D where the
doc: A type for storing image data directly. Shape can be 2-D (x, y), or 3-D where the
third dimension can have three or four elements, e.g. (x, y, (r, g, b)) or
(x, y, (r, g, b, a)).
attributes:
- name: resolution
dtype: float32
doc: Pixel resolution of the image, in pixels per centimeter.
required: false
- name: description

- neurodata_type_def: ExternalImage
neurodata_type_inc: BaseImage
doc: A type for referencing an external image file.
attributes:
- name: file_path
dtype: text
doc: Description of the image.
required: false
doc: Path or URL to the external image file.
required: true

- neurodata_type_def: ImageReferences
neurodata_type_inc: NWBData
dtype:
target_type: Image
target_type: BaseImage
reftype: object
dims:
- num_images
shape:
- null
doc: Ordered dataset of references to Image objects.
doc: Ordered dataset of references to BaseImage (e.g., Image or ExternalImage) objects.

groups:
- neurodata_type_def: NWBContainer
Expand Down Expand Up @@ -253,12 +267,12 @@ groups:
dtype: text
doc: Description of this collection of images.
datasets:
- neurodata_type_inc: Image
- neurodata_type_inc: BaseImage
doc: Images stored in this collection.
quantity: '+'
- name: order_of_images
neurodata_type_inc: ImageReferences
doc: Ordered dataset of references to Image objects stored in the parent group.
Each Image object in the Images group should be stored once and only once, so
doc: Ordered dataset of references to BaseImage objects stored in the parent group.
Each object in the Images group should be stored once and only once, so
the dataset should have the same length as the number of images.
quantity: '?'
4 changes: 4 additions & 0 deletions docs/format/source/format_release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Release Notes
2.9.0 (Upcoming)
----------------

Major changes
^^^^^^^^^^^^^
- Added `BaseImage` and `ExternalImage` as new neurodata types. The first so both `Image` and `ExternalImage` can inherit from it. The second to store external images (#604)

Minor changes
^^^^^^^^^^^^^
- Fixed typo and removed HTML tag from doc of behavioral neurodata types. (#600)
Expand Down

0 comments on commit 5cfe01d

Please sign in to comment.