Skip to content

Commit 47f4ebb

Browse files
committed
feat: more examples
1 parent 40d15e9 commit 47f4ebb

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

examples/serve_default_dir.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
from neuroglancer_utils.create_datasets.create_sphere import create_sphere
33
from neuroglancer_utils.create_datasets.create_allen_multi import create_allen_multi
44
from neuroglancer_utils.create_datasets.create_cdf_example import create_cdf_example
5+
from neuroglancer_utils.create_datasets.create_border_data import create_border_example
56
from neuroglancer_utils.local_server import create_server
67

78
create_cube()
89
create_sphere()
910
create_allen_multi()
1011
create_cdf_example()
12+
create_border_example()
1113
create_server(directory="datasets")
1214
input("Press enter to continue")
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from cloudvolume import CloudVolume
2+
import numpy as np
3+
4+
5+
def create_border_example(output_path="file://datasets/border"):
6+
shape = (40,) * 3
7+
data = np.zeros(shape=shape, dtype=np.uint8)
8+
data[4:36, 4:36, 4:36] = 10
9+
CloudVolume.from_numpy(
10+
data,
11+
vol_path=output_path,
12+
resolution=(40, 40, 40),
13+
chunk_size=(32, 32, 32),
14+
layer_type="image",
15+
progress=True,
16+
compress=False,
17+
)

neuroglancer_utils/create_datasets/create_cdf_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def create_cdf_example(output_path="file://datasets/cdf"):
1313
data,
1414
vol_path=output_path,
1515
resolution=(40, 40, 40),
16-
chunk_size=(40, 40, 40),
16+
chunk_size=(32, 32, 32),
1717
layer_type="image",
1818
progress=True,
1919
compress=False,

0 commit comments

Comments
 (0)