def filter_icc(icc, mask=None, thr=<NUM_LIT:2>, zscore=True, mode="<STR_LIT:+>"):
if zscore:<EOL><INDENT>icc_filt = thr_img(icc_img_to_zscore(icc), thr=thr, mode=mode)<EOL><DEDENT>else:<EOL><INDENT>icc_filt = thr_img(icc, thr=thr, mode=mode)<EOL><DEDENT>if mask is not None:<EOL><INDENT>icc_filt = apply_mask(icc_filt, mask)<EOL><DEDENT>return icc_filt<EOL>
Threshold then mask an IC correlation map.
    Parameters
    ----------
    icc: img-like
        The 'raw' ICC map.

    mask: img-like
        If not None. Will apply this masks in the end of the process.

    thr: float
        The threshold value.

    zscore: bool
        If True will calculate the z-score of the ICC before thresholding.

    mode: str
        Choices: '+' for positive threshold,
                 '+-' for positive and negative threshold and
                 '-' for negative threshold.

    Returns
    -------
    icc_filt: nibabel.NiftiImage
        Thresholded and masked ICC.