Skip to content
Snippets Groups Projects

Updates for TREC pipelines

Merged Christopher Randolph Rhodes requested to merge int_trec into staging
4 files
+ 32
17
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -77,14 +77,14 @@ class GenericImageDataAccessor(ABC):
return self.data.sum(axis=(0, 1, 2))
@property
def data_xy(self) -> np.ndarray:
def data_yx(self) -> np.ndarray:
if not self.chroma == 1 and self.nz == 1:
raise InvalidDataShape('Can only return XY array from accessors with a single channel and single z-level')
else:
return self.data[:, :, 0, 0]
@property
def data_xyz(self) -> np.ndarray:
def data_yxz(self) -> np.ndarray:
if not self.chroma == 1:
raise InvalidDataShape('Can only return XYZ array from accessors with a single channel')
else:
@@ -428,6 +428,20 @@ class PatchStack(InMemoryDataAccessor):
def count(self):
return self.shape_dict['P']
@property
def data_yx(self) -> np.ndarray:
if not self.chroma == 1 and self.nz == 1:
raise InvalidDataShape('Can only return XY array from accessors with a single channel and single z-level')
else:
return self.data[:, :, :, 0, 0]
@property
def data_yxz(self) -> np.ndarray:
if not self.chroma == 1:
raise InvalidDataShape('Can only return XYZ array from accessors with a single channel')
else:
return self.data[:, :, :, 0, :]
def export_pyxcz(self, fpath: Path):
tzcyx = np.moveaxis(
self.pyxcz, # yxcz
Loading