Skip to content

Commit 944f6ee

Browse files
Try to fix CI
1 parent b70c121 commit 944f6ee

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

flamingo_tools/measurements.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ def intensity_measures(seg_id):
5454
bb_min = np.array([
5555
row.bb_min_z.item(), row.bb_min_y.item(), row.bb_min_x.item()
5656
]).astype("float32") / resolution
57-
bb_min = np.round(bb_min, 0).astype("uint32")
57+
bb_min = np.round(bb_min, 0).astype("int32")
5858

5959
bb_max = np.array([
6060
row.bb_max_z.item(), row.bb_max_y.item(), row.bb_max_x.item()
6161
]).astype("float32") / resolution
62-
bb_max = np.round(bb_max, 0).astype("uint32")
62+
bb_max = np.round(bb_max, 0).astype("int32")
6363

6464
bb = tuple(
6565
slice(max(bmin - 1, 0), min(bmax + 1, sh))

flamingo_tools/test_data.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ def get_test_volume_and_segmentation(folder: str) -> Tuple[str, str, str]:
1515
"""Download a small volume with nuclei and corresponding segmentation.
1616
1717
Args:
18-
folder:
18+
folder: The test data folder. The data will be downloaded to this folder.
1919
2020
Returns:
21+
The path to the image, stored as tif.
22+
The path to the segmentation, stored as tif.
23+
The path to the segmentation table, stored as tsv.
2124
"""
2225
os.makedirs(folder, exist_ok=True)
2326

@@ -46,7 +49,12 @@ def create_image_data_and_segmentation(folder: str, size: int = 256) -> Tuple[st
4649
"""Create test data containing an image, a corresponding segmentation and segmentation table.
4750
4851
Args:
49-
folder: The test data folder.
52+
folder: The test data folder. The data will be written to this folder.
53+
54+
Returns:
55+
The path to the image, stored as tif.
56+
The path to the segmentation, stored as tif.
57+
The path to the segmentation table, stored as tsv.
5058
"""
5159
os.makedirs(folder, exist_ok=True)
5260
data = binary_blobs(size, n_dim=3).astype("uint8") * 255

0 commit comments

Comments
 (0)