From 01a2361332160520d583a9208b83ac684601c2f2 Mon Sep 17 00:00:00 2001 From: Sean Martin Date: Mon, 11 Mar 2024 14:34:48 +0100 Subject: [PATCH] rename sphere and cube --- examples/sphere.py | 4 ++-- neuroglancer_utils/create_datasets/create_full_cube.py | 2 +- neuroglancer_utils/create_datasets/create_sphere.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/sphere.py b/examples/sphere.py index b061dea..00eddc0 100644 --- a/examples/sphere.py +++ b/examples/sphere.py @@ -15,7 +15,7 @@ from time import sleep import neuroglancer -from neuroglancer_utils.create_datasets.create_sphere import create_volume +from neuroglancer_utils.create_datasets.create_sphere import create_sphere from neuroglancer_utils.local_server import create_server from neuroglancer_utils.layer_utils import add_render_panel @@ -52,7 +52,7 @@ def get_shader(): if __name__ == "__main__": - create_volume() + create_sphere() create_server(directory="datasets") viewer = launch_nglancer() with viewer.txn() as s: diff --git a/neuroglancer_utils/create_datasets/create_full_cube.py b/neuroglancer_utils/create_datasets/create_full_cube.py index 12d6918..287b536 100644 --- a/neuroglancer_utils/create_datasets/create_full_cube.py +++ b/neuroglancer_utils/create_datasets/create_full_cube.py @@ -1,7 +1,7 @@ from cloudvolume import CloudVolume import numpy as np -def create_volume(output_path="file://datasets/cube"): +def create_cube(output_path="file://datasets/cube"): rawdata = np.full(shape=(100, 100, 100), fill_value=255.0).astype(np.float32) CloudVolume.from_numpy( rawdata, diff --git a/neuroglancer_utils/create_datasets/create_sphere.py b/neuroglancer_utils/create_datasets/create_sphere.py index 626d33d..78da35d 100644 --- a/neuroglancer_utils/create_datasets/create_sphere.py +++ b/neuroglancer_utils/create_datasets/create_sphere.py @@ -23,7 +23,7 @@ def create_sphere_in_cube(size, radius): return sphere.astype(np.float32) * 255.0 -def create_volume(output_path="file://datasets/sphere"): +def create_sphere(output_path="file://datasets/sphere"): rawdata = create_sphere_in_cube(100, 0.9) #rawdata = np.full(shape=(100, 100, 100), fill_value=255.0).astype(np.float32) CloudVolume.from_numpy(