diff --git a/chunkflow/chunk/base.py b/chunkflow/chunk/base.py index 179d7c5e..5ad62764 100755 --- a/chunkflow/chunk/base.py +++ b/chunkflow/chunk/base.py @@ -418,6 +418,10 @@ def properties(self) -> dict: props['voxel_size'] = self.voxel_size return props + @property + def size(self): + return self.array.size + @property def slices(self) -> tuple: """ diff --git a/chunkflow/flow/neuroglancer.py b/chunkflow/flow/neuroglancer.py index f4920142..d9d20c5d 100644 --- a/chunkflow/flow/neuroglancer.py +++ b/chunkflow/flow/neuroglancer.py @@ -55,7 +55,7 @@ def _append_synapse_annotation_layer(self, viewer_state: ng.viewer_state.ViewerS viewer_state.layers.append( name=name, layer=ng.LocalAnnotationLayer( - dimensions=ng.CartesianSpace(names=['z', 'y', 'x'], units="nm", scales=(1,1,1)), + dimensions=ng.CoordinateSpace(names=['z', 'y', 'x'], units="nm", scales=(1,1,1)), annotation_properties=[ ng.AnnotationPropertySpec( id='color', @@ -94,7 +94,7 @@ def _append_point_annotation_layer(self, viewer_state: ng.viewer_state.ViewerSta viewer_state.layers.append( name=name, layer=ng.LocalAnnotationLayer( - dimensions=ng.CartesianSpace(names=['z', 'y', 'x'], units="nm", scales=(1, 1, 1)), + dimensions=ng.CoordinateSpace(names=['z', 'y', 'x'], units="nm", scales=(1, 1, 1)), annotation_properties=[ ng.AnnotationPropertySpec( id='color', @@ -119,7 +119,7 @@ def _append_point_annotation_layer(self, viewer_state: ng.viewer_state.ViewerSta def _append_image_layer(self, viewer_state: ng.viewer_state.ViewerState, chunk_name: str, chunk: Chunk): voxel_size = self._get_voxel_size(chunk) - dimensions = ng.CartesianSpace( + dimensions = ng.CoordinateSpace( scales=voxel_size, units=['nm', 'nm', 'nm'], names=['z', 'y', 'x'] @@ -149,7 +149,7 @@ def _append_segmentation_layer(self, viewer_state: ng.viewer_state.ViewerState, assert chunk.min() >= 0 chunk = chunk.astype(np.uint64) voxel_size = self._get_voxel_size(chunk) - dimensions = ng.CartesianSpace( + dimensions = ng.CoordinateSpace( scales=voxel_size, units=['nm', 'nm', 'nm'], names=['z', 'y', 'x'] @@ -191,7 +191,7 @@ def _append_probability_map_layer(self, viewer_state: ng.viewer_state.ViewerStat toNormalized(getDataValue(2)))); } """ - dimensions = ng.CartesianSpace( + dimensions = ng.CoordinateSpace( scales=(1, ) + voxel_size, units=['', 'nm', 'nm', 'nm'], names=['c^', 'z', 'y', 'x'] diff --git a/chunkflow/flow/read_precomputed.py b/chunkflow/flow/read_precomputed.py index 64522d17..d4e21956 100644 --- a/chunkflow/flow/read_precomputed.py +++ b/chunkflow/flow/read_precomputed.py @@ -55,6 +55,7 @@ def __init__(self, mip=self.mip, cache=False, green_threads=True) + #parallel=True, def __call__(self, output_bbox: BoundingBox): # if we do not clone this bounding box, diff --git a/chunkflow/flow/write_precomputed.py b/chunkflow/flow/write_precomputed.py index 425c9bf6..f5badaa8 100644 --- a/chunkflow/flow/write_precomputed.py +++ b/chunkflow/flow/write_precomputed.py @@ -46,6 +46,7 @@ def __init__(self, cache=False, green_threads=True, progress=True) + #parallel=True, if upload_log: log_path = os.path.join(volume_path, 'log')