mxcubecore.HardwareObjects.TangoLimaVideoDevice#

[Name] TangoLimaVideoDevice

[Note] This class was previously called QtTangoLimaVideo. It was changed to TangoLimaVideoDevice as it can be used now in Qt4(Qt5) environment or without it. The property <useqt>False</useqt> in the xml configuration file will inhibit the use of qt.

The Hardware Object will poll for images at regular interval (set by property <interval>value-in-msecs</interval> For every image received a signal “imageReceived” is emitted. The content of the information emitted varies: - When qt is used:

a “qimage” is delivered as parameter with the signal

  • When qt is not used (for web applications):
    three values are sent with the signal

    val1: string with jpeg encoding of the image val2: width (pixels) of the image val3: height (pixels) of the image

    (web, non-qt encoding, has been validated for Prosilica cameras

    but in principle other cameras could also adopt the same mechanism)

[Description] HwObj used to grab images via Tango Lima device server If you want to access the Lima Library directly you may consider using the LimaVideoDevice module instead

[Configuration] Example Hardware Object XML file : ================================== <object class=”QtLimaVideo”>

<type>basler</type> <encoding>yuv422p</encoding> <tangoname>bl13/eh/lima_oav</tangoname> <gain>0.5</gain> <exposure>0.01</exposure> <mirror>(False, False)</mirror> <interval>30</interval>

</object>

Functions

test_hwo(hwo)

Classes

TangoLimaVideoDevice(name)

Descript.

class mxcubecore.HardwareObjects.TangoLimaVideoDevice.TangoLimaVideoDevice(name)[source]#

Bases: AbstractVideoDevice

Descript. :

get_exposure_time()[source]#

Get the camera exposure time [s]

get_gain()[source]#

Get the camera gain

get_image()[source]#

Reads image from video_last_image attribute of lima device proxy, which is type of bytes and converts it into np.array of int.

Returns
raw_buffer1d np.array of np.uint16

Image

widthint

Image width

heightint

Image height

get_image_dimensions()[source]#

Get the scaled width and the height of the image: :returns: Width [mm], height [mm] list. :rtype: (list)

get_video_live()[source]#

Get the video live mode. :returns: Live mode. :rtype: flag(bool)

init()[source]#

Descript. :

set_cam_encoding(cam_encoding)[source]#

Set the image encoding. :param cam_encoding: set the encoding type. :type cam_encoding: str

set_exposure_time(exposure_time_value)[source]#

Set the camera exposure time [s]

set_gain(gain_value)[source]#

Set the camera gain

set_video_live(flag)[source]#

Set the video live mode. :param flag: Live mode. :type flag: bool