def _populate_dparams(self, rlevel, tile=None, area=None):
if opj2.OPENJP2 is not None:<EOL><INDENT>dparam = opj2.set_default_decoder_parameters()<EOL><DEDENT>else:<EOL><INDENT>dparam = opj.DecompressionParametersType()<EOL>opj.set_default_decoder_parameters(ctypes.byref(dparam))<EOL><DEDENT>infile = self.filename.encode()<EOL>nelts = opj2.PATH_LEN - len(infile)<EOL>infile += b'<STR_LIT:0>' * nelts<EOL>dparam.infile = infile<EOL>dparam.flags |= <NUM_LIT:1> if self.ignore_pclr_cmap_cdef else <NUM_LIT:0><EOL>dparam.decod_format = self._codec_format<EOL>dparam.cp_layer = self._layer<EOL>if rlevel != <NUM_LIT:0>:<EOL><INDENT>max_rlevel = self.codestream.segment[<NUM_LIT:2>].num_res<EOL>if rlevel == -<NUM_LIT:1>:<EOL><INDENT>rlevel = max_rlevel<EOL><DEDENT>elif rlevel < -<NUM_LIT:1> or rlevel > max_rlevel:<EOL><INDENT>msg = ("<STR_LIT>"<EOL>"<STR_LIT>")<EOL>msg = msg.format(max_rlevel=max_rlevel)<EOL>raise IOError(msg)<EOL><DEDENT><DEDENT>dparam.cp_reduce = rlevel<EOL>if area is not None:<EOL><INDENT>if area[<NUM_LIT:0>] < <NUM_LIT:0> or area[<NUM_LIT:1>] < <NUM_LIT:0> or area[<NUM_LIT:2>] <= <NUM_LIT:0> or area[<NUM_LIT:3>] <= <NUM_LIT:0>:<EOL><INDENT>msg = ("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>")<EOL>msg = msg.format(x0=area[<NUM_LIT:1>], y0=area[<NUM_LIT:0>],<EOL>x1=area[<NUM_LIT:3>], y1=area[<NUM_LIT:2>])<EOL>raise IOError(msg)<EOL><DEDENT>dparam.DA_y0 = area[<NUM_LIT:0>]<EOL>dparam.DA_x0 = area[<NUM_LIT:1>]<EOL>dparam.DA_y1 = area[<NUM_LIT:2>]<EOL>dparam.DA_x1 = area[<NUM_LIT:3>]<EOL><DEDENT>if tile is not None:<EOL><INDENT>dparam.tile_index = tile<EOL>dparam.nb_tile_to_decode = <NUM_LIT:1><EOL><DEDENT>self._dparams = dparam<EOL>
Populate decompression structure with appropriate input parameters.

        Parameters
        ----------
        rlevel : int
            Factor by which to rlevel output resolution.
        area : tuple
            Specifies decoding image area,
            (first_row, first_col, last_row, last_col)
        tile : int
            Number of tile to decode.