<div><span lang="EN-US"><font size="3" face="Times New Roman">Hi all:</font></span></div>
<div>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">       </span>The following code gives me a very strange result; here, there are 5 ROIs in my maskimg, indexed 1 to 5, respectively. In my mind, the output1 and output2 is right, but output3 is very confusing, why ROI 2 is missing? </font></font></span></p>

<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3"><font face="Times New Roman">The pymvpa I used is ver .5. </font></font></span><span lang="EN-US"><font size="3" face="Times New Roman">Could you please help me find the problem? Thanks in advance.</font></span></p>

<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3" face="Times New Roman"></font></span></p>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3" face="Times New Roman"></font></span> </p>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3" face="Times New Roman">Best </font></span></p>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3" face="Times New Roman"></font></span></p>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3" face="Times New Roman"></font></span> </p>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3" face="Times New Roman">Zonglei</font></span></p>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3" face="Times New Roman"> </font></span></p>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3" face="Times New Roman">attr = SampleAttributes(os.path.join(dpath,attributes))</font></span></p>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3" face="Times New Roman">patimg<span style="mso-spacerun: yes">  </span>= nifti.NiftiImage(os.path.join(dpath,pat))</font></span></p>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3" face="Times New Roman">maskimg = nifti.NiftiImage(os.path.join(dpath,&#39;masks&#39;,fmask)) </font></span></p>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3" face="Times New Roman"></font></span> </p>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3" face="Times New Roman">rois = np.unique(maskimg.getDataArray())</font></span></p>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3" face="Times New Roman">rois = rois[rois!=0]</font></span></p>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3" face="Times New Roman">pirnt rois =&gt; [1, 2, 3, 4,5] # output 1, 5 ROIs, indexed 1 to 5</font></span></p>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3" face="Times New Roman"> </font></span></p>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3" face="Times New Roman"></font></span></p>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3" face="Times New Roman">alldata = fmri_dataset(samples=patimg,targets=attr.targets,</font></span></p>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes">                                </span>chunks=attr.chunks,mask=maskimg)</font></font></span></p>

<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3" face="Times New Roman">zscore(alldata)</font></span></p>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3" face="Times New Roman"> </font></span></p>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3" face="Times New Roman">img = maskimg.copy().getDataArray()</font></span></p>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3" face="Times New Roman">print np.unique(img)<span style="mso-spacerun: yes">  </span>=&gt; [0,1, 2, 3, 4,5] # output 2</font></span></p>
<p style="TEXT-INDENT: 0cm; MARGIN: 0cm 0cm 0pt; mso-char-indent-count: 0" class="MsoNormal"><span lang="EN-US"><font size="3" face="Times New Roman"> </font></span></p>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3" face="Times New Roman">mask = alldata.mapper[:2].forward1(img) # flatten and feature selection</font></span></p>
<p style="MARGIN: 0cm 0cm 0pt" class="MsoNormal"><span lang="EN-US"><font size="3" face="Times New Roman">print np.unique(mask) =&gt; [0,1, 3, 4,5] # output 3, where is ROI 2?</font></span></p></div>