File tree 2 files changed +8
-4
lines changed
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -42,12 +42,17 @@ def main(argv=None) -> None:
42
42
# Open the data with the given file path
43
43
dataset : BaseDataset = BaseDataset .from_filename (args .input_file )
44
44
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
46
52
47
53
_ = estimator .run (
48
54
dataset ,
49
55
align_kwargs = args .align_config ,
50
- models = args .models ,
51
56
omp_nthreads = args .nthreads ,
52
57
njobs = args .njobs ,
53
58
seed = args .seed ,
Original file line number Diff line number Diff line change @@ -130,7 +130,6 @@ def _prepare_registration_data(
130
130
131
131
"""
132
132
clip = clip or "none"
133
-
134
133
predicted_path = Path (dirname ) / f"predicted_{ vol_idx :05d} .nii.gz"
135
134
sample_path = Path (dirname ) / f"sample_{ vol_idx :05d} .nii.gz"
136
135
_to_nifti (
@@ -151,7 +150,7 @@ def _prepare_registration_data(
151
150
ImageGrid = namedtuple ("ImageGrid" , ("shape" , "affine" ))
152
151
reference = ImageGrid (shape = sample .shape [:3 ], affine = affine )
153
152
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"
155
154
initial_xform .to_filename (init_path , fmt = "itk" )
156
155
157
156
return predicted_path , sample_path , init_path
You can’t perform that action at this time.
0 commit comments