Skip to content

Commit

Permalink
FuseRunner: fix output shape with multichannel images
Browse files Browse the repository at this point in the history
  • Loading branch information
gmazzamuto committed Jun 9, 2022
1 parent e648033 commit d5f00f8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions zetastitcher/fuse/fuse_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def __init__(self, file_matrix):
self.zmax = None
self.downsample_xy = None
self.output_filename = None
self.channel = -1
self.channel = None
self.compression = 'zlib'

self._is_multichannel = None
Expand All @@ -45,7 +45,6 @@ def debug(self, value):
self.vfv.overlay_debug_enabled = value

@property
@lru_cache()
def is_multichannel(self):
if self.channel is not None:
return False
Expand All @@ -67,6 +66,9 @@ def output_shape(self):
output_shape[-2] /= self.downsample_xy
output_shape[-1] /= self.downsample_xy

if self.vfv.nchannels > 1 and not self.is_multichannel:
del output_shape[1]

return tuple(map(math.ceil, output_shape))

def run(self):
Expand Down

0 comments on commit d5f00f8

Please sign in to comment.