Skip to content

get_image_frame

get_image_frame(
    datastore_id: DatastoreId,
    image_set_id: ImageSetId,
    image_frame_information: ImageFrameInformation,
    *,
    config_overrides: Optional[MedicalImagingClientConfig] = None,
) -> Generator[GetImageFrameResponse]

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

Parameters:

  • datastore_id (DatastoreId) –

    The data store identifier.

  • image_set_id (ImageSetId) –

    The image set identifier.

  • image_frame_information (ImageFrameInformation) –

    Information about the image frame (pixel data) identifier.

Raises:

Source code in docs_src/capo_medical_imaging/_services/medical_imaging.py
@contextmanager
def get_image_frame(
    self,
    datastore_id: "capo_medical_imaging.types.datastore_id.DatastoreId",
    image_set_id: "capo_medical_imaging.types.image_set_id.ImageSetId",
    image_frame_information: "capo_medical_imaging.types.image_frame_information.ImageFrameInformation",
    *,
    config_overrides: Optional[MedicalImagingClientConfig] = None,
) -> "Generator[capo_medical_imaging.types.get_image_frame_response.GetImageFrameResponse]":
    """<p>Get an image frame (pixel data) for an image set.</p>

    Args:
        datastore_id: <p>The data store identifier.</p>
        image_set_id: <p>The image set identifier.</p>
        image_frame_information: <p>Information about the image frame (pixel data) identifier.</p>

    Raises:
        capo_medical_imaging.errors.access_denied_exception.AccessDeniedException: <p>The user does not have sufficient access to perform this action.</p>
        capo_medical_imaging.errors.bad_request_exception.BadRequestException: <p>The request is invalid or malformed.</p>
        capo_medical_imaging.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_medical_imaging.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred during processing of the request.</p>
        capo_medical_imaging.errors.not_acceptable_exception.NotAcceptableException: <p>The request content type or accept header is not supported.</p>
        capo_medical_imaging.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource which does not exist.</p>
        capo_medical_imaging.errors.throttling_exception.ThrottlingException: <p>The request was denied due to throttling.</p>
        capo_medical_imaging.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints set by the service.</p>
        capo_medical_imaging.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_medical_imaging.types.get_image_frame_request.GetImageFrameRequest]",
    ) -> OperationResponse[
        "capo_medical_imaging.types.get_image_frame_response.GetImageFrameResponse"
    ]:
        import capo_medical_imaging._operations.ahi_gateway_service.get_image_frame

        output, http_response = (
            capo_medical_imaging._operations.ahi_gateway_service.get_image_frame.get_image_frame(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_medical_imaging.types.get_image_frame_response.GetImageFrameResponse",
    ) -> dict[str, Any]:
        import capo_medical_imaging.types.get_image_frame_response

        return capo_medical_imaging.types.get_image_frame_response.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetImageFrame", redact_output=_redact_output),
    )
    input_: capo_medical_imaging.types.get_image_frame_request.GetImageFrameRequest = {
        "datastore_id": datastore_id,
        "image_set_id": image_set_id,
        "image_frame_information": image_frame_information,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    try:
        yield response.output
    finally:
        response.response.close()