Data Channels
API for a channel controller as well as the channel types that the user can create. E.g. an event channel, a position based channel, etc.
- class glitter2.channel.ChannelBase(data_channel, channel_controller, **kwargs)
Bases:
kivy._event.EventDispatcher
Base class for all the channels.
- class glitter2.channel.ChannelController(app, **kwargs)
Bases:
kivy._event.EventDispatcher
Manages all the channels shown to the user.
- create_channel(channel_type, data_channel, config=None, **kwargs)
Creates the requested channel as well as the widget for it.
If the channel is created from the GUI, config is not passed in, but shape must be passed a kwarg for a zone channel. Otherwise, the shape is created from the config.
- Parameters
channel_type –
data_channel –
config –
kwargs –
- Returns
- reset_new_file(timestamps)
Seeds timestamps before any channels are created from file.
- Parameters
timestamps –
- Returns
- class glitter2.channel.EventChannel(data_channel, channel_controller, **kwargs)
Bases:
glitter2.channel.TemporalChannel
Channel that can be set to either True or False for each time step.
- class glitter2.channel.PosChannel(**kwargs)
Bases:
glitter2.channel.TemporalChannel
Channel that has an (x, y) position for each time step.
- class glitter2.channel.Ruler(**kwargs)
Bases:
kivy._event.EventDispatcher
- canvas = None
The last canvas where the ruler was displayed on.
- pixels_per_meter
The pixels per meter for the video file.
This can be zero when it’s not set. This is set externally when e.g. a file is opened and the UI updates from it. From the UI, it can only be set with
update_pixels_per_meter()
.When this changes, the UI is notified of a change (at the app level) and value is saved when data is saved.
- point_distance_mm
Can be zero.
- class glitter2.channel.TemporalChannel(data_channel, channel_controller, **kwargs)
Bases:
glitter2.channel.ChannelBase
Channels the have a time component.
- class glitter2.channel.ZoneChannel(**kwargs)
Bases:
glitter2.channel.ChannelBase
Channel that describes a zone, or area in the image.
If the channel is created from config, we create the shape, otherwise, the channel and shape was created by painter, so we just get shape as a parameter.