def test_ANTS_outputs(): output_map = dict(warp_transform=dict(), metaheader=dict(), affine_transform=dict(), metaheader_raw=dict(), inverse_warp_transform=dict(), ) outputs = ANTS.output_spec() for key, metadata in output_map.items(): for metakey, value in metadata.items(): yield assert_equal, getattr(outputs.traits()[key], metakey), value
def test_ANTS_outputs(): output_map = dict( affine_transform=dict(), inverse_warp_transform=dict(), metaheader=dict(), metaheader_raw=dict(), warp_transform=dict(), ) outputs = ANTS.output_spec() for key, metadata in output_map.items(): for metakey, value in metadata.items(): yield assert_equal, getattr(outputs.traits()[key], metakey), value
def test_ANTS_inputs(): input_map = dict( affine_gradient_descent_option=dict(argstr='%s', ), args=dict(argstr='%s', ), delta_time=dict(requires=['number_of_time_steps'], ), dimension=dict( argstr='%d', position=1, usedefault=False, ), environ=dict( nohash=True, usedefault=True, ), fixed_image=dict(mandatory=True, ), gradient_step_length=dict(requires=['transformation_model'], ), ignore_exception=dict( nohash=True, usedefault=True, ), metric=dict(mandatory=True, ), metric_weight=dict(requires=['metric'], ), mi_option=dict( argstr='--MI-option %s', sep='x', ), moving_image=dict( argstr='%s', mandatory=True, ), num_threads=dict( nohash=True, usedefault=True, ), number_of_affine_iterations=dict( argstr='--number-of-affine-iterations %s', sep='x', ), number_of_iterations=dict( argstr='--number-of-iterations %s', sep='x', ), number_of_time_steps=dict(requires=['gradient_step_length'], ), output_transform_prefix=dict( argstr='--output-naming %s', mandatory=True, usedefault=True, ), radius=dict(requires=['metric'], ), regularization=dict(argstr='%s', ), regularization_deformation_field_sigma=dict( requires=['regularization'], ), regularization_gradient_field_sigma=dict(requires=['regularization' ], ), smoothing_sigmas=dict( argstr='--gaussian-smoothing-sigmas %s', sep='x', ), subsampling_factors=dict( argstr='--subsampling-factors %s', sep='x', ), symmetry_type=dict(requires=['delta_time'], ), terminal_output=dict( mandatory=True, nohash=True, ), transformation_model=dict( argstr='%s', mandatory=True, ), use_histogram_matching=dict( argstr='%s', usedefault=True, ), ) inputs = ANTS.input_spec() for key, metadata in input_map.items(): for metakey, value in metadata.items(): yield assert_equal, getattr(inputs.traits()[key], metakey), value
def test_ANTS_inputs(): input_map = dict(regularization_deformation_field_sigma=dict(requires=['regularization'], ), fixed_image=dict(mandatory=True, ), regularization_gradient_field_sigma=dict(requires=['regularization'], ), output_transform_prefix=dict(mandatory=True, argstr='--output-naming %s', usedefault=True, ), moving_image=dict(mandatory=True, argstr='%s', ), radius=dict(requires=['metric'], ), metric_weight=dict(requires=['metric'], ), symmetry_type=dict(requires=['delta_time'], ), regularization=dict(argstr='%s', ), mi_option=dict(sep='x', argstr='--MI-option %s', ), number_of_affine_iterations=dict(sep='x', argstr='--number-of-affine-iterations %s', ), metric=dict(mandatory=True, ), affine_gradient_descent_option=dict(argstr='%s', ), ignore_exception=dict(nohash=True, usedefault=True, ), transformation_model=dict(mandatory=True, argstr='%s', ), gradient_step_length=dict(requires=['transformation_model'], ), args=dict(argstr='%s', ), delta_time=dict(requires=['number_of_time_steps'], ), terminal_output=dict(mandatory=True, nohash=True, ), subsampling_factors=dict(sep='x', argstr='--subsampling-factors %s', ), num_threads=dict(nohash=True, usedefault=True, ), smoothing_sigmas=dict(sep='x', argstr='--gaussian-smoothing-sigmas %s', ), number_of_iterations=dict(sep='x', argstr='--number-of-iterations %s', ), number_of_time_steps=dict(requires=['gradient_step_length'], ), environ=dict(nohash=True, usedefault=True, ), use_histogram_matching=dict(usedefault=True, argstr='%s', ), dimension=dict(position=1, usedefault=False, argstr='%d', ), ) inputs = ANTS.input_spec() for key, metadata in input_map.items(): for metakey, value in metadata.items(): yield assert_equal, getattr(inputs.traits()[key], metakey), value