mxcubeweb.core.adapter.sample_view_adapter#

Classes

SampleViewAdapter(ho, role, app)

Adapter for AbstractSampleView — routes moved into adapter methods.

class mxcubeweb.core.adapter.sample_view_adapter.SampleViewAdapter(ho, role, app)[source]#

Bases: AdapterBase

Adapter for AbstractSampleView — routes moved into adapter methods.

sample_image_meta_data() dict[source]#

Get information about current sample image.

Returns a dictionary with the format:

data = {“pixelsPerMm”: pixelsPerMm,

“imageWidth”: width, “imageHeight”: height, “format”: fmt, “sourceIsScalable”: source_is_scalable, “scale”: scale, “videoSizes”: video_sizes, “position”: position, “shape”: shape, “size_x”: sx, “size_y”: sy}

Returns:

Dictionary with view port data, with format described above

Return type:

dict

snapshot(overlay: Base64StrModel)[source]#

Take snapshot of the sample view.

data = {“overlay”: overlay_data} overlay is the image data to overlay on sample image, it should normally contain the data of shapes drawn on canvas. Return: Overlayed image uri, if successful, statuscode 500 otherwise.

Parameters:

overlay (Base64StrModel) –

start_auto_centring()[source]#

Start automatic centring procedure.

start_click_centring() dict[source]#

Start click centring procedure.

Returns:

clicksLeft

Return type:

dict