def get_cutout(self, token, channel,<EOL>x_start, x_stop,<EOL>y_start, y_stop,<EOL>z_start, z_stop,<EOL>t_start=<NUM_LIT:0>, t_stop=<NUM_LIT:1>,<EOL>resolution=<NUM_LIT:1>,<EOL>block_size=DEFAULT_BLOCK_SIZE,<EOL>neariso=False):
if block_size is None:<EOL><INDENT>block_size = self.get_block_size(token, resolution)<EOL><DEDENT>origin = self.get_image_offset(token, resolution)<EOL>if (z_stop - z_start) < <NUM_LIT:16>:<EOL><INDENT>z_slices = <NUM_LIT:16><EOL><DEDENT>else:<EOL><INDENT>z_slices = z_stop - z_start<EOL><DEDENT>size = (x_stop - x_start) * (y_stop - y_start) * z_slices * <NUM_LIT:4><EOL>if six.PY2:<EOL><INDENT>dl_func = self._get_cutout_blosc_no_chunking<EOL><DEDENT>elif six.PY3:<EOL><INDENT>dl_func = self._get_cutout_no_chunking<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if size < self._chunk_threshold:<EOL><INDENT>vol = dl_func(token, channel, resolution,<EOL>x_start, x_stop,<EOL>y_start, y_stop,<EOL>z_start, z_stop,<EOL>t_start, t_stop,<EOL>neariso=neariso)<EOL>vol = numpy.rollaxis(vol, <NUM_LIT:1>)<EOL>vol = numpy.rollaxis(vol, <NUM_LIT:2>)<EOL>return vol<EOL><DEDENT>else:<EOL><INDENT>from ndio.utils.parallel import block_compute<EOL>blocks = block_compute(x_start, x_stop,<EOL>y_start, y_stop,<EOL>z_start, z_stop,<EOL>origin, block_size)<EOL>vol = numpy.zeros(((z_stop - z_start),<EOL>(y_stop - y_start),<EOL>(x_stop - x_start)))<EOL>for b in blocks:<EOL><INDENT>data = dl_func(token, channel, resolution,<EOL>b[<NUM_LIT:0>][<NUM_LIT:0>], b[<NUM_LIT:0>][<NUM_LIT:1>],<EOL>b[<NUM_LIT:1>][<NUM_LIT:0>], b[<NUM_LIT:1>][<NUM_LIT:1>],<EOL>b[<NUM_LIT:2>][<NUM_LIT:0>], b[<NUM_LIT:2>][<NUM_LIT:1>],<EOL><NUM_LIT:0>, <NUM_LIT:1>,<EOL>neariso=neariso)<EOL>if b == blocks[<NUM_LIT:0>]:  <EOL><INDENT>vol = numpy.zeros(((z_stop - z_start),<EOL>(y_stop - y_start),<EOL>(x_stop - x_start)), dtype=data.dtype)<EOL><DEDENT>vol[b[<NUM_LIT:2>][<NUM_LIT:0>] - z_start: b[<NUM_LIT:2>][<NUM_LIT:1>] - z_start,<EOL>b[<NUM_LIT:1>][<NUM_LIT:0>] - y_start: b[<NUM_LIT:1>][<NUM_LIT:1>] - y_start,<EOL>b[<NUM_LIT:0>][<NUM_LIT:0>] - x_start: b[<NUM_LIT:0>][<NUM_LIT:1>] - x_start] = data<EOL><DEDENT>vol = numpy.rollaxis(vol, <NUM_LIT:1>)<EOL>vol = numpy.rollaxis(vol, <NUM_LIT:2>)<EOL>return vol<EOL><DEDENT>
Get volumetric cutout data from the neurodata server.

Arguments:
    token (str): Token to identify data to download
    channel (str): Channel
    resolution (int): Resolution level
    Q_start (int): The lower bound of dimension 'Q'
    Q_stop (int): The upper bound of dimension 'Q'
    block_size (int[3]): Block size of this dataset. If not provided,
        ndio uses the metadata of this tokenchannel to set. If you find
        that your downloads are timing out or otherwise failing, it may
        be wise to start off by making this smaller.
    neariso (bool : False): Passes the 'neariso' param to the cutout.
        If you don't know what this means, ignore it!

Returns:
    numpy.ndarray: Downloaded data.