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", }) volumeD = dvid.get_cutout( dvid.get_channel("3ca15f84b1ee4fb780fef94c5771ffe6","dyer15_3_maskim"),0, [1287,1387],[1200,1300],[390,490] ) #Printing volumes: print("Dvid volume: ") print(volumeD) #Graphing Dvid: imgplot = plt.imshow(volumeD[3,:,:], cmap = "gray") plt.show()
}) volumeB = boss.get_cutout( boss.get_channel("em", "pinky40", "v7"), 1, [10000, 10500], [10000, 10500], [500, 550], ) #DVID Data fetch: dvid = DVIDRemote({ "protocol": "http", "host": "localhost:8000", }) volumeD = dvid.get_cutout( dvid.get_channel("5cc94d532799484cb01788fcdb7cd9f0", "grayscale"), 0, [2300, 4600], [2300, 4600], [1380, 1390]) #Printing volumes: print("Dvid volume: ") print(volumeD) print("Boss volume: ") print(volumeB) #Graphing Boss: imgplot = plt.imshow(volumeB[0, :, :], cmap="gray") one = volumeB[0, :, :] one_size = one.size plt.show() #Graphing Dvid:
import intern from intern.remote.dvid import DVIDRemote import matplotlib.pyplot as plt #DVID Data fetch: dvid = DVIDRemote({ "protocol": "http", "host": "localhost:8000", }) chan = "UUID/ChannelName" volumeD = dvid.get_cutout(dvid.get_channel(chan), 0, [0, 2560], [0, 2560], [390, 392]) print(volumeD) imgplot = plt.imshow(volumeD[0, :, :], cmap="gray") plt.show()
import intern from intern.remote.dvid import DVIDRemote from PIL import Image import numpy as np import os import matplotlib.pyplot as plt UUID = "30eb" #Declare DVIDRemote dvid = DVIDRemote({ "protocol": "http", "host": "localhost:8000", }) volumeD = dvid.get_cutout( dvid.get_channel(UUID, "dyer15_3_maskim_DUmmy", "dyer15_3_maskim_DUmmy"), 0, [0, 2560], [0, 2560], [290, 292]) print(volumeD) imgplot = plt.imshow(volumeD[0, :, :], cmap='gray') plt.show()
[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) imgplot = plt.imshow(volumeD[:, :, 0], cmap="gray") plt.show()
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) imgplot = plt.imshow(volumeD[:,:,0], cmap = "gray") plt.show()