def ApplyAtoms(V,D,scale):
out=[]
for s in xrange(scale):
if s!=0:
print('scale='+str(s))
V = pyr.pyramid_reduce_3d(V,downscale=2) # reduce the volume. e.g. from 512^3 to 256^3
else: print('scale=0')
for i in xrange(len(D)):
print('s:'+str(s)+' i:'+str(i))
conv = nd.convolve(V, D[i], mode='constant', cval=0.0)
if s==0:
out.append(conv)
else:
upscaled = pyr.pyramid_expand_3d(conv, upscale=2**s)
out.append(upscaled)
out=np.array(out)
return out
评论列表
文章目录