示例#1
0
def switchDataset(dataset):
    """Load the appropriate dbconfig project based on the dataset name"""

    # Switch on the dataset
    if dataset == 'hayworth5nm':
        import dbconfighayworth5nm
        return dbconfighayworth5nm.dbConfigHayworth5nm()
    elif dataset == 'bock11':
        import dbconfigbock11
        return dbconfigbock11.dbConfigBock11()
    elif dataset == 'kasthuri11':
        import dbconfigkasthuri11
        return dbconfigkasthuri11.dbConfigKasthuri11()
    elif dataset == 'will':
        import dbconfigwill
        return dbconfigwill.dbConfigWill()
    elif dataset == 'drosophila':
        import dbconfigdrosophila
        return dbconfigdrosophila.dbConfigDrosophila()
    elif dataset == 'kat11iso':
        import dbconfigkat11iso
        return dbconfigkat11iso.dbConfigKasthuri11Isotropic()
    elif dataset == 'weiler':
        import dbconfigweiler
        return dbconfigweiler.dbConfigWeiler()
    elif dataset == 'autism':
        import dbconfigautism
        return dbconfigautism.dbConfigAutism()
    else:
        # RBTODO make this a dbconfig exception
        raise DBConfigError("Could not find dataset = %s" % dataset)
示例#2
0
def main():

  parser = argparse.ArgumentParser(description='Cutout a portion of the database.')
  parser.add_argument('xlow', action="store", type=int )
  parser.add_argument('xhigh', action="store", type=int)
  parser.add_argument('ylow', action="store", type=int)
  parser.add_argument('yhigh', action="store", type=int)
  parser.add_argument('zlow', action="store", type=int)
  parser.add_argument('zhigh', action="store", type=int)

  result = parser.parse_args()

  dbcfg = dbconfighayworth5nm.dbConfigHayworth5nm()

  annoDB = anndb.AnnotateDB ( dbcfg )

  voxlist= []

  for k in range (result.zlow,result.zhigh):
    for j in range (result.ylow,result.yhigh):
      for i in range (result.xlow,result.xhigh):
        voxlist.append ( [ i,j,k] )

  print voxlist

  # Build a grayscale file and display
  entityid = annoDB.addEntity ( voxlist )

  print "Added entity with identifier = ", entityid
示例#3
0
def main():

  #  Specify the database to ingest
  #dbcfg = dbconfigbock11.dbConfigBock11()

  dbcfg = dbconfighayworth5nm.dbConfigHayworth5nm()

  cdb = cubedb.CubeDB ( dbcfg )

  # for all specified resolutions
  for resolution in dbcfg.resolutions:
    print "Building DB for resolution ", resolution, " imagesize ", dbcfg.imagesz[resolution]
    cdb.generateDB ( resolution )

  return 
示例#4
0
def main():

  parser = argparse.ArgumentParser(description='Cutout a portion of the database.')
  parser.add_argument('xlow', action="store", type=int )
  parser.add_argument('xhigh', action="store", type=int)
  parser.add_argument('ylow', action="store", type=int)
  parser.add_argument('yhigh', action="store", type=int)
  parser.add_argument('zslice', action="store", type=int, default=0)

  result = parser.parse_args()

  dbcfg = dbconfighayworth5nm.dbConfigHayworth5nm()

  annoDB = anndb.AnnotateDB ( dbcfg )

  corner = [ result.xlow, result.ylow, result.zslice ]
  dim = [ result.xhigh - result.xlow, result.yhigh - result.ylow, 1 ] 

  # Build a grayscale file and display

  xyplane = annoDB.cutout ( corner, dim, dbcfg.annotateres )

  print xyplane.data
示例#5
0
def hayworth5nm ( webargs ):
  """Use the hayworth5nm data set"""
  dbcfg = dbconfighayworth5nm.dbConfigHayworth5nm()
  return selectService ( webargs, dbcfg )