Skip to content

Commit fa3c48f

Browse files
authored
Add ExternalImageSeries, update ImageSeries
1 parent ea6e803 commit fa3c48f

1 file changed

Lines changed: 94 additions & 9 deletions

File tree

core/nwb.image.yaml

Lines changed: 94 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ datasets:
3939
groups:
4040
- neurodata_type_def: ImageSeries
4141
neurodata_type_inc: TimeSeries
42-
doc: General image data. The image data may be stored in the file in a raw format or in a single external image file
43-
or series of external image files in the host filesystem.
42+
doc: Image data stored in a raw format.
4443
datasets:
4544
- name: data
4645
dtype: numeric
@@ -60,8 +59,7 @@ groups:
6059
- null
6160
- null
6261
- null
63-
doc: Data representing images across frames. The dimensions are [frame][x][y] or [frame][x][y][z]. If data is
64-
stored in an external_file, set this dataset to an empty 3-dimensional array.
62+
doc: Data representing images across frames. The dimensions are [frame][x][y] or [frame][x][y][z].
6563
- name: dimension
6664
dtype: int32
6765
dims:
@@ -76,10 +74,12 @@ groups:
7674
- num_files
7775
shape:
7876
- null
79-
doc: Paths to one or more external file(s). The field is only present if format='external'.
77+
doc: Use of this dataset is discouraged and will be deprecated. Please use
78+
ExternalImageSeries instead. Paths to one or more external file(s).
79+
The field is only present if format='external'.
8080
This is only relevant if the image series is stored in the file system as one
8181
or more image file(s). This field should NOT be used if the image is stored
82-
in another NWB file and that file is linked to this file.
82+
in another NWB file and that file is linked to this file.
8383
quantity: '?'
8484
attributes:
8585
- name: starting_frame
@@ -102,16 +102,101 @@ groups:
102102
- name: format
103103
dtype: text
104104
default_value: raw
105-
doc: Format of image. If this is 'external', then the attribute 'external_file'
106-
contains the path information to the image files. If this is 'raw', then the raw
107-
(single-channel) binary data is stored in the 'data' dataset. If this attribute
105+
doc: Format of image. If this is 'raw', then the raw (single-channel) binary data is
106+
stored in the 'data' dataset. If this is 'external', then the attribute 'external_file'
107+
contains the path information to the image files. Use of external files is discouraged
108+
and will be deprecated. Please use ExternalImageSeries instead. If this attribute
108109
is not present, then the default format='raw' case is assumed.
109110
quantity: '?'
110111
links:
111112
- name: device
112113
target_type: Device
113114
doc: Link to the Device object that was used to capture these images.
114115
quantity: '?'
116+
117+
- neurodata_type_def: ExternalImageSeries
118+
neurodata_type_inc: NWBDataInterface
119+
doc: General image data stored in external files on the filesystem. Note that this type
120+
does not extend TimeSeries because there is no 'data' dataset. However, there is still
121+
a time dimension which can be stored as timestamps or a starting time and sampling rate.
122+
datasets:
123+
- name: dimension
124+
dtype: int32
125+
dims:
126+
- rank
127+
shape:
128+
- null
129+
doc: Number of pixels on x, y, (and z) axes.
130+
quantity: '?'
131+
- name: external_file
132+
dtype: text
133+
dims:
134+
- num_files
135+
shape:
136+
- null
137+
doc: Paths to one or more external image file(s).
138+
quantity: '?'
139+
attributes:
140+
- name: starting_frame
141+
dtype: int32
142+
dims:
143+
- num_files
144+
shape:
145+
- null
146+
doc: "Each external image may contain one or more consecutive frames of the full
147+
ExternalImageSeries (e.g., if an external image is a tiff stack). This attribute
148+
serves as an index to indicate which frames each file
149+
contains, to faciliate random access. The 'starting_frame' attribute, hence,
150+
contains a list of numbers corresponding to the index of the image series at which
151+
each external file begins. Zero-based indexing is used; hence, the first element will
152+
always be zero. For example, if the 'external_file' dataset has three paths to files
153+
and the first file has 5 frames, the second file has 10 frames, and the third file has
154+
20 frames, then this attribute will have values [0, 5, 15]. In other words,
155+
starting_frame[0] = 0;
156+
for i in range(1, length(external_file)),
157+
starting_frame[i] = starting_frame[i-1] + num_frames(external_file[i])
158+
If there is a single external file that holds all of the frames of the
159+
ExternalImageSeries (and so there is a single element in the 'external_file'
160+
dataset), then this attribute should have value [0]. If there are N
161+
external files with a single frame each, then this attribute should have values
162+
[0, 1, ..., N-1]."
163+
- name: starting_time
164+
dtype: float64
165+
doc: Timestamp of the first sample in seconds. When timestamps are uniformly
166+
spaced, the timestamp of the first sample can be specified and all subsequent
167+
ones calculated from the sampling rate attribute.
168+
quantity: '?'
169+
attributes:
170+
- name: rate
171+
dtype: float32
172+
doc: Sampling rate, in Hz.
173+
- name: unit
174+
dtype: text
175+
value: seconds
176+
doc: Unit of measurement for time, which is fixed to 'seconds'.
177+
- name: timestamps
178+
dtype: float64
179+
dims:
180+
- num_times
181+
shape:
182+
- null
183+
doc: Timestamps for samples stored in data, in seconds, relative to the
184+
common experiment master-clock stored in NWBFile.timestamps_reference_time.
185+
quantity: '?'
186+
attributes:
187+
- name: interval
188+
dtype: int32
189+
value: 1
190+
doc: Value is '1'
191+
- name: unit
192+
dtype: text
193+
value: seconds
194+
doc: Unit of measurement for timestamps, which is fixed to 'seconds'.
195+
links:
196+
- name: device
197+
target_type: Device
198+
doc: Link to the Device object that was used to capture these images.
199+
quantity: '?'
115200

116201
- neurodata_type_def: ImageMaskSeries
117202
neurodata_type_inc: ImageSeries

0 commit comments

Comments
 (0)