File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
python/ouroboros/pipeline Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,14 @@ def _process(self,
8989 FPShape = FrontProjStack (D = len (tif .pages ), V = tif .pages [0 ].shape [0 ], U = tif .pages [0 ].shape [1 ])
9090 channels = 1 if len (tif .pages [0 ].shape ) < 3 else tif .pages [0 ].shape [- 1 ]
9191
92+ # Make sure the config dimensions match the straightened volume dimensions.
93+ ESShape = FrontProjStack (D = len (slice_rects ), U = np .round (np .linalg .norm (slice_rects [0 ][1 ]- slice_rects [0 ][0 ])),
94+ V = np .round (np .linalg .norm (slice_rects [0 ][3 ]- slice_rects [0 ][0 ])))
95+
96+ if ESShape != FPShape :
97+ raise ValueError ("Straightened volume file does not match sliced shape:\n "
98+ f" ({ FPShape } vs { ESShape } , respectively)." )
99+
92100 cannot_memmap = False
93101 try :
94102 if Path (straightened_volume_path ).is_dir ():
You can’t perform that action at this time.
0 commit comments