@@ -360,32 +360,35 @@ else:
360
360
name = "register" )
361
361
reg .inputs .fixed_image = IMAGE
362
362
reg .inputs .moving_image = T1s [:N ]
363
- reg .inputs .output_transform_prefix = "output_"
364
- reg .inputs .transforms = ['Rigid' , 'Affine' , 'SyN' ]
365
- reg .inputs .transform_parameters = [(0.1 ,), (0.1 ,), (0.2 , 3.0 , 0.0 )]
366
- reg .inputs .number_of_iterations = [[10000 , 11110 , 11110 ]] * 2 + [[
367
- 100 , 30 , 20
368
- ]]
363
+
364
+ # mimic fmriprep's T1 - MNI registration
369
365
reg .inputs .dimension = 3
370
- reg .inputs .write_composite_transform = True
371
- reg .inputs .collapse_output_transforms = True
372
- reg .inputs .initial_moving_transform_com = True
373
- reg .inputs .metric = ['Mattes' ] * 2 + [['Mattes' , 'CC' ]]
374
- reg .inputs .metric_weight = [1 ] * 2 + [[0.5 , 0.5 ]]
375
- reg .inputs .radius_or_number_of_bins = [32 ] * 2 + [[32 , 4 ]]
376
- reg .inputs .sampling_strategy = ['Regular' ] * 2 + [[None , None ]]
377
- reg .inputs .sampling_percentage = [0.3 ] * 2 + [[None , None ]]
378
- reg .inputs .convergence_threshold = [1.e-8 ] * 2 + [- 0.01 ]
379
- reg .inputs .convergence_window_size = [20 ] * 2 + [5 ]
380
- reg .inputs .smoothing_sigmas = [[4 , 2 , 1 ]] * 2 + [[1 , 0.5 , 0 ]]
381
- reg .inputs .sigma_units = ['vox' ] * 3
382
- reg .inputs .shrink_factors = [[3 , 2 , 1 ]] * 2 + [[4 , 2 , 1 ]]
383
- reg .inputs .use_estimate_learning_rate_once = [True ] * 3
384
- reg .inputs .use_histogram_matching = [False ] * 2 + [True ]
385
- reg .inputs .winsorize_lower_quantile = 0.005
366
+ reg .inputs .convergence_threshold = [1e-06 , 1e-06 , 1e-06 ]
367
+ reg .inputs .convergence_window_size = [20 , 20 , 10 ]
368
+ reg .inputs .metric = ["Mattes" , "Mattes" , "CC" ]
369
+ reg .inputs .metric_weight = [1 , 1 , 1 ]
370
+ reg .inputs .radius_or_number_of_bins = [56 , 56 , 4 ]
371
+ reg .inputs .transforms = ["Rigid" , "Affine" , "SyN" ]
372
+ reg .inputs .transform_parameters = [(0.05 ,), (0.08 ,), (0.1 , 3.0 , 0.0 )]
373
+ reg .inputs .number_of_iterations = [[100 , 100 ], [100 , 100 ], [100 , 70 , 50 , 20 ]]
374
+ reg .inputs .sampling_strategy = ["Regular" , "Regular" , "None" ]
375
+ reg .inputs .sampling_percentage = [0.25 , 0.25 , 1 ]
376
+ reg .inputs .smoothing_sigmas = [[2 , 1 ], [1 , 0 ], [3 , 2 , 1 , 0 ]]
377
+ reg .inputs .sigma_units = ["vox" , "vox" , "vox" ]
378
+ reg .inputs .shrink_factors = [[2 , 1 ], [2 , 1 ], [8 , 4 , 2 , 1 ]]
386
379
reg .inputs .winsorize_upper_quantile = 0.995
380
+ reg .inputs .winsorize_lower_quantile = 0.005
381
+ reg .inputs .use_estimate_learning_rate_once = [True , True , True ]
382
+ reg .inputs .use_histogram_matching = [True , True , True ]
383
+ reg .inputs .collapse_output_transforms = True
384
+ reg .inputs .write_composite_transform = True
385
+ reg .inputs .output_transform_prefix = "output_"
386
+ reg .inputs .output_warped_image = True
387
+ reg .inputs .output_warped_image = "output_warped_image.nii.gz"
388
+ reg .inputs .interpolation = "LanczosWindowedSinc"
387
389
reg .inputs .float = True
388
- reg .inputs .output_warped_image = 'output_warped_image.nii.gz'
390
+ reg .inputs .initial_moving_transform_com = 0
391
+
389
392
if args .num_threads and args .num_threads > 1 :
390
393
reg .inputs .num_threads = args .num_threads
391
394
0 commit comments