Skip to content

Commit

Permalink
feat: more examples
Browse files Browse the repository at this point in the history
  • Loading branch information
seankmartin committed Jul 30, 2024
1 parent 40d15e9 commit 47f4ebb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 2 additions & 0 deletions examples/serve_default_dir.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
from neuroglancer_utils.create_datasets.create_sphere import create_sphere
from neuroglancer_utils.create_datasets.create_allen_multi import create_allen_multi
from neuroglancer_utils.create_datasets.create_cdf_example import create_cdf_example
from neuroglancer_utils.create_datasets.create_border_data import create_border_example
from neuroglancer_utils.local_server import create_server

create_cube()
create_sphere()
create_allen_multi()
create_cdf_example()
create_border_example()
create_server(directory="datasets")
input("Press enter to continue")
17 changes: 17 additions & 0 deletions neuroglancer_utils/create_datasets/create_border_data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from cloudvolume import CloudVolume
import numpy as np


def create_border_example(output_path="file://datasets/border"):
shape = (40,) * 3
data = np.zeros(shape=shape, dtype=np.uint8)
data[4:36, 4:36, 4:36] = 10
CloudVolume.from_numpy(
data,
vol_path=output_path,
resolution=(40, 40, 40),
chunk_size=(32, 32, 32),
layer_type="image",
progress=True,
compress=False,
)
2 changes: 1 addition & 1 deletion neuroglancer_utils/create_datasets/create_cdf_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def create_cdf_example(output_path="file://datasets/cdf"):
data,
vol_path=output_path,
resolution=(40, 40, 40),
chunk_size=(40, 40, 40),
chunk_size=(32, 32, 32),
layer_type="image",
progress=True,
compress=False,
Expand Down

0 comments on commit 47f4ebb

Please sign in to comment.