Skip to content

Commit c11d63c

Browse files
committed
feat: another cube example
1 parent 2241cd9 commit c11d63c

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

examples/serve_default_dir.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from neuroglancer_utils.create_datasets.create_full_cube import create_cube
2+
from neuroglancer_utils.create_datasets.create_float_cube import create_float_cube
23
from neuroglancer_utils.create_datasets.create_full_cube_16 import (
34
create_cube as create_cube_16,
45
)
@@ -10,6 +11,7 @@
1011
from neuroglancer_utils.local_server import create_server
1112

1213
create_cube()
14+
create_float_cube()
1315
create_cube_16()
1416
create_sphere()
1517
create_allen_multi()
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from cloudvolume import CloudVolume
2+
import numpy as np
3+
4+
def create_float_cube(output_path="file://datasets/cube-float-res"):
5+
rawdata = np.full(shape=(100, 100, 100), fill_value=70.0).astype(np.float32)
6+
CloudVolume.from_numpy(
7+
rawdata,
8+
vol_path=output_path,
9+
resolution=(1.5, 1.5, 2.1),
10+
chunk_size=(100, 100, 100),
11+
layer_type="image",
12+
progress=True,
13+
compress=False
14+
)

neuroglancer_utils/create_datasets/create_full_cube.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def create_cube(output_path="file://datasets/cube"):
66
CloudVolume.from_numpy(
77
rawdata,
88
vol_path=output_path,
9-
resolution=(40, 40, 40),
9+
resolution=(2, 2, 4),
1010
chunk_size=(100, 100, 100),
1111
layer_type="image",
1212
progress=True,

0 commit comments

Comments
 (0)