mxcubecore.HardwareObjects.abstract.AbstractVideoDevice#
[Name] GenericVideo
[Description] This module declares class GenericVideo.
This class is not meant to be instanced directly but as the base class for classes providing access to Video in MXCuBE
Functions
|
Classes
|
- class mxcubecore.HardwareObjects.abstract.AbstractVideoDevice.AbstractVideoDevice(name)[source]#
Bases:
HardwareObject
- bayer_rg16_2_rgb(raw_buffer)[source]#
Convert BAYER RG16 to RGB. :param raw_buffer: Image
- Returns:
Converted image.
- Return type:
()
- change_owner()[source]#
LIMA specific, because it has to be root at startup move this to Qt4_LimaVideo
- abstract get_image()[source]#
The implementing class should return here the latest_image in raw_format, followed by the width and height of the image
- get_image_dimensions()[source]#
Get the scaled width and the height of the image: :returns: Width [mm], height [mm] list. :rtype: (list)
- get_image_zoom()#
Get the Scaling factor. :returns: Scaling factor or None if does not exists :rtype: (float)
- get_jpg_image()[source]#
Reads`raw_data` image [1D numpy array of np.uint16] from self.get_image() and convert it to .jpg image. For now this function allows to deal with any RGB encoded video data. Emit imageReceived signal with the jpeg image.
- Returns:
Coverted to jpeg image.
- Return type:
(bytes)
- get_raw_image_size()[source]#
Must return a two-value list necessary to avoid breaking e.g. ViideoMockup
- get_scaling_factor()[source]#
Get the Scaling factor. :returns: Scaling factor or None if does not exists :rtype: (float)
- get_snapshot(bw=None, return_as_array=True)[source]#
Get the snapshot. :param bs: Return grayscale image (True) :type bs: bool :param return_as_array: Return the image as array. Default is True. :type return_as_array: bool
- Returns:
Snapshot image.
- Return type:
()
- set_cam_encoding(cam_encoding)[source]#
Set the image encoding. :param cam_encoding: set the encoding type. :type cam_encoding: str
- set_live(mode)[source]#
Set the live mode. :param mode: Live mode. :type mode: bool
self.set_video_live(mode)
- abstract set_video_live(flag)[source]#
Set the video live mode. :param flag: Live mode. :type flag: bool
- take_snapshot(bw=None, return_as_array=True)[source]#
Take the snapshot. :param bs: Return grayscale image (True) :type bs: bool :param return_as_array: Return the image as array. Default is True. :type return_as_array: bool
- Returns:
Snapshot image.
- Return type:
()
- y16_2_rgb(raw_buffer)[source]#
Convert Y16 to RGB. :param raw_buffer: Image
- Returns:
Converted image.
- Return type:
()