mxcubeweb.core.adapter.sample_view_adapter#
Classes
|
Adapter for AbstractSampleView — routes moved into adapter methods. |
- class mxcubeweb.core.adapter.sample_view_adapter.SampleViewAdapter(ho, role, app)[source]#
Bases:
AdapterBaseAdapter 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:
- 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) –