def get_bounding_box(
            self, resource, resolution, _id, bb_type,
            url_prefix, auth, session, send_opts):
        """Get bounding box containing object specified by id.

        Currently only supports 'loose' bounding boxes.  The bounding box
        returned is cuboid aligned.

        Args:
            resource (intern.resource.Resource): Resource compatible with annotation operations.
            resolution (int): 0 indicates native resolution.
            _id (int): Id of object of interest.
            bb_type (string): Defaults to 'loose'.
            url_prefix (string): Protocol + host such as https://api.theboss.io
            auth (string): Token to send in the request header.
            session (requests.Session): HTTP session to use for request.
            send_opts (dictionary): Additional arguments to pass to session.send().

        Returns:
            (dict): {'x_range': [0, 10], 'y_range': [0, 10], 'z_range': [0, 10], 't_range': [0, 10]}

        Raises:
            requests.HTTPError
            TypeError: if resource is not an annotation channel.
        """
        if not isinstance(resource, ChannelResource):
            raise TypeError('resource must be ChannelResource')
        if resource.type != 'annotation':
            raise TypeError('Channel is not an annotation channel')

        req = self.get_bounding_box_request(
            resource, 'GET', 'application/json', url_prefix, auth, resolution,
            _id, bb_type)

        prep = session.prepare_request(req)
        resp = session.send(prep, **send_opts)

        if resp.status_code == 200:
            json_data = resp.json()
            return json_data

        msg = ('Get bounding box failed on {}, got HTTP response: ({}) - {}'.format(
            resource.name, resp.status_code, resp.text))
        raise HTTPError(msg, request=req, response=resp)
def get_bounding_box ( self , resource , resolution , _id , bb_type , url_prefix , auth , session , send_opts ) : if not isinstance ( resource , ChannelResource ) : raise TypeError ( 'resource must be ChannelResource' ) if resource . type != 'annotation' : raise TypeError ( 'Channel is not an annotation channel' ) req = self . get_bounding_box_request ( resource , 'GET' , 'application/json' , url_prefix , auth , resolution , _id , bb_type ) prep = session . prepare_request ( req ) resp = session . send ( prep , ** send_opts ) if resp . status_code == 200 : json_data = resp . json ( ) return json_data msg = ( 'Get bounding box failed on {}, got HTTP response: ({}) - {}' . format ( resource . name , resp . status_code , resp . text ) ) raise HTTPError ( msg , request = req , response = resp )
Get bounding box containing object specified by id.

        Currently only supports 'loose' bounding boxes.  The bounding box
        returned is cuboid aligned.

        Args:
            resource (intern.resource.Resource): Resource compatible with annotation operations.
            resolution (int): 0 indicates native resolution.
            _id (int): Id of object of interest.
            bb_type (string): Defaults to 'loose'.
            url_prefix (string): Protocol + host such as https://api.theboss.io
            auth (string): Token to send in the request header.
            session (requests.Session): HTTP session to use for request.
            send_opts (dictionary): Additional arguments to pass to session.send().

        Returns:
            (dict): {'x_range': [0, 10], 'y_range': [0, 10], 'z_range': [0, 10], 't_range': [0, 10]}

        Raises:
            requests.HTTPError
            TypeError: if resource is not an annotation channel.