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):
114
114
""" ,
115
115
)
116
116
initial_moving_transform = File (exists = True , desc = 'transform for initialization' )
117
+ use_histogram_matching = traits .Bool (desc = 'determine use of histogram matching' )
117
118
float = traits .Bool (False , usedefault = True , desc = 'use single precision calculations' )
118
119
119
120
@@ -196,6 +197,15 @@ def _run_interface(self, runtime):
196
197
NIWORKFLOWS_LOG .info ('Loading settings from file %s.' , ants_settings )
197
198
# Configure an ANTs run based on these settings.
198
199
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
199
209
self .norm .resource_monitor = False
200
210
self .norm .terminal_output = self .terminal_output
201
211
You can’t perform that action at this time.
0 commit comments