File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,12 +42,17 @@ def main(argv=None) -> None:
4242 # Open the data with the given file path
4343 dataset : BaseDataset = BaseDataset .from_filename (args .input_file )
4444
45- estimator : Estimator = Estimator ()
45+ prev_model : Estimator | None = None
46+ for model in args .models :
47+ estimator : Estimator = Estimator (
48+ args .model ,
49+ prev = prev_model ,
50+ )
51+ prev_model = estimator
4652
4753 _ = estimator .run (
4854 dataset ,
4955 align_kwargs = args .align_config ,
50- models = args .models ,
5156 omp_nthreads = args .nthreads ,
5257 njobs = args .njobs ,
5358 seed = args .seed ,
Original file line number Diff line number Diff line change @@ -130,7 +130,6 @@ def _prepare_registration_data(
130130
131131 """
132132 clip = clip or "none"
133-
134133 predicted_path = Path (dirname ) / f"predicted_{ vol_idx :05d} .nii.gz"
135134 sample_path = Path (dirname ) / f"sample_{ vol_idx :05d} .nii.gz"
136135 _to_nifti (
@@ -151,7 +150,7 @@ def _prepare_registration_data(
151150 ImageGrid = namedtuple ("ImageGrid" , ("shape" , "affine" ))
152151 reference = ImageGrid (shape = sample .shape [:3 ], affine = affine )
153152 initial_xform = Affine (matrix = init_affine , reference = reference )
154- init_path = dirname / f"init_{ vol_idx :05d} .mat"
153+ init_path = Path ( dirname ) / f"init_{ vol_idx :05d} .mat"
155154 initial_xform .to_filename (init_path , fmt = "itk" )
156155
157156 return predicted_path , sample_path , init_path
You can’t perform that action at this time.
0 commit comments