コード例 #1
0
ファイル: xBrainStart.py プロジェクト: aplbrain/repetir
from subprocess import call
import intern
from intern.remote.dvid import DVIDRemote

# #Starts Dockers
# call(["docker-compose", "up"])

#DVID Data fetch:
dvid = DVIDRemote({
    "protocol": "http",
    "host": "localhost:8000",
})

#Creating Project, and chanel to store boxed data in
proj = dvid.create_project('Xbrain_Proj1', 'Data upload test')
chan_setup = dvid.ChannelResource(proj, "MaskedImg1")

#Uploads Data
call([
    "docker-compose", "exec", "dvid", "dvid", "node", proj, "MaskedImg1",
    "load", "0" + "," + "0" + "," + "390", "dataLoad/*.tif"
])
print("The dvid instance has your requested data sample.")
コード例 #2
0
print "hello"

iNumS = 390  #Image Number start
iNumE = 405  #Image Number end
start = 0
end = 32

#Declare DVIDRemote
dvid = DVIDRemote({
    "protocol": "http",
    "host": "localhost:8000",
})

chan_setup = dvid.ChannelResource(
    'Proj4', 'dyer15_3_maskim', 'maked_images',
    'Data uploaded from XBrain experiments through intern')
proj = dvid.create_project(chan_setup)
# UUID = chan_setup.split("/")
# UUID = UUID[0]

while iNumS <= iNumE:
    directory = '/Users/rodrilm2/Documents/APL/GeorgiaTech/data/proj4_masked_390_2014/'
    # data = np.zeros((2560,2560))
    num = format(iNumS, "04")
    filename = "dyer15_3_maskimg_" + num + ".tif"
    pathname = os.path.join(directory, filename)
    print('Processing:  ' + filename)
    img = Image.open(pathname)
    data = np.array(img)
    xrang = [0, 256]
コード例 #3
0
import intern
from intern.remote.boss import BossRemote
from intern.resource.boss.resource import ChannelResource
from intern.remote.dvid import DVIDRemote
import matplotlib.pyplot as plt
import numpy as np

#DVID Data fetch:
dvid = DVIDRemote({
    "protocol": "http",
    "host": "localhost:8000",
})
chan_setup = dvid.ChannelResource('Xbrain_Proj_Dummy', 'dyer15_3_maskim_DUmmy',
                                  'masked_images', 'Data upload test', '')
proj = dvid.create_project(chan_setup)
print(proj)
# dvid.delete_project("8ef")
コード例 #4
0
})
volumeB = boss.get_cutout(
    boss.get_channel("em", "pinky40", "v7"),
    2,
    [10000, 10200],
    [10000, 10200],
    [501, 502],
)

#UPLOAD TO DVID REPOSITORY
dvid = DVIDRemote({
    "protocol": "http",
    "host": "localhost:8000",
})

chan_setup = dvid.ChannelResource('pinky40', 'BossData RemoteTest',
                                  'Data uploaded from Boss to dvid')
proj = dvid.create_project(chan_setup)
UUID = chan_setup.split("/")
UUID = UUID[0]

xrang = [0, 32]
yrang = [0, 32]
zrang = [32, 64]

volume = dvid.create_cutout(proj, xrang, yrang, zrang, volumeB)

#Check DVID Data:
volumeD = dvid.get_cutout(dvid.get_channel(UUID, "pinky40", "Medulla"), 0,
                          [0, 200], [0, 200], [32, 33])
print(volumeD)