nwb-linkml/nwb_linkml/schema/core.nwb.image.yaml
sneakers-the-rat 4faaa8efe8 I believe that's a full translation
or at least all the semantics are present. it's not pretty by any stretch of the imagination
2023-08-25 00:22:47 -07:00

353 lines
12 KiB
YAML

name: core.nwb.image
id: core.nwb.image
imports:
- core.nwb.base
- nwb.language
default_prefix: core.nwb.image/
classes:
GrayscaleImage:
name: GrayscaleImage
description: A grayscale image.
is_a: Image
attributes:
array:
name: array
range: GrayscaleImage_Array
GrayscaleImage_Array:
name: GrayscaleImage_Array
is_a: Arraylike
attributes:
x:
name: x
range: numeric
required: false
y:
name: y
range: numeric
required: false
RGBImage:
name: RGBImage
description: A color image.
is_a: Image
attributes:
array:
name: array
range: RGBImage_Array
RGBImage_Array:
name: RGBImage_Array
is_a: Arraylike
attributes:
x:
name: x
range: numeric
required: false
y:
name: y
range: numeric
required: false
r, g, b:
name: r, g, b
range: numeric
required: false
minimum_cardinality: 3
maximum_cardinality: 3
RGBAImage:
name: RGBAImage
description: A color image with transparency.
is_a: Image
attributes:
array:
name: array
range: RGBAImage_Array
RGBAImage_Array:
name: RGBAImage_Array
is_a: Arraylike
attributes:
x:
name: x
range: numeric
required: false
y:
name: y
range: numeric
required: false
r, g, b, a:
name: r, g, b, a
range: numeric
required: false
minimum_cardinality: 4
maximum_cardinality: 4
ImageSeries:
name: ImageSeries
description: General image data that is common between acquisition and stimulus
time series. Sometimes the image data is stored in the file in a raw format
while other times it will be stored as a series of external image files in the
host file system. The data field will either be binary data, if the data is
stored in the NWB file, or empty, if the data is stored in an external image
stack. [frame][x][y] or [frame][x][y][z].
is_a: TimeSeries
attributes:
data:
name: data
description: Binary data representing images across frames. If data are stored
in an external file, this should be an empty 3D array.
multivalued: false
range: ImageSeries_data
required: true
dimension:
name: dimension
description: Number of pixels on x, y, (and z) axes.
multivalued: false
range: ImageSeries_dimension
required: false
external_file:
name: external_file
description: Paths to one or more external file(s). The field is only present
if format='external'. This is only relevant if the image series is stored
in the file system as one or more image file(s). This field should NOT be
used if the image is stored in another NWB file and that file is linked
to this file.
multivalued: false
range: ImageSeries_external_file
required: false
format:
name: format
description: Format of image. If this is 'external', then the attribute 'external_file'
contains the path information to the image files. If this is 'raw', then
the raw (single-channel) binary data is stored in the 'data' dataset. If
this attribute is not present, then the default format='raw' case is assumed.
multivalued: false
range: ImageSeries_format
required: false
ImageSeries_data:
name: ImageSeries_data
description: Binary data representing images across frames. If data are stored
in an external file, this should be an empty 3D array.
attributes:
array:
name: array
range: ImageSeries_data_Array
ImageSeries_data_Array:
name: ImageSeries_data_Array
is_a: Arraylike
attributes:
frame:
name: frame
range: numeric
required: true
x:
name: x
range: numeric
required: true
y:
name: y
range: numeric
required: true
z:
name: z
range: numeric
required: false
ImageSeries_dimension:
name: ImageSeries_dimension
description: Number of pixels on x, y, (and z) axes.
attributes:
array:
name: array
range: ImageSeries_dimension_Array
ImageSeries_dimension_Array:
name: ImageSeries_dimension_Array
is_a: Arraylike
attributes:
rank:
name: rank
range: int32
required: true
ImageSeries_external_file:
name: ImageSeries_external_file
description: Paths to one or more external file(s). The field is only present
if format='external'. This is only relevant if the image series is stored in
the file system as one or more image file(s). This field should NOT be used
if the image is stored in another NWB file and that file is linked to this file.
attributes:
starting_frame:
name: starting_frame
description: Each external image may contain one or more consecutive frames
of the full ImageSeries. This attribute serves as an index to indicate which
frames each file contains, to facilitate random access. The 'starting_frame'
attribute, hence, contains a list of frame numbers within the full ImageSeries
of the first frame of each file listed in the parent 'external_file' dataset.
Zero-based indexing is used (hence, the first element will always be zero).
For example, if the 'external_file' dataset has three paths to files and
the first file has 5 frames, the second file has 10 frames, and the third
file has 20 frames, then this attribute will have values [0, 5, 15]. If
there is a single external file that holds all of the frames of the ImageSeries
(and so there is a single element in the 'external_file' dataset), then
this attribute should have value [0].
range: int32
array:
name: array
range: ImageSeries_external_file_Array
ImageSeries_external_file_Array:
name: ImageSeries_external_file_Array
is_a: Arraylike
attributes:
num_files:
name: num_files
range: text
required: true
ImageSeries_format:
name: ImageSeries_format
description: Format of image. If this is 'external', then the attribute 'external_file'
contains the path information to the image files. If this is 'raw', then the
raw (single-channel) binary data is stored in the 'data' dataset. If this attribute
is not present, then the default format='raw' case is assumed.
ImageMaskSeries:
name: ImageMaskSeries
description: An alpha mask that is applied to a presented visual stimulus. The
'data' array contains an array of mask values that are applied to the displayed
image. Mask values are stored as RGBA. Mask can vary with time. The timestamps
array indicates the starting time of a mask, and that mask pattern continues
until it's explicitly changed.
is_a: ImageSeries
OpticalSeries:
name: OpticalSeries
description: Image data that is presented or recorded. A stimulus template movie
will be stored only as an image. When the image is presented as stimulus, additional
data is required, such as field of view (e.g., how much of the visual field
the image covers, or how what is the area of the target being imaged). If the
OpticalSeries represents acquired imaging data, orientation is also important.
is_a: ImageSeries
attributes:
distance:
name: distance
description: Distance from camera/monitor to target/eye.
multivalued: false
range: OpticalSeries_distance
required: false
field_of_view:
name: field_of_view
description: Width, height and depth of image, or imaged area, in meters.
multivalued: false
range: OpticalSeries_field_of_view
required: false
data:
name: data
description: Images presented to subject, either grayscale or RGB
multivalued: false
range: OpticalSeries_data
required: true
orientation:
name: orientation
description: Description of image relative to some reference frame (e.g.,
which way is up). Must also specify frame of reference.
multivalued: false
range: OpticalSeries_orientation
required: false
OpticalSeries_distance:
name: OpticalSeries_distance
description: Distance from camera/monitor to target/eye.
OpticalSeries_field_of_view:
name: OpticalSeries_field_of_view
description: Width, height and depth of image, or imaged area, in meters.
attributes:
array:
name: array
range: OpticalSeries_field_of_view_Array
OpticalSeries_field_of_view_Array:
name: OpticalSeries_field_of_view_Array
is_a: Arraylike
attributes:
width, height:
name: width, height
range: float32
required: false
minimum_cardinality: 2
maximum_cardinality: 2
width, height, depth:
name: width, height, depth
range: float32
required: false
minimum_cardinality: 3
maximum_cardinality: 3
OpticalSeries_data:
name: OpticalSeries_data
description: Images presented to subject, either grayscale or RGB
attributes:
array:
name: array
range: OpticalSeries_data_Array
OpticalSeries_data_Array:
name: OpticalSeries_data_Array
is_a: Arraylike
attributes:
frame:
name: frame
range: numeric
required: true
x:
name: x
range: numeric
required: true
y:
name: y
range: numeric
required: true
r, g, b:
name: r, g, b
range: numeric
required: false
minimum_cardinality: 3
maximum_cardinality: 3
OpticalSeries_orientation:
name: OpticalSeries_orientation
description: Description of image relative to some reference frame (e.g., which
way is up). Must also specify frame of reference.
IndexSeries:
name: IndexSeries
description: Stores indices to image frames stored in an ImageSeries. The purpose
of the IndexSeries is to allow a static image stack to be stored in an Images
object, and the images in the stack to be referenced out-of-order. This can
be for the display of individual images, or of movie segments (as a movie is
simply a series of images). The data field stores the index of the frame in
the referenced Images object, and the timestamps array indicates when that image
was displayed.
is_a: TimeSeries
attributes:
data:
name: data
description: Index of the image (using zero-indexing) in the linked Images
object.
multivalued: false
range: IndexSeries_data
required: true
IndexSeries_data:
name: IndexSeries_data
description: Index of the image (using zero-indexing) in the linked Images object.
attributes:
conversion:
name: conversion
description: This field is unused by IndexSeries.
range: float32
resolution:
name: resolution
description: This field is unused by IndexSeries.
range: float32
offset:
name: offset
description: This field is unused by IndexSeries.
range: float32
unit:
name: unit
description: This field is unused by IndexSeries and has the value N/A.
range: text
array:
name: array
range: IndexSeries_data_Array
IndexSeries_data_Array:
name: IndexSeries_data_Array
is_a: Arraylike
attributes:
num_times:
name: num_times
range: uint32
required: true