Skip to content

Commit b088c3b

Browse files
committed
fix: return numpy-ordered indices when converting from ccf
1 parent 960734a commit b088c3b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/aind_zarr_utils/pipeline_transformed.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1794,11 +1794,12 @@ def ccf_to_indices(
17941794
for point_lps in pipeline_pts:
17951795
# Pipeline anatomical → continuous indices
17961796
# Both ANTs and SimpleITK use LPS points - no conversion needed
1797+
# Convert to numpy ordering `...[::-1]`
17971798
continuous_idx = (
17981799
pipeline_stub.TransformPhysicalPointToContinuousIndex(
17991800
point_lps.astype(np.float64)
18001801
)
1801-
)
1802+
)[::-1]
18021803
ls_indices_layer.append(np.array(continuous_idx))
18031804

18041805
ls_indices[layer] = np.array(ls_indices_layer)

0 commit comments

Comments
 (0)