def loadNiiData(lstNiiFls,<EOL>strPathNiiMask=None,<EOL>strPathNiiFunc=None):
print('<STR_LIT>')<EOL>if strPathNiiMask is not None:<EOL><INDENT>aryMask = nb.load(strPathNiiMask).get_data().astype('<STR_LIT:bool>')<EOL><DEDENT>if strPathNiiFunc is not None:<EOL><INDENT>lstNiiFls = [os.path.join(strPathNiiFunc, i) for i in lstNiiFls]<EOL><DEDENT>aryFunc = []<EOL>for idx, path in enumerate(lstNiiFls):<EOL><INDENT>print('<STR_LIT>' + str(idx+<NUM_LIT:1>))<EOL>niiFunc = nb.load(path).get_data()<EOL>if strPathNiiMask is not None:<EOL><INDENT>aryFunc.append(niiFunc[aryMask, :])<EOL><DEDENT>else:<EOL><INDENT>aryFunc.append(niiFunc)<EOL><DEDENT><DEDENT>aryFunc = np.concatenate(aryFunc, axis=-<NUM_LIT:1>)<EOL>aryFunc = aryFunc.astype('<STR_LIT>')<EOL>return aryFunc<EOL>
load nii data.

        Parameters
        ----------
        lstNiiFls : list, list of str with nii file names
        strPathNiiMask : str, path to nii file with mask (optional)
        strPathNiiFunc : str, parent path to nii files (optional)
        Returns
        -------
        aryFunc : np.array
            Nii data