# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.interfaces.slicer.registration.brainsfit import BRAINSFit
def test_BRAINSFit_inputs():
    input_map = dict(initialTransform=dict(argstr='--initialTransform %s',
    ),
    permitParameterVariation=dict(argstr='--permitParameterVariation %s',
    sep=',',
    ),
    costFunctionConvergenceFactor=dict(argstr='--costFunctionConvergenceFactor %f',
    ),
    medianFilterSize=dict(argstr='--medianFilterSize %s',
    sep=',',
    ),
    backgroundFillValue=dict(argstr='--backgroundFillValue %f',
    ),
    relaxationFactor=dict(argstr='--relaxationFactor %f',
    ),
    translationScale=dict(argstr='--translationScale %f',
    ),
    bsplineTransform=dict(hash_files=False,
    argstr='--bsplineTransform %s',
    ),
    numberOfMatchPoints=dict(argstr='--numberOfMatchPoints %d',
    ),
    numberOfIterations=dict(argstr='--numberOfIterations %s',
    sep=',',
    ),
    histogramMatch=dict(argstr='--histogramMatch ',
    ),
    failureExitCode=dict(argstr='--failureExitCode %d',
    ),
    NEVER_USE_THIS_FLAG_IT_IS_OUTDATED_02=dict(argstr='--NEVER_USE_THIS_FLAG_IT_IS_OUTDATED_02 ',
    ),
    maskProcessingMode=dict(argstr='--maskProcessingMode %s',
    ),
    maskInferiorCutOffFromCenter=dict(argstr='--maskInferiorCutOffFromCenter %f',
    ),
    NEVER_USE_THIS_FLAG_IT_IS_OUTDATED_01=dict(argstr='--NEVER_USE_THIS_FLAG_IT_IS_OUTDATED_01 ',
    ),
    reproportionScale=dict(argstr='--reproportionScale %f',
    ),
    skewScale=dict(argstr='--skewScale %f',
    ),
    NEVER_USE_THIS_FLAG_IT_IS_OUTDATED_00=dict(argstr='--NEVER_USE_THIS_FLAG_IT_IS_OUTDATED_00 ',
    ),
    fixedVolume=dict(argstr='--fixedVolume %s',
    ),
    costMetric=dict(argstr='--costMetric %s',
    ),
    useCachingOfBSplineWeightsMode=dict(argstr='--useCachingOfBSplineWeightsMode %s',
    ),
    useScaleSkewVersor3D=dict(argstr='--useScaleSkewVersor3D ',
    ),
    useExplicitPDFDerivativesMode=dict(argstr='--useExplicitPDFDerivativesMode %s',
    ),
    outputTransform=dict(hash_files=False,
    argstr='--outputTransform %s',
    ),
    useBSpline=dict(argstr='--useBSpline ',
    ),
    fixedVolumeTimeIndex=dict(argstr='--fixedVolumeTimeIndex %d',
    ),
    promptUser=dict(argstr='--promptUser ',
    ),
    environ=dict(nohash=True,
    usedefault=True,
    ),
    linearTransform=dict(hash_files=False,
    argstr='--linearTransform %s',
    ),
    maxBSplineDisplacement=dict(argstr='--maxBSplineDisplacement %f',
    ),
    numberOfHistogramBins=dict(argstr='--numberOfHistogramBins %d',
    ),
    outputMovingVolumeROI=dict(hash_files=False,
    argstr='--outputMovingVolumeROI %s',
    ),
    ignore_exception=dict(nohash=True,
    usedefault=True,
    ),
    outputVolume=dict(hash_files=False,
    argstr='--outputVolume %s',
    ),
    projectedGradientTolerance=dict(argstr='--projectedGradientTolerance %f',
    ),
    movingVolume=dict(argstr='--movingVolume %s',
    ),
    fixedBinaryVolume=dict(argstr='--fixedBinaryVolume %s',
    ),
    args=dict(argstr='%s',
    ),
    splineGridSize=dict(argstr='--splineGridSize %s',
    sep=',',
    ),
    initializeTransformMode=dict(argstr='--initializeTransformMode %s',
    ),
    movingBinaryVolume=dict(argstr='--movingBinaryVolume %s',
    ),
    outputVolumePixelType=dict(argstr='--outputVolumePixelType %s',
    ),
    terminal_output=dict(mandatory=True,
    nohash=True,
    ),
    numberOfThreads=dict(argstr='--numberOfThreads %d',
    ),
    writeTransformOnFailure=dict(argstr='--writeTransformOnFailure ',
    ),
    debugLevel=dict(argstr='--debugLevel %d',
    ),
    useScaleVersor3D=dict(argstr='--useScaleVersor3D ',
    ),
    minimumStepLength=dict(argstr='--minimumStepLength %s',
    sep=',',
    ),
    transformType=dict(argstr='--transformType %s',
    sep=',',
    ),
    scaleOutputValues=dict(argstr='--scaleOutputValues ',
    ),
    useAffine=dict(argstr='--useAffine ',
    ),
    gui=dict(argstr='--gui ',
    ),
    ROIAutoDilateSize=dict(argstr='--ROIAutoDilateSize %f',
    ),
    numberOfSamples=dict(argstr='--numberOfSamples %d',
    ),
    interpolationMode=dict(argstr='--interpolationMode %s',
    ),
    maximumStepLength=dict(argstr='--maximumStepLength %f',
    ),
    forceMINumberOfThreads=dict(argstr='--forceMINumberOfThreads %d',
    ),
    strippedOutputTransform=dict(hash_files=False,
    argstr='--strippedOutputTransform %s',
    ),
    movingVolumeTimeIndex=dict(argstr='--movingVolumeTimeIndex %d',
    ),
    ROIAutoClosingSize=dict(argstr='--ROIAutoClosingSize %f',
    ),
    useRigid=dict(argstr='--useRigid ',
    ),
    outputFixedVolumeROI=dict(hash_files=False,
    argstr='--outputFixedVolumeROI %s',
    ),
    removeIntensityOutliers=dict(argstr='--removeIntensityOutliers %f',
    ),
    )
    inputs = BRAINSFit.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_BRAINSFit_outputs():
    output_map = dict(outputVolume=dict(),
    bsplineTransform=dict(),
    outputTransform=dict(),
    outputFixedVolumeROI=dict(),
    strippedOutputTransform=dict(),
    outputMovingVolumeROI=dict(),
    linearTransform=dict(),
    )
    outputs = BRAINSFit.output_spec()

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