instance_setup_em_delete = RepositoryResource(None, "Test_for_deletion") instance_actual_em_delete_uuid = dvid.create_project(instance_setup_em_delete) instance_actual_em_delete = dvid.delete_project(instance_setup_em_delete) print("Successfully deleted Repo project: {}".format( instance_actual_em_delete_uuid)) # Delete the data instance of a repo instance_setup_em_delete = DataInstanceResource(DATA_INSTANCE, None, "uint8blk", ALIAS, "Example channel.", datatype="uint8") instance_actual_em_delete_uuid = dvid.create_project(instance_setup_em_delete) dvid.delete_project( dvid.get_instance(instance_actual_em_delete_uuid, DATA_INSTANCE)) print("Successfully deleted data instance project: {}".format( instance_actual_em_delete_uuid)) ########### Test Versioning API ########### # Set up a new project with a channel instance_setup_merge = DataInstanceResource( DATA_INSTANCE + "_the_second", None, "uint8blk", "Mege_repo", "Example channel.", datatype="uint8", )
from intern.remote.boss import BossRemote from intern.remote.dvid import DVIDRemote from intern.resource.boss.resource import * import matplotlib.pyplot as plt import numpy as np # Define the BOSS remote rmt = BossRemote({"protocol": "https", "host": "api.bossdb.io", "token": "public"}) ANN_COLL_NAME = "allan_johnson" ANN_EXP_NAME = "gaj_17_40" experiment = rmt.get_experiment(ANN_COLL_NAME, ANN_EXP_NAME) print("Boss experiment extents: {}".format(rmt.get_extents(experiment))) # Define the DVID remote dvid = DVIDRemote({"protocol": "https", "host": "emdata.janelia.org",}) uuid = "822524777d3048b8bd520043f90c1d28" name = "grayscale" annos_name = "groundtruth" print( "DVID data instance extents: {}".format( dvid.get_extents(dvid.get_instance(uuid, name, datatype="uint8")) ) )
from intern.remote.dvid import DVIDRemote import matplotlib.pyplot as plt import numpy as np # DVID Data fetch: # Define the remote dvid = DVIDRemote({ "protocol": "https", "host": "emdata.janelia.org", }) uuid = "822524777d3048b8bd520043f90c1d28" name = "grayscale" annos_name = "groundtruth" print(dvid.get_extents(dvid.get_instance(uuid, name, datatype="uint8"))) # get cutout from actual dataset volumeD = dvid.get_cutout( dvid.get_instance(uuid, name, datatype="uint8"), 0, [3000, 3150], [3000, 3150], [2000, 2010], ) # get annotations from dataset annosD = dvid.get_cutout( dvid.get_instance(uuid, annos_name, datatype="uint64"), 0, [3000, 3150],