def setup_decoder(codec, dparams):
ARGTYPES = [CODEC_TYPE, ctypes.POINTER(DecompressionParametersType)]<EOL>OPENJP2.opj_setup_decoder.argtypes = ARGTYPES<EOL>OPENJP2.opj_setup_decoder.restype = check_error<EOL>OPENJP2.opj_setup_decoder(codec, ctypes.byref(dparams))<EOL>
Wraps openjp2 library function opj_setup_decoder.

    Setup the decoder with decompression parameters.

    Parameters
    ----------
    codec:  CODEC_TYPE
        Codec initialized by create_compress function.
    dparams:  DecompressionParametersType
        Decompression parameters.

    Raises
    ------
    RuntimeError
        If the OpenJPEG library routine opj_setup_decoder fails.