Skip to content

Commit

Permalink
Fix writing image location
Browse files Browse the repository at this point in the history
  • Loading branch information
anwai98 committed Nov 19, 2024
1 parent 83a3595 commit e54fe46
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions test/test_sam_annotator/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ def test_image_series_annotator(self):
def test_precompute_embeddings(self):
self._test_command("micro_sam.precompute_embeddings")

# Create 1 image as testdata.
im_path = os.path.join(self.tmp_folder, "image.tif")
image_data = binary_blobs(512).astype("uint8") * 255
imageio.imwrite(im_path, image_data)
# Create 2 images as testdata.
n_images = 2
for i in range(n_images):
im_path = os.path.join(self.tmp_folder, f"image-{i}.tif")
image_data = binary_blobs(512).astype("uint8") * 255
imageio.imwrite(im_path, image_data)

# Test precomputation with a single image.
emb_path1 = os.path.join(self.tmp_folder, "embedddings1.zarr")
Expand Down Expand Up @@ -86,12 +88,10 @@ def test_precompute_embeddings(self):
def test_automatic_segmentation(self):
self._test_command("micro_sam.automatic_segmentation")

# Create 2 images as testdata.
n_images = 2
for i in range(n_images):
im_path = os.path.join(self.tmp_folder, f"image-{i}.tif")
image_data = binary_blobs(512).astype("uint8") * 255
imageio.imwrite(im_path, image_data)
# Create 1 image as testdata.
im_path = os.path.join(self.tmp_folder, "image.tif")
image_data = binary_blobs(512).astype("uint8") * 255
imageio.imwrite(im_path, image_data)

out_path = "output.tif"

Expand Down

0 comments on commit e54fe46

Please sign in to comment.