File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ class _SpatialNormalizationInputSpec(BaseInterfaceInputSpec):
114114 """ ,
115115 )
116116 initial_moving_transform = File (exists = True , desc = 'transform for initialization' )
117+ use_histogram_matching = traits .Bool (desc = 'determine use of histogram matching' )
117118 float = traits .Bool (False , usedefault = True , desc = 'use single precision calculations' )
118119
119120
@@ -196,6 +197,15 @@ def _run_interface(self, runtime):
196197 NIWORKFLOWS_LOG .info ('Loading settings from file %s.' , ants_settings )
197198 # Configure an ANTs run based on these settings.
198199 self .norm = Registration (from_file = ants_settings , ** ants_args )
200+ if isdefined (self .inputs .use_histogram_matching ):
201+ # Most (all?) configuration files use histogram matching, so more important
202+ # to allow disabling, such as in the case of intermodality normalization
203+ NIWORKFLOWS_LOG .info (
204+ 'Overriding (%sabling) histogram matching for file %s' ,
205+ 'en' if self .inputs .use_histogram_matching else 'dis' ,
206+ ants_settings ,
207+ )
208+ self .norm .inputs .use_histogram_matching = self .inputs .use_histogram_matching
199209 self .norm .resource_monitor = False
200210 self .norm .terminal_output = self .terminal_output
201211
You can’t perform that action at this time.
0 commit comments