# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.interfaces.spm.preprocess import VBMSegment
def test_VBMSegment_inputs():
    input_map = dict(csf_dartel=dict(field='estwrite.output.CSF.dartel',
    usedefault=True,
    ),
    csf_modulated_normalized=dict(field='estwrite.output.CSF.modulated',
    usedefault=True,
    ),
    cleanup_partitions=dict(field='estwrite.extopts.cleanup',
    usedefault=True,
    ),
    gm_dartel=dict(field='estwrite.output.GM.dartel',
    usedefault=True,
    ),
    use_v8struct=dict(min_ver='8',
    usedefault=True,
    ),
    dartel_template=dict(field='estwrite.extopts.dartelwarp.normhigh.darteltpm',
    ),
    warping_regularization=dict(field='estwrite.opts.warpreg',
    usedefault=True,
    ),
    use_sanlm_denoising_filter=dict(field='estwrite.extopts.sanlm',
    usedefault=True,
    ),
    matlab_cmd=dict(),
    csf_normalized=dict(field='estwrite.output.CSF.warped',
    usedefault=True,
    ),
    pve_label_dartel=dict(field='estwrite.output.label.dartel',
    usedefault=True,
    ),
    bias_corrected_normalized=dict(field='estwrite.output.bias.warped',
    usedefault=True,
    ),
    paths=dict(),
    sampling_distance=dict(field='estwrite.opts.samp',
    usedefault=True,
    ),
    wm_native=dict(field='estwrite.output.WM.native',
    usedefault=True,
    ),
    wm_modulated_normalized=dict(field='estwrite.output.WM.modulated',
    usedefault=True,
    ),
    pve_label_native=dict(field='estwrite.output.label.native',
    usedefault=True,
    ),
    bias_corrected_affine=dict(field='estwrite.output.bias.affine',
    usedefault=True,
    ),
    gm_native=dict(field='estwrite.output.GM.native',
    usedefault=True,
    ),
    gm_modulated_normalized=dict(field='estwrite.output.GM.modulated',
    usedefault=True,
    ),
    bias_corrected_native=dict(field='estwrite.output.bias.native',
    usedefault=True,
    ),
    ignore_exception=dict(nohash=True,
    usedefault=True,
    ),
    spatial_normalization=dict(usedefault=True,
    ),
    csf_native=dict(field='estwrite.output.CSF.native',
    usedefault=True,
    ),
    gm_normalized=dict(field='estwrite.output.GM.warped',
    usedefault=True,
    ),
    display_results=dict(field='estwrite.extopts.print',
    usedefault=True,
    ),
    jacobian_determinant=dict(field='estwrite.jacobian.warped',
    usedefault=True,
    ),
    tissues=dict(field='estwrite.tpm',
    ),
    use_mcr=dict(),
    wm_dartel=dict(field='estwrite.output.WM.dartel',
    usedefault=True,
    ),
    bias_regularization=dict(field='estwrite.opts.biasreg',
    usedefault=True,
    ),
    mrf_weighting=dict(field='estwrite.extopts.mrf',
    usedefault=True,
    ),
    bias_fwhm=dict(field='estwrite.opts.biasfwhm',
    usedefault=True,
    ),
    in_files=dict(copyfile=False,
    mandatory=True,
    field='estwrite.data',
    ),
    deformation_field=dict(field='estwrite.output.warps',
    usedefault=True,
    ),
    mfile=dict(usedefault=True,
    ),
    wm_normalized=dict(field='estwrite.output.WM.warped',
    usedefault=True,
    ),
    pve_label_normalized=dict(field='estwrite.output.label.warped',
    usedefault=True,
    ),
    gaussians_per_class=dict(usedefault=True,
    ),
    )
    inputs = VBMSegment.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_VBMSegment_outputs():
    output_map = dict(modulated_class_images=dict(),
    pve_label_registered_images=dict(),
    normalized_class_images=dict(),
    normalized_bias_corrected_images=dict(),
    bias_corrected_images=dict(),
    pve_label_normalized_images=dict(),
    inverse_deformation_field=dict(),
    dartel_input_images=dict(),
    transformation_mat=dict(),
    pve_label_native_images=dict(),
    native_class_images=dict(),
    forward_deformation_field=dict(),
    jacobian_determinant_images=dict(),
    )
    outputs = VBMSegment.output_spec()

    for key, metadata in output_map.items():
        for metakey, value in metadata.items():
            yield assert_equal, getattr(outputs.traits()[key], metakey), value
