Skip to content

Commit d0c0215

Browse files
author
donglaiw
committed
add ng layer
1 parent 2eef917 commit d0c0215

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

emu/ng/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
from .ngDataset import *
2+
from .ngLayer import *

emu/ng/ngLayer.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import neuroglancer
2+
3+
def ngLayer(data,res,oo=[0,0,0],tt='segmentation'):
4+
# input zyx -> display xyz
5+
dim = neuroglancer.CoordinateSpace(names=['x', 'y', 'z'],
6+
units='nm',
7+
scales=res)
8+
return neuroglancer.LocalVolume(data.transpose([2,1,0]),volume_type=tt,dimensions=dim,voxel_offset=oo)

0 commit comments

Comments
 (0)