Skip to content

Commit

Permalink
fix missing downsampling call
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamaedler committed Dec 17, 2024
1 parent 38302b9 commit 1d09c42
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/scportrait/pipeline/segmentation/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ def _transform_input_image(self, input_image):
values.append(cytosol_channel)

input_image = np.vstack(values)

assert (
input_image.shape[0] == self.N_INPUT_CHANNELS
), f"Number of channels in input image {input_image.shape[0]} does not match the number of channels expected by segmentation method {self.N_INPUT_CHANNELS}."
Expand Down Expand Up @@ -1683,6 +1684,9 @@ def _execute_segmentation(self, input_image):
self._get_downsampling_parameters()
self._calculate_padded_image_size(input_image)

# downsample the image
input_image = self._downsample_image(input_image)

# setup the memory mapped arrays to store the results
self.maps = {
"nucleus_segmentation": tempmmap.array(
Expand Down Expand Up @@ -1899,6 +1903,7 @@ def _execute_segmentation(self, input_image) -> None:
self._get_downsampling_parameters()
self._calculate_padded_image_size(input_image)

#downsample the image
input_image = self._downsample_image(input_image)

# setup the memory mapped arrays to store the results
Expand Down

0 comments on commit 1d09c42

Please sign in to comment.