Skip to content

Commit ecc3296

Browse files
committed
hcs_stack -> tuple[str,int,int]
1 parent ae89d6a commit ecc3296

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

viscy/data/hcs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def _find_window(self, index: int) -> tuple[ImageArray, int, NormMeta | None]:
201201

202202
def _read_img_window(
203203
self, img: ImageArray, ch_idx: list[int], tz: int
204-
) -> tuple[tuple[Tensor, ...], HCSStackIndex]:
204+
) -> tuple[tuple[Tensor, ...], tuple[str, int, int]]:
205205
"""Read image window as tensor.
206206
207207
Parameters
@@ -215,7 +215,7 @@ def _read_img_window(
215215
216216
Returns
217217
-------
218-
tuple[tuple[Tensor], HCSStackIndex]
218+
tuple[tuple[Tensor], tuple[str, int, int]]
219219
list of (C=1, Z, Y, X) image tensors,
220220
tuple of image name, time index, and Z index
221221
@@ -232,7 +232,7 @@ def _read_img_window(
232232
[int(i) for i in ch_idx],
233233
slice(z, z + self.z_window_size),
234234
].astype(np.float32)
235-
return torch.from_numpy(data).unbind(dim=1), HCSStackIndex(img.name, t, z)
235+
return torch.from_numpy(data).unbind(dim=1), (img.name, t, z)
236236

237237
def __len__(self) -> int:
238238
"""Return total number of sliding windows across all FOVs."""

0 commit comments

Comments
 (0)