def test_Label2Vol_outputs(): output_map = dict(vol_label_file=dict(), ) outputs = Label2Vol.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_Label2Vol_inputs(): input_map = dict( annot_file=dict( argstr='--annot %s', copyfile=False, mandatory=True, requires=('subject_id', 'hemi'), xor=('label_file', 'annot_file', 'seg_file', 'aparc_aseg'), ), aparc_aseg=dict( argstr='--aparc+aseg', mandatory=True, xor=('label_file', 'annot_file', 'seg_file', 'aparc_aseg'), ), args=dict(argstr='%s', ), environ=dict( nohash=True, usedefault=True, ), fill_thresh=dict(argstr='--fillthresh %.f', ), hemi=dict(argstr='--hemi %s', ), identity=dict( argstr='--identity', xor=('reg_file', 'reg_header', 'identity'), ), ignore_exception=dict( nohash=True, usedefault=True, ), invert_mtx=dict(argstr='--invertmtx', ), label_file=dict( argstr='--label %s...', copyfile=False, mandatory=True, xor=('label_file', 'annot_file', 'seg_file', 'aparc_aseg'), ), label_hit_file=dict(argstr='--hits %s', ), label_voxel_volume=dict(argstr='--labvoxvol %f', ), map_label_stat=dict(argstr='--label-stat %s', ), native_vox2ras=dict(argstr='--native-vox2ras', ), proj=dict( argstr='--proj %s %f %f %f', requires=('subject_id', 'hemi'), ), reg_file=dict( argstr='--reg %s', xor=('reg_file', 'reg_header', 'identity'), ), reg_header=dict( argstr='--regheader %s', xor=('reg_file', 'reg_header', 'identity'), ), seg_file=dict( argstr='--seg %s', copyfile=False, mandatory=True, xor=('label_file', 'annot_file', 'seg_file', 'aparc_aseg'), ), subject_id=dict(argstr='--subject %s', ), subjects_dir=dict(), surface=dict(argstr='--surf %s', ), template_file=dict( argstr='--temp %s', mandatory=True, ), terminal_output=dict(nohash=True, ), vol_label_file=dict( argstr='--o %s', genfile=True, ), ) inputs = Label2Vol.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_Label2Vol_inputs(): input_map = dict(reg_file=dict(xor=('reg_file', 'reg_header', 'identity'), argstr='--reg %s', ), template_file=dict(mandatory=True, argstr='--temp %s', ), surface=dict(argstr='--surf %s', ), label_voxel_volume=dict(argstr='--labvoxvol %f', ), native_vox2ras=dict(argstr='--native-vox2ras', ), vol_label_file=dict(argstr='--o %s', genfile=True, ), subject_id=dict(argstr='--subject %s', ), invert_mtx=dict(argstr='--invertmtx', ), label_hit_file=dict(argstr='--hits %s', ), proj=dict(requires=('subject_id', 'hemi'), argstr='--proj %s %f %f %f', ), reg_header=dict(xor=('reg_file', 'reg_header', 'identity'), argstr='--regheader %s', ), ignore_exception=dict(nohash=True, usedefault=True, ), hemi=dict(argstr='--hemi %s', ), args=dict(argstr='%s', ), map_label_stat=dict(argstr='--label-stat %s', ), terminal_output=dict(mandatory=True, nohash=True, ), seg_file=dict(copyfile=False, mandatory=True, xor=('label_file', 'annot_file', 'seg_file', 'aparc_aseg'), argstr='--seg %s', ), subjects_dir=dict(), fill_thresh=dict(argstr='--fillthresh %.f', ), identity=dict(xor=('reg_file', 'reg_header', 'identity'), argstr='--identity', ), environ=dict(nohash=True, usedefault=True, ), label_file=dict(copyfile=False, xor=('label_file', 'annot_file', 'seg_file', 'aparc_aseg'), mandatory=True, argstr='--label %s...', ), aparc_aseg=dict(xor=('label_file', 'annot_file', 'seg_file', 'aparc_aseg'), mandatory=True, argstr='--aparc+aseg', ), annot_file=dict(copyfile=False, mandatory=True, xor=('label_file', 'annot_file', 'seg_file', 'aparc_aseg'), argstr='--annot %s', requires=('subject_id', 'hemi'), ), ) inputs = Label2Vol.input_spec() for key, metadata in input_map.items(): for metakey, value in metadata.items(): yield assert_equal, getattr(inputs.traits()[key], metakey), value