use max size of all images in stack
This commit is contained in:
parent
b5ed1101b4
commit
058a0f1c0a
|
@ -231,9 +231,7 @@ class ChainPipeline:
|
|||
)
|
||||
|
||||
metadata = stage_sources.metadata
|
||||
stage_sources = StageResult(
|
||||
images=stage_results, metadata=metadata
|
||||
)
|
||||
stage_sources = StageResult(images=stage_results, metadata=metadata)
|
||||
else:
|
||||
logger.debug(
|
||||
"image does not contain sources and is within tile size of %s, running stage",
|
||||
|
|
|
@ -327,10 +327,14 @@ class StageResult:
|
|||
|
||||
def size(self) -> Size:
|
||||
if self.images is not None:
|
||||
return Size(self.images[0].width, self.images[0].height)
|
||||
return Size(
|
||||
max([image.width for image in self.images]),
|
||||
max([image.height for image in self.images]),
|
||||
)
|
||||
elif self.arrays is not None:
|
||||
return Size(
|
||||
self.arrays[0].shape[0], self.arrays[0].shape[1]
|
||||
max([array.shape[0] for array in self.arrays]),
|
||||
max([array.shape[1] for array in self.arrays]),
|
||||
) # TODO: which fields within the shape are width/height?
|
||||
else:
|
||||
return Size(0, 0)
|
||||
|
|
Loading…
Reference in New Issue