Skip to content
Snippets Groups Projects

Correct error when trying to extract a single channel from a PatchStack

Merged Christopher Randolph Rhodes requested to merge patch_stack_one_channel into staging
2 files
+ 22
0
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -308,6 +308,13 @@ class PatchStack(InMemoryDataAccessor):
else:
tifffile.imwrite(fpath, tzcyx, imagej=True)
def get_one_channel_data(self, channel: int, mip: bool = False):
c = int(channel)
if mip:
return PatchStack(self.pyxcz[:, :, :, c:(c + 1), :].max(axis=-1, keepdims=True))
else:
return PatchStack(self.pyxcz[:, :, :, c:(c + 1), :])
@property
def shape_dict(self):
return dict(zip(('P', 'Y', 'X', 'C', 'Z'), self.data.shape))
Loading