Skip to content

Commit

Permalink
Merge pull request #7 from AlexVCaron/update/mrhardiflow
Browse files Browse the repository at this point in the history
Sync with mrhardiflow
  • Loading branch information
AlexVCaron authored Aug 5, 2024
2 parents 0327bb1 + e6c4dcd commit 9442e80
Show file tree
Hide file tree
Showing 24 changed files with 1,225 additions and 980 deletions.
48 changes: 37 additions & 11 deletions .config/b0_to_template_affine_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

c.AntsRegistration.log_level = 30

c.AntsRegistration.init_with_ants_ai = True
c.AntsRegistration.init_with_ants_ai = False

c.AntsRegistration.base_config_file = ""

Expand All @@ -24,6 +24,10 @@
# AntsConfiguration(mrHARDIConfigurable) configuration
# -----------------------------------------------------------------------------

c.AntsConfiguration.coarse_angular_split = 3

c.AntsConfiguration.fine_angular_split = 4

c.AntsConfiguration.accross_modalities = True

c.AntsConfiguration.dimension = 3
Expand All @@ -39,20 +43,31 @@
c.AntsConfiguration.match_histogram = False

c.AntsConfiguration.passes = [{
"conv_eps": 1e-5,
"conv_eps": 1e-7,
"conv_max_iter": [400, 200, 100, 50],
"conv_win": 20,
"grad_step": 0.1,
"grad_step": 0.05,
"klass": "mrHARDI.traits.ants.AntsRigid",
"metrics": [
{
"target_index": 0,
"moving_index": 0,
"args": [
0.75,
128,
"Regular",
1.
],
"klass": "mrHARDI.traits.ants.MetricMI"
},
{
"target_index": 0,
"moving_index": 1,
"args": [
1.,
64,
0.25,
128,
"Regular",
0.7,
1.,
True
],
"klass": "mrHARDI.traits.ants.MetricMI"
Expand All @@ -71,20 +86,31 @@
0
]
}, {
"conv_eps": 1e-5,
"conv_eps": 1e-7,
"conv_max_iter": [500, 300, 150, 75],
"conv_win": 10,
"grad_step": 0.1,
"grad_step": 0.05,
"klass": "mrHARDI.traits.ants.AntsAffine",
"metrics": [
{
"target_index": 0,
"moving_index": 0,
"args": [
0.75,
128,
"Regular",
1.
],
"klass": "mrHARDI.traits.ants.MetricMI"
},
{
"target_index": 0,
"moving_index": 1,
"args": [
1.,
64,
0.25,
128,
"Regular",
0.8,
1.,
True
],
"klass": "mrHARDI.traits.ants.MetricMI"
Expand Down
64 changes: 17 additions & 47 deletions .config/b0_to_template_syn_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@
c.AntsConfiguration.match_histogram = False

c.AntsConfiguration.passes = [{
"conv_eps": 1e-5,
"conv_max_iter": [100, 50, 20, 10, 10],
"conv_eps": 1e-7,
"conv_max_iter": [200, 200, 140, 100, 40],
"conv_win": 10,
"grad_step": 0.2,
"grad_step": 0.05,
"var_penality": 3,
"var_total": 0,
"var_total": 3,
"klass": "mrHARDI.traits.ants.AntsSyN",
"metrics": [
{
"target_index": 0,
"moving_index": 1,
"moving_index": 0,
"args": [
0.65,
64,
Expand All @@ -54,73 +54,43 @@
],
"klass": "mrHARDI.traits.ants.MetricMI"
},
{
"target_index": 0,
"moving_index": 2,
"args": [
0.35,
2,
"Regular",
1.
],
"klass": "mrHARDI.traits.ants.MetricCC"
}
],
"shrinks": [
12,
8,
4,
2,
1
],
"smoothing": [
3.,
1.5,
1.,
0.5,
0
]
}, {
"conv_eps": 1e-5,
"conv_max_iter": [50, 20, 20],
"conv_win": 20,
"grad_step": 0.1,
"var_penality": 3,
"var_total": 0,
"klass": "mrHARDI.traits.ants.AntsSyN",
"metrics": [
{
"target_index": 0,
"moving_index": 1,
"args": [
0.65,
0.15,
64,
"Regular",
1.
1.,
True
],
"klass": "mrHARDI.traits.ants.MetricMI"
},
{
"target_index": 0,
"moving_index": 2,
"args": [
0.35,
2,
0.20,
4,
"Regular",
1.
],
"klass": "mrHARDI.traits.ants.MetricCC"
}
],
"shrinks": [
8,
10,
6,
4,
2,
1
],
"smoothing": [
1.5,
5.,
3.,
2.,
1.,
0
0.
]
}]

Expand Down
10 changes: 5 additions & 5 deletions .config/dwi_n4_normalization_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@

# -----------------------------------------------------------------------------
# N4BiasCorrectionConfiguration(mrHARDIConfigurable) configuration
c.N4BiasCorrectionConfiguration.bins = 150
c.N4BiasCorrectionConfiguration.bins = 200

c.N4BiasCorrectionConfiguration.filter_width = 0.075
c.N4BiasCorrectionConfiguration.filter_width = 0.60

c.N4BiasCorrectionConfiguration.spline_order = 3

c.N4BiasCorrectionConfiguration.knot_distance = 64.0
c.N4BiasCorrectionConfiguration.nvox_between_knots = 7.0

c.N4BiasCorrectionConfiguration.iterations = [100, 100, 50, 30]
c.N4BiasCorrectionConfiguration.iterations = [300, 300, 150, 75, 40]

c.N4BiasCorrectionConfiguration.noise = 0.01

c.N4BiasCorrectionConfiguration.rescale = True

c.N4BiasCorrectionConfiguration.shrink = 2
c.N4BiasCorrectionConfiguration.shrink = 4

c.N4BiasCorrectionConfiguration.threshold = 1E-8

Expand Down
8 changes: 5 additions & 3 deletions .config/dwi_n4_normalization_quick_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
# N4BiasCorrectionConfiguration(mrHARDIConfigurable) configuration
c.N4BiasCorrectionConfiguration.bins = 150

c.N4BiasCorrectionConfiguration.filter_width = 0.075
c.N4BiasCorrectionConfiguration.filter_width = 0.6

c.N4BiasCorrectionConfiguration.knot_distance = 4.0
c.N4BiasCorrectionConfiguration.spline_order = 3

c.N4BiasCorrectionConfiguration.iterations = [300, 150, 75, 40]
c.N4BiasCorrectionConfiguration.nvox_between_knots = 7.0

c.N4BiasCorrectionConfiguration.iterations = [300, 300, 150, 75, 40]

c.N4BiasCorrectionConfiguration.noise = 0.01

Expand Down
64 changes: 32 additions & 32 deletions .config/prepare_topup_base_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,74 +28,74 @@
c.TopupConfiguration.klass = "mrHARDI.config.topup.TopupConfiguration"

c.TopupConfiguration.passes = [{
"warp_resolution": 8.8,
"subsampling": 2,
"blur_fwhm": 3.5,
"n_iter": 100,
"warp_resolution": 25.1,
"subsampling": 4,
"blur_fwhm": 10,
"n_iter": 10,
"estimate_motion": 1,
"minimizer": 0,
"w_reg": 5E-3
}, {
"warp_resolution": 7.1,
"subsampling": 2,
"blur_fwhm": 2.6,
"n_iter": 100,
"warp_resolution": 20.3,
"subsampling": 4,
"blur_fwhm": 7.4,
"n_iter": 10,
"estimate_motion": 1,
"minimizer": 0,
"w_reg": 1e-3
}, {
"warp_resolution": 6.2,
"subsampling": 2,
"blur_fwhm": 1.8,
"n_iter": 100,
"warp_resolution": 17.7,
"subsampling": 4,
"blur_fwhm": 5.1,
"n_iter": 10,
"estimate_motion": 1,
"minimizer": 0,
"w_reg": 1e-4
}, {
"warp_resolution": 5.3,
"subsampling": 2,
"blur_fwhm": 1.3,
"n_iter": 100,
"warp_resolution": 15.1,
"subsampling": 4,
"blur_fwhm": 3.7,
"n_iter": 10,
"estimate_motion": 1,
"minimizer": 0,
"w_reg": 1.5e-5
}, {
"warp_resolution": 4.4,
"warp_resolution": 12.6,
"subsampling": 2,
"blur_fwhm": 1.3,
"n_iter": 100,
"blur_fwhm": 3.7,
"n_iter": 15,
"estimate_motion": 1,
"minimizer": 0,
"w_reg": 5e-6
}, {
"warp_resolution": 2.7,
"subsampling": 1,
"blur_fwhm": 0.9,
"n_iter": 100,
"warp_resolution": 7.7,
"subsampling": 2,
"blur_fwhm": 2.6,
"n_iter": 15,
"estimate_motion": 0,
"minimizer": 1,
"w_reg": 5e-7
}, {
"warp_resolution": 1.7,
"subsampling": 1,
"blur_fwhm": 0.4,
"n_iter": 150,
"warp_resolution": 6.1,
"subsampling": 2,
"blur_fwhm": 1.1,
"n_iter": 20,
"estimate_motion": 0,
"minimizer": 1,
"w_reg": 5e-8
}, {
"warp_resolution": 1.7,
"warp_resolution": 6.1,
"subsampling": 1,
"blur_fwhm": 0.,
"n_iter": 200,
"n_iter": 20,
"estimate_motion": 0,
"minimizer": 1,
"w_reg": 5e-10
}, {
"warp_resolution": 1.5,
"warp_resolution": 6.1,
"subsampling": 1,
"blur_fwhm": 0.,
"n_iter": 400,
"n_iter": 40,
"estimate_motion": 0,
"minimizer": 1,
"w_reg": 1e-11
Expand All @@ -105,7 +105,7 @@

c.TopupConfiguration.reg_model = "bending_energy"

c.TopupConfiguration.scale_intensities = False
c.TopupConfiguration.scale_intensities = True

c.TopupConfiguration.spl_order = "cubic"

Expand Down
10 changes: 5 additions & 5 deletions .config/t1_n4_normalization_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,21 @@
# N4BiasCorrectionConfiguration(mrHARDIConfigurable) configuration
c.N4BiasCorrectionConfiguration.bins = 200

c.N4BiasCorrectionConfiguration.filter_width = 0.075
c.N4BiasCorrectionConfiguration.filter_width = 0.60

c.N4BiasCorrectionConfiguration.spline_order = 3

c.N4BiasCorrectionConfiguration.knot_distance = 16.0
c.N4BiasCorrectionConfiguration.nvox_between_knots = 14.0

c.N4BiasCorrectionConfiguration.iterations = [80, 80, 40, 30]
c.N4BiasCorrectionConfiguration.iterations = [300, 300, 150, 70]

c.N4BiasCorrectionConfiguration.noise = 0.01

c.N4BiasCorrectionConfiguration.rescale = True

c.N4BiasCorrectionConfiguration.shrink = 2
c.N4BiasCorrectionConfiguration.shrink = 4

c.N4BiasCorrectionConfiguration.threshold = 1E-6
c.N4BiasCorrectionConfiguration.threshold = 1E-8

# Base traits configuration

Expand Down
Loading

0 comments on commit 9442e80

Please sign in to comment.