In [1]:
import analysis2 as a2

In [ ]:
import analysis2 as a2

In [4]:
## Pipeline scripts capable of grabbing ara3 reference image from new ndstore cloud
refImg = a2.get_atlas("/home/userToken.pem")

In [5]:
## Pipeline scripts capable of getting s275 brain from new ndstore cloud with proper credentials (note - we still need
## proper credentials)

s275Img = a2.get_raw_brain("s275", "/home/userToken.pem")

In [7]:
## Confirmation that refImg was correctly obtained (can be cross-referenced with results from Kwame's notebook)

from ndreg import *
import matplotlib
import ndio.remote.neurodata as neurodata
imgShow(refImg, vmax=269.129411765)



In [10]:
inImg_lddmm, refAnnoImg = a2.register("s275", "/home/userToken.pem", orientation="IAL", resolution=5, raw_im=s275Img, atlas=refImg)


---------------------------------------------------------------------------
MemoryError                               Traceback (most recent call last)
<ipython-input-10-a4c24b44e335> in <module>()
----> 1 inImg_lddmm, refAnnoImg = a2.register("s275", "/home/userToken.pem", orientation="IAL", resolution=5, raw_im=s275Img, atlas=refImg)

/home/seelviz/algorithms/analysis2.pyc in register(token, cert_path, orientation, resolution, raw_im, atlas)
     93     server = "dev.neurodata.io"
     94     userToken = txtRead(cert_path).strip()
---> 95     refImg = imgDownload(refToken, channel="average", server=server, userToken=userToken)
     96 
     97     if atlas == None:

/root/.local/lib/python2.7/site-packages/ndreg-0.0.1-py2.7.egg/ndreg/ndreg.pyc in imgDownload(token, channel, resolution, server, userToken, size, start)
    160 
    161     # Download all image data from specified channel
--> 162     array = nd.get_cutout(token, channel, start[0], size[0], start[1], size[1], start[2], size[2], resolution)
    163 
    164     # Cast downloaded image to server's data type

/usr/local/lib/python2.7/dist-packages/ndio/remote/neurodata.pyc in wrapped(self, *args, **kwargs)
     97                     else:
     98                         self._known_tokens.append(token)
---> 99             return f(self, *args, **kwargs)
    100         return wrapped
    101 

/usr/local/lib/python2.7/dist-packages/ndio/remote/neurodata.pyc in get_cutout(self, token, channel, x_start, x_stop, y_start, y_stop, z_start, z_stop, resolution, block_size, neariso)
    752             vol = numpy.zeros(((z_stop - z_start),
    753                                (y_stop - y_start),
--> 754                                (x_stop - x_start)))
    755             for b in blocks:
    756 

MemoryError: 

In [ ]: