for dim in data.shape: if dim % 32 != 0: newmax = (dim / 32 + 1) * 32 else: newmax = dim reshaper += [(0, newmax - dim)] data = np.pad(data, reshaper, mode='constant') d2 = data.copy() data = None pdb.set_trace() if args.segmentation or header['keyvaluepairs'].get('seg', '') == 'true': d2 = d2.astype(np.uint64) try: service.create_labelblk(args.file) except DVIDException: print 'warning override data?' push_to_dvid(service.put_labels3D, args.file, d2) # yieldtoDvid(service.put_labels3D, args.file, header, inputnrrd, np.uint64) else: if header['keyvaluepairs'].get('seg', None) is None: print 'warning header value for seg is not set nor is flag' d2 = d2.astype(np.uint8) try: service.create_grayscale8(args.file) except DVIDException: print "warnging override data" push_to_dvid(service.put_gray3D, args.file, d2, compress=False) # yieldtoDvid(service.put_gray3D, args.file, header, inputnrrd, np.uint8, compress=False)