Loading openflexure_microscope/api/v2/views/actions/camera.py +8 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,11 @@ class CaptureAPI(Resource): class GPUPreviewStartAPI(Resource): """ Start the onboard GPU preview. Optional "window" parameter can be passed to control the position and size of the preview window, in the format ``[x, y, width, height]``. """ def post(self): microscope = find_device("openflexure_microscope") payload = JsonResponse(request) Loading @@ -76,6 +81,9 @@ class GPUPreviewStartAPI(Resource): class GPUPreviewStopAPI(Resource): """ Start the onboard GPU preview. """ def post(self): microscope = find_device("openflexure_microscope") microscope.camera.stop_preview() Loading openflexure_microscope/api/v2/views/actions/stage.py +4 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,10 @@ import logging class MoveStageAPI(Resource): """ Handle stage movements. """ def post(self): microscope = find_device("openflexure_microscope") # Create response object Loading openflexure_microscope/api/v2/views/captures.py +15 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,9 @@ from openflexure_microscope.common.flask_labthings.find import find_device class CaptureList(Resource): """ List all image captures """ def get(self): microscope = find_device("openflexure_microscope") image_list = microscope.camera.images Loading @@ -19,6 +22,9 @@ class CaptureList(Resource): class CaptureResource(Resource): """ Description of a single image capture """ def get(self, id): microscope = find_device("openflexure_microscope") capture_obj = microscope.camera.image_from_id(id) Loading @@ -41,6 +47,9 @@ class CaptureResource(Resource): class CaptureDownload(Resource): """ Image data for a single image capture """ def get(self, id, filename): microscope = find_device("openflexure_microscope") Loading Loading @@ -73,6 +82,9 @@ class CaptureDownload(Resource): class CaptureTags(Resource): """ Tags associated with a single image capture """ def get(self, id): microscope = find_device("openflexure_microscope") Loading Loading @@ -120,6 +132,9 @@ class CaptureTags(Resource): class CaptureMetadata(Resource): """ All metadata associated with a single image capture """ def get(self, id): microscope = find_device("openflexure_microscope") capture_obj = microscope.camera.image_from_id(id) Loading openflexure_microscope/common/flask_labthings/labthing.py +1 −0 Original line number Diff line number Diff line Loading @@ -225,6 +225,7 @@ class LabThing(object): return endpoint in self.endpoints ### Description def td(self): """ W3C-style Thing Description Loading Loading
openflexure_microscope/api/v2/views/actions/camera.py +8 −0 Original line number Diff line number Diff line Loading @@ -56,6 +56,11 @@ class CaptureAPI(Resource): class GPUPreviewStartAPI(Resource): """ Start the onboard GPU preview. Optional "window" parameter can be passed to control the position and size of the preview window, in the format ``[x, y, width, height]``. """ def post(self): microscope = find_device("openflexure_microscope") payload = JsonResponse(request) Loading @@ -76,6 +81,9 @@ class GPUPreviewStartAPI(Resource): class GPUPreviewStopAPI(Resource): """ Start the onboard GPU preview. """ def post(self): microscope = find_device("openflexure_microscope") microscope.camera.stop_preview() Loading
openflexure_microscope/api/v2/views/actions/stage.py +4 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,10 @@ import logging class MoveStageAPI(Resource): """ Handle stage movements. """ def post(self): microscope = find_device("openflexure_microscope") # Create response object Loading
openflexure_microscope/api/v2/views/captures.py +15 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,9 @@ from openflexure_microscope.common.flask_labthings.find import find_device class CaptureList(Resource): """ List all image captures """ def get(self): microscope = find_device("openflexure_microscope") image_list = microscope.camera.images Loading @@ -19,6 +22,9 @@ class CaptureList(Resource): class CaptureResource(Resource): """ Description of a single image capture """ def get(self, id): microscope = find_device("openflexure_microscope") capture_obj = microscope.camera.image_from_id(id) Loading @@ -41,6 +47,9 @@ class CaptureResource(Resource): class CaptureDownload(Resource): """ Image data for a single image capture """ def get(self, id, filename): microscope = find_device("openflexure_microscope") Loading Loading @@ -73,6 +82,9 @@ class CaptureDownload(Resource): class CaptureTags(Resource): """ Tags associated with a single image capture """ def get(self, id): microscope = find_device("openflexure_microscope") Loading Loading @@ -120,6 +132,9 @@ class CaptureTags(Resource): class CaptureMetadata(Resource): """ All metadata associated with a single image capture """ def get(self, id): microscope = find_device("openflexure_microscope") capture_obj = microscope.camera.image_from_id(id) Loading
openflexure_microscope/common/flask_labthings/labthing.py +1 −0 Original line number Diff line number Diff line Loading @@ -225,6 +225,7 @@ class LabThing(object): return endpoint in self.endpoints ### Description def td(self): """ W3C-style Thing Description Loading