--- estimator.py.orig 2026-10-18 21:11:40.050259152 -0400 +++ estimator.py 2026-10-18 21:13:03.554800501 -0400 @@ -223,7 +223,15 @@ else: dataset_length = len(dataset) - self._start_index - with TemporaryDirectory() as tmp_dir: + import contextlib + import os + + _keep = os.environ.get("NIFREEZE_KEEP_DIR") + if _keep: + Path(_keep).mkdir(parents=True, exist_ok=True) + with ( + contextlib.nullcontext(_keep) if _keep else TemporaryDirectory() + ) as tmp_dir: print(f"Processing in <{tmp_dir}>") ptmp_dir = Path(tmp_dir) @@ -270,6 +278,8 @@ # update dataset.set_transform(i, xform.matrix) + with open(ptmp_dir / "order.txt", "a") as _f: + _f.write(f"{i}\n") pbar.update() return self --- registration/ants.py.orig 2026-10-18 21:11:40.047381430 -0400 +++ registration/ants.py 2026-10-18 21:13:03.555341791 -0400 @@ -435,6 +435,11 @@ if num_threads: reg_iface.inputs.num_threads = num_threads + import os + + if os.environ.get("NIFREEZE_ANTS_FLOAT") == "1": + reg_iface.inputs.float = True + return reg_iface