# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ..specialized import BRAINSDemonWarp


def test_BRAINSDemonWarp_inputs():
    input_map = dict(
        args=dict(argstr="%s",),
        arrayOfPyramidLevelIterations=dict(
            argstr="--arrayOfPyramidLevelIterations %s", sep=",",
        ),
        backgroundFillValue=dict(argstr="--backgroundFillValue %d",),
        checkerboardPatternSubdivisions=dict(
            argstr="--checkerboardPatternSubdivisions %s", sep=",",
        ),
        environ=dict(nohash=True, usedefault=True,),
        fixedBinaryVolume=dict(argstr="--fixedBinaryVolume %s", extensions=None,),
        fixedVolume=dict(argstr="--fixedVolume %s", extensions=None,),
        gradient_type=dict(argstr="--gradient_type %s",),
        gui=dict(argstr="--gui ",),
        histogramMatch=dict(argstr="--histogramMatch ",),
        initializeWithDisplacementField=dict(
            argstr="--initializeWithDisplacementField %s", extensions=None,
        ),
        initializeWithTransform=dict(
            argstr="--initializeWithTransform %s", extensions=None,
        ),
        inputPixelType=dict(argstr="--inputPixelType %s",),
        interpolationMode=dict(argstr="--interpolationMode %s",),
        lowerThresholdForBOBF=dict(argstr="--lowerThresholdForBOBF %d",),
        maskProcessingMode=dict(argstr="--maskProcessingMode %s",),
        max_step_length=dict(argstr="--max_step_length %f",),
        medianFilterSize=dict(argstr="--medianFilterSize %s", sep=",",),
        minimumFixedPyramid=dict(argstr="--minimumFixedPyramid %s", sep=",",),
        minimumMovingPyramid=dict(argstr="--minimumMovingPyramid %s", sep=",",),
        movingBinaryVolume=dict(argstr="--movingBinaryVolume %s", extensions=None,),
        movingVolume=dict(argstr="--movingVolume %s", extensions=None,),
        neighborhoodForBOBF=dict(argstr="--neighborhoodForBOBF %s", sep=",",),
        numberOfBCHApproximationTerms=dict(
            argstr="--numberOfBCHApproximationTerms %d",
        ),
        numberOfHistogramBins=dict(argstr="--numberOfHistogramBins %d",),
        numberOfMatchPoints=dict(argstr="--numberOfMatchPoints %d",),
        numberOfPyramidLevels=dict(argstr="--numberOfPyramidLevels %d",),
        numberOfThreads=dict(argstr="--numberOfThreads %d",),
        outputCheckerboardVolume=dict(
            argstr="--outputCheckerboardVolume %s", hash_files=False,
        ),
        outputDebug=dict(argstr="--outputDebug ",),
        outputDisplacementFieldPrefix=dict(
            argstr="--outputDisplacementFieldPrefix %s",
        ),
        outputDisplacementFieldVolume=dict(
            argstr="--outputDisplacementFieldVolume %s", hash_files=False,
        ),
        outputNormalized=dict(argstr="--outputNormalized ",),
        outputPixelType=dict(argstr="--outputPixelType %s",),
        outputVolume=dict(argstr="--outputVolume %s", hash_files=False,),
        promptUser=dict(argstr="--promptUser ",),
        registrationFilterType=dict(argstr="--registrationFilterType %s",),
        seedForBOBF=dict(argstr="--seedForBOBF %s", sep=",",),
        smoothDisplacementFieldSigma=dict(argstr="--smoothDisplacementFieldSigma %f",),
        upFieldSmoothing=dict(argstr="--upFieldSmoothing %f",),
        upperThresholdForBOBF=dict(argstr="--upperThresholdForBOBF %d",),
        use_vanilla_dem=dict(argstr="--use_vanilla_dem ",),
    )
    inputs = BRAINSDemonWarp.input_spec()

    for key, metadata in list(input_map.items()):
        for metakey, value in list(metadata.items()):
            assert getattr(inputs.traits()[key], metakey) == value


def test_BRAINSDemonWarp_outputs():
    output_map = dict(
        outputCheckerboardVolume=dict(extensions=None,),
        outputDisplacementFieldVolume=dict(extensions=None,),
        outputVolume=dict(extensions=None,),
    )
    outputs = BRAINSDemonWarp.output_spec()

    for key, metadata in list(output_map.items()):
        for metakey, value in list(metadata.items()):
            assert getattr(outputs.traits()[key], metakey) == value
