Skip to content

Commit c4f2b91

Browse files
committed
Fixed data type for MoBIE
1 parent caba462 commit c4f2b91

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flamingo_tools/segmentation/sgn_detection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def sgn_detection(
6666
output = open_file(segmentation_path, mode="a")
6767
segmentation_key = "segmentation"
6868
output_dataset = output.create_dataset(
69-
segmentation_key, shape=shape, dtype=input_.dtype,
69+
segmentation_key, shape=shape, dtype=np.uint64,
7070
chunks=chunks, compression="gzip"
7171
)
7272

@@ -80,7 +80,7 @@ def add_halo_segm(detection_index):
8080
block_end = [round(c) + spot_radius for c in coord]
8181
volume_index = tuple(slice(beg, end) for beg, end in zip(block_begin, block_end))
8282
with lock:
83-
output_dataset[volume_index] = detection_index + 1
83+
output_dataset[volume_index] = int(detection_index) + 1
8484

8585
# Limit the number of cores for parallelization.
8686
n_threads = min(16, mp.cpu_count())

0 commit comments

Comments
 (0)