def _zoominCutout ( self, ch, corner, dim, resolution ):

    # scale the corner to lower resolution
    effcorner = corner[0]/(2**(ch.getResolution()-resolution)), corner[1]/(2**(ch.getResolution()-resolution)), corner[2]

    # pixels offset within big range
    xpixeloffset = corner[0]%(2**(ch.getResolution()-resolution))
    ypixeloffset = corner[1]%(2**(ch.getResolution()-resolution))

    # get the new dimension, snap up to power of 2
    outcorner = (corner[0]+dim[0],corner[1]+dim[1],corner[2]+dim[2])

    newoutcorner = (outcorner[0]-1)/(2**(ch.getResolution()-resolution))+1, (outcorner[1]-1)/(2**(ch.getResolution()-resolution))+1, outcorner[2]
    effdim = (newoutcorner[0]-effcorner[0],newoutcorner[1]-effcorner[1],newoutcorner[2]-effcorner[2])

    return effcorner, effdim, (xpixeloffset,ypixeloffset)
Scale to a smaller cutout that will be zoomed
dataset/ETHPy150Open neurodata/ndstore/ocpca/ocpcadb.py/OCPCADB._zoominCutout