Module Import alias Import alias Import alias Import alias identifier ImportFrom alias Import alias alias Import alias Import alias Import alias Import alias Expr Str Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Str Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr For NameStore Call NameLoad NameLoad BinOpAdd NameLoad Num NameLoad body Assign NameStore NameLoad Assign NameStore NameLoad Import alias Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad NameLoad keyword AttributeLoad NameLoad attr For NameStore Call NameLoad NameLoad body If CompareLtE BinOpAdd NameLoad NameLoad NameLoad body Assign NameStore BinOpAdd BinOpAdd BinOpAdd BinOpAdd AttributeLoad NameLoad attr Str NameLoad Call AttributeLoad Str attr BinOpAdd NameLoad NameLoad Str Print NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad ExtSlice Index NameLoad Slice Slice NameLoad Print Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad Assign NameStore BinOpAdd NameLoad Num Assign NameStore BinOpAdd BinOpAdd NameLoad NameLoad Num Assign NameStore Num Assign NameStore NameLoad Assign NameStore Num Assign NameStore NameLoad For NameStore Call NameLoad NameLoad NameLoad NameLoad body For NameStore Call NameLoad NameLoad NameLoad NameLoad body For NameStore Call NameLoad NameLoad NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad ExtSlice Slice BinOpSub NameLoad NameLoad BinOpSub Call NameLoad NameLoad BinOpAdd NameLoad NameLoad NameLoad Slice BinOpSub NameLoad NameLoad BinOpSub Call NameLoad NameLoad BinOpAdd NameLoad NameLoad NameLoad Slice BinOpSub NameLoad NameLoad BinOpSub Call NameLoad NameLoad BinOpAdd NameLoad NameLoad NameLoad If CompareNotEq Call AttributeLoad NameLoad attr NameLoad Num body Assign NameStore BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad BinOpAdd NameLoad NameLoad NameLoad Call NameLoad NameLoad BinOpAdd NameLoad NameLoad NameLoad Call NameLoad NameLoad BinOpAdd NameLoad NameLoad Print NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A argparse N/A sys N/A os N/A numpy np PIL Image N/A urllib urllib2 N/A cStringIO N/A collections N/A zlib N/A kanno_cy N/A This file is super-customized for the kasthuri annotations data.
     Probably the biggest idiosyncracy is the handling of slices.
     They start at 1 and the database aligns slices 1..16, 17..32, etc.
     So, we try to ingest in that pattern. N/A _xtilesz 10748 N/A _ytilesz 12896 N/A _startslice 1840 N/A _endslice 1849 N/A _prefix Threecylinders_Synapses_forJHU_export_s N/A _batchsz 16 N/A _zingestsz 16 N/A _yingestsz 1024 N/A _xingestsz 1024 main N/A N/A N/A N/A N/A parser N/A N/A argparse ArgumentParser description Ingest the kasthuri11 dataset annotations. N/A N/A N/A parser add_argument token action store help Token for the annotation project. N/A N/A N/A parser add_argument resolution action store help Resolution of the ingest data. N/A N/A N/A parser add_argument path action store help Directory with annotation PNG files. N/A result N/A N/A parser parse_args N/A sl N/A range _startslice N/A _endslice 1 _batchsz N/A N/A newdata None N/A data None N/A gc N/A N/A N/A gc collect N/A newdata N/A N/A np zeros N/A _batchsz _ytilesz _xtilesz dtype N/A np uint32 N/A b N/A range _batchsz N/A N/A N/A N/A sl b _endslice N/A N/A filenm N/A N/A N/A N/A N/A result path / _prefix N/A N/A {:0>4} format N/A sl b .png N/A filenm N/A tileimage N/A N/A Image open filenm r N/A imgdata N/A N/A np asarray tileimage N/A N/A newdata N/A N/A b N/A N/A imgdata N/A N/A N/A np unique imgdata N/A endz b N/A zlow N/A sl 1 N/A zhigh N/A N/A sl endz 2 N/A ylow 0 N/A yhigh _ytilesz N/A xlow 0 N/A xhigh _xtilesz N/A z N/A range zlow zhigh _zingestsz N/A N/A y N/A range ylow yhigh _yingestsz N/A N/A x N/A range xlow xhigh _xingestsz N/A N/A data N/A newdata N/A N/A N/A z zlow N/A N/A min zhigh N/A z _zingestsz zlow N/A N/A y ylow N/A N/A min yhigh N/A y _yingestsz ylow N/A N/A x xlow N/A N/A min xhigh N/A x _xingestsz xlow N/A N/A N/A N/A np count_nonzero data 0 N/A N/A url N/A http://localhost/ocp/ca/%s/npz/%s/%s,%s/%s,%s/%s,%s/ N/A N/A result token N/A result resolution x N/A min xhigh N/A x _xingestsz y N/A min yhigh N/A y _yingestsz z N/A min zhigh N/A z _zingestsz N/A url N/A fileobj N/A N/A cStringIO StringIO N/A N/A N/A np save fileobj data N/A cdz N/A N/A zlib compress N/A N/A fileobj getvalue N/A req N/A N/A urllib2 Request url cdz N/A response N/A N/A urllib2 urlopen req N/A the_page N/A N/A response read N/A N/A N/A __name__ __main__ N/A N/A N/A main