getImageFrame method

Future<GetImageFrameResponse> getImageFrame({
  1. required String datastoreId,
  2. required ImageFrameInformation imageFrameInformation,
  3. required String imageSetId,
})

Get an image frame (pixel data) for an image set.

May throw AccessDeniedException. May throw BadRequestException. May throw ConflictException. May throw InternalServerException. May throw NotAcceptableException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter datastoreId : The data store identifier.

Parameter imageFrameInformation : Information about the image frame (pixel data) identifier.

Parameter imageSetId : The image set identifier.

Implementation

Future<GetImageFrameResponse> getImageFrame({
  required String datastoreId,
  required ImageFrameInformation imageFrameInformation,
  required String imageSetId,
}) async {
  final response = await _protocol.sendRaw(
    payload: imageFrameInformation,
    method: 'POST',
    requestUri:
        '/datastore/${Uri.encodeComponent(datastoreId)}/imageSet/${Uri.encodeComponent(imageSetId)}/getImageFrame',
    exceptionFnMap: _exceptionFns,
  );
  return GetImageFrameResponse(
    imageFrameBlob: await response.stream.toBytes(),
    contentType:
        _s.extractHeaderStringValue(response.headers, 'Content-Type'),
  );
}