Skip to content

Commit

Permalink
add additional log message
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamaedler committed Jun 5, 2024
1 parent b00b7fc commit 28346c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sparcscore/pipeline/segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,7 @@ def calculate_sharding_plan(self, image_size):
def cleanup_shards(self, sharding_plan):
file_identifiers_plots = [".png", ".tif", ".tiff", ".jpg", ".jpeg", ".pdf"]

self.log("Moving generated plots from shard directory to main directory.")
for i, window in enumerate(sharding_plan):
local_shard_directory = os.path.join(self.shard_directory, str(i))
for file in os.listdir(local_shard_directory):
Expand Down Expand Up @@ -945,7 +946,6 @@ def process(self, input_image):

def complete_segmentation(self, input_image):
self.save_zarr = False
self.save_input_image(input_image)
self.shard_directory = os.path.join(self.directory, self.DEFAULT_SHARD_FOLDER)

# check to make sure that the shard directory exisits, if not exit and return error
Expand All @@ -954,6 +954,9 @@ def complete_segmentation(self, input_image):
"No Shard Directory found for the given project. Can not complete a segmentation which has not started. Please rerun the segmentation method."
)

#save input image to segmentation.h5
self.save_input_image(input_image)

# check to see which tiles are incomplete
tile_directories = os.listdir(self.shard_directory)
incomplete_indexes = []
Expand Down

0 comments on commit 28346c4

Please sign in to comment.