<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">


<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:宋体;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:宋体;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Arial Unicode MS";
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@宋体";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"\@Arial Unicode MS";
        panose-1:2 11 6 4 2 2 2 2 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:宋体;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:宋体;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=ZH-CN link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Dear Thorsten,<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";
color:#1F497D'>         Thank you for your reply. What I have done may be
something curious. I did slice timing, realignment, coregistering, and normalization
using SPM. Then I changed the .img/.hdr pairs (supplied by SPM) into 4D .nii.gz
files which are more suitable for PyMVPA. For SPM, I can check the MNI
coordinates easily. But for PyMVPA, I don’t know how to check the MNI
coordinates. What I got using <b><i>dataset.mapper.getInId()</i></b> is a
coordinate in the voxel space, I think. I wonder how to change them into the
MNI space.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal style='text-align:justify;text-justify:inter-ideograph'><span
lang=EN-US style='font-size:14.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Best wishes!<o:p></o:p></span></p>

<p class=MsoNormal style='text-align:justify;text-justify:inter-ideograph'><span
lang=EN-US style='font-size:14.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal style='text-align:justify;text-justify:inter-ideograph'><span
lang=EN-US style='font-size:14.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>     <i>Lu FENG<o:p></o:p></i></span></p>

<p class=MsoNormal style='text-align:justify;text-justify:inter-ideograph'><span
lang=EN-US style='font-size:14.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>fenglu@fingerpass.net.cn<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> pkg-exppsy-pymvpa-bounces+fenglu=fingerpass.net.cn@lists.alioth.debian.org
[mailto:pkg-exppsy-pymvpa-bounces+fenglu=fingerpass.net.cn@lists.alioth.debian.org]
<b>On Behalf Of </b>Thorsten Kranz<br>
<b>Sent:</b> 2011</span><span style='font-size:10.0pt'>年</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>11</span><span
style='font-size:10.0pt'>月</span><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'>10</span><span style='font-size:10.0pt'>日</span><span
lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> 18:06<br>
<b>To:</b> Development and support pf PyMVPA<br>
<b>Subject:</b> Re: [pymvpa] How to export neighborhood relationships of
NiftiDataset?<o:p></o:p></span></p>

</div>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-US>Hi Lu Feng,<br>
<br>
getting to some voxel-indices to MNI coordinates is a somewhat tricky task.
What you have to do is (assuming you have a EPI-sequence, not structural MRI):<br>
<br>
1) coregister your EPI to a structural image of the same subject<br>
2) normalize the structural image to some standard image, e.g. MNI152T1_2mm as
contained in fsl data<br>
3) apply the concatenated transform EPI->structural an structural->MNI to
the EPI sequence<br>
4) thus you obtain an image that is in "MNI space", e.g. by opening
it in fslview you can find out the MNI coordinates.<br>
<br>
Going to Talairach would be the next step, look at<br>
<br>
<a href="http://imaging.mrc-cbu.cam.ac.uk/imaging/MniTalairach">http://imaging.mrc-cbu.cam.ac.uk/imaging/MniTalairach</a> 
<br>
<br>
for more details.<br>
<br>
But be careful: Talairach is not a 1:1 analogy to MNI, some parts of the
Tal-Brain are much smaller than in MNI. MNI is an average of 152 brains,
Talairach is based on only one example brain.<br>
<br>
You do not have to do steps 3+4, after obtaining the two transforms from EPI to
structural to MNI, you can also manually calculate MNI coordinates from your
voxel coordinates, but I don'T know if you want to do this.<br>
<br>
Greetings,<br>
<br>
Thorsten<br>
<br>
<o:p></o:p></span></p>

<div>

<p class=MsoNormal><span lang=EN-US>2011/11/10 </span>冯璐<span lang=EN-US> <<a
href="mailto:fenglu@fingerpass.net.cn">fenglu@fingerpass.net.cn</a>><o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>... I can't understand your words exactly
... I used SPM before and I didn't have to think about the voxel space and MNI
space, etc. Let's move to some practical problems.<br>
<br>
Loading from<br>
        Task1.nii.gz,<br>
I can get<br>
        dataset.samples which is a M*N*P matrix.<br>
Using<br>
        dataset.mapper.getInId(index),<br>
I can get<br>
        a coordinate [z, y, x], x belongs to (0, M), y
belongs to (0, N), z belongs to (0, P).<br>
I have checked the result above.<br>
<br>
Using<br>
       fslhd Task1.nii.gz,<br>
I can get some information may be useful<br>
       qform_name     Aligned Anat<br>
               qform_code    
2<br>
               qto_xyz:1    
 -3.500000  0.000000  -0.000000  76.000000<br>
               qto_xyz:2    
 0.000000  3.500000  -0.000000  -112.000000<br>
               qto_xyz:3    
 0.000000  0.000000  4.000000  -50.000000<br>
               qto_xyz:4    
 0.000000  0.000000  0.000000  1.000000<br>
               qform_xorient
 Right-to-Left<br>
               qform_yorient
 Posterior-to-Anterior<br>
               qform_zorient
 Inferior-to-Superior<br>
               sform_name    
Aligned Anat<br>
               sform_code    
2<br>
               sto_xyz:1    
 -3.500000  0.000000  0.000000  76.000000<br>
               sto_xyz:2    
 0.000000  3.500000  0.000000  -112.000000<br>
               sto_xyz:3    
 0.000000  0.000000  4.000000  -50.000000<br>
               sto_xyz:4    
 0.000000  0.000000  0.000000  1.000000<br>
               sform_xorient
 Right-to-Left<br>
               sform_yorient
 Posterior-to-Anterior<br>
               sform_zorient  Inferior-to-Superior<br>
<br>
Then, how can I change the coordinate into a MNI coordinate or a Talairach
coordinate?<br>
<br>
Sorry for interruption and thanks in advance.<o:p></o:p></span></p>

<div>

<p class=MsoNormal><span lang=EN-US><br>
Best wishes!<br>
<br>
    Lu FENG<br>
<a href="mailto:fenglu@fingerpass.net.cn">fenglu@fingerpass.net.cn</a><br>
<br>
-----Original Message-----<br>
From: pkg-exppsy-pymvpa-bounces+fenglu=<a
href="mailto:fingerpass.net.cn@lists.alioth.debian.org">fingerpass.net.cn@lists.alioth.debian.org</a>
[mailto:<a href="mailto:pkg-exppsy-pymvpa-bounces%2Bfenglu">pkg-exppsy-pymvpa-bounces+fenglu</a>=<a
href="mailto:fingerpass.net.cn@lists.alioth.debian.org">fingerpass.net.cn@lists.alioth.debian.org</a>]
On Behalf Of Yaroslav Halchenko<o:p></o:p></span></p>

</div>

<div>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-US>Sent: 2011</span>年<span
lang=EN-US>11</span>月<span lang=EN-US>8</span>日<span lang=EN-US> 20:55<br>
To: Development and support pf PyMVPA<br>
Subject: Re: [pymvpa] How to export neighborhood relationships of NiftiDataset?<br>
<br>
axes and direction depend on how they are stored in your specific<br>
Nifti -- and those could vary since we do not deduce physical<br>
orientation of the volume anyhow from qform.<br>
<br>
On Tue, 08 Nov 2011, </span>冯璐<span lang=EN-US> wrote:<br>
<br>
> I think that is what I need.<br>
> So array([0, 0, 1]) is the coordinate in the voxel space. X from 0 to max:
right->left; Y from 0 to max: posterior->anterior; Z from 0 to max:
inferior->superior ??<br>
<br>
<br>
> Best wishes!<br>
<br>
>      Lu FENG<br>
> <a href="mailto:fenglu@fingerpass.net.cn">fenglu@fingerpass.net.cn</a><br>
<br>
> -----Original Message-----<br>
> From: pkg-exppsy-pymvpa-bounces+fenglu=<a
href="mailto:fingerpass.net.cn@lists.alioth.debian.org">fingerpass.net.cn@lists.alioth.debian.org</a>
[mailto:<a href="mailto:pkg-exppsy-pymvpa-bounces%2Bfenglu">pkg-exppsy-pymvpa-bounces+fenglu</a>=<a
href="mailto:fingerpass.net.cn@lists.alioth.debian.org">fingerpass.net.cn@lists.alioth.debian.org</a>]
On Behalf Of Yaroslav Halchenko<br>
> Sent: 2011</span>年<span lang=EN-US>11</span>月<span lang=EN-US>8</span>日<span
lang=EN-US> 13:35<br>
> To: Development and support pf PyMVPA<br>
> Subject: Re: [pymvpa] How to export neighborhood relationships of
NiftiDataset?<br>
<br>
> so we are talking about 0.4.x series of pymvpa (in 0.6 AKA mvpa2 voxel<br>
> indices are explicitly stored in feature attributes of a dataset):
 so I<br>
> guess you are looking for:<br>
<br>
> In [10]: from mvpa.tests.tests_warehouse import datasets<br>
> In [11]: datasets['3dsmall'].mapper.getInId(0)<br>
> Out[11]: array([0, 0, 1])<br>
<br>
> ?<br>
<br>
> On Tue, 08 Nov 2011, </span>冯璐<span lang=EN-US> wrote:<br>
<br>
> >    Dear experts,<br>
<br>
<br>
<br>
> >             I  know that
 using NiftiDataset.map2Nifti()  or other  functions<br>
> >    like mapForward()  or mapReverse(),  we
 can deal  with  either 2D  or  3D<br>
> >    dataset freely. But I wonder how to export the
neighborhood  relationships<br>
> >    of the volume.  Briefly, I</span><span lang=EN-US
style='font-family:"Arial Unicode MS","sans-serif"'>��</span><span lang=EN-US>d
like  to have a  transformation matrix or  a<br>
> >    list of  coordinations  for each  voxel.
 I need  this  if I  go  on  with<br>
> >    processing by other tools instead of PyMVPA.<br>
<br>
> >             Thanks in advanceJ<br>
<br>
<br>
<br>
> >    Best wishes!<br>
<br>
<br>
<br>
> >         Lu FENG<br>
<br>
> >    <a href="mailto:fenglu@fingerpass.net.cn">fenglu@fingerpass.net.cn</a><br>
<br>
<br>
<br>
> >    __________ Information from ESET NOD32 Antivirus,
version of virus<br>
> >    signature database 6532 (20111010) __________<br>
<br>
> >    The message was checked by ESET NOD32 Antivirus.<br>
<br>
> >    [1]<a href="http://www.eset.com" target="_blank">http://www.eset.com</a><br>
<br>
> > References<br>
<br>
> >    Visible links<br>
> >    1. <a href="http://www.eset.com/" target="_blank">http://www.eset.com/</a><br>
<br>
> > _______________________________________________<br>
> > Pkg-ExpPsy-PyMVPA mailing list<br>
> > <a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>
> > <a
href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa"
target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</a><br>
--<br>
=------------------------------------------------------------------=<br>
Keep in touch                  
                  <a
href="http://www.onerussian.com" target="_blank">www.onerussian.com</a><br>
Yaroslav Halchenko                 <a
href="http://www.ohloh.net/accounts/yarikoptic" target="_blank">www.ohloh.net/accounts/yarikoptic</a><br>
<br>
_______________________________________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>
<a
href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa"
target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</a><br>
<br>
<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><span lang=EN-US>__________ Information from ESET NOD32
Antivirus, version of virus signature database 6616 (20111109) __________<o:p></o:p></span></p>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-US><br>
The message was checked by ESET NOD32 Antivirus.<o:p></o:p></span></p>

</div>

<p class=MsoNormal><span lang=EN-US><a href="http://www.eset.com"
target="_blank">http://www.eset.com</a><o:p></o:p></span></p>

<div>

<div>

<p class=MsoNormal><span lang=EN-US><br>
<br>
<br>
_______________________________________________<br>
Pkg-ExpPsy-PyMVPA mailing list<br>
<a href="mailto:Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org">Pkg-ExpPsy-PyMVPA@lists.alioth.debian.org</a><br>
<a
href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa"
target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa</a><o:p></o:p></span></p>

</div>

</div>

</div>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p><span lang=EN-US>__________ Information from ESET NOD32 Antivirus, version
of virus signature database 6617 (20111110) __________<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p><span lang=EN-US>The message was checked by ESET NOD32 Antivirus.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>

<p><span lang=EN-US>http://www.eset.com<o:p></o:p></span></p>

</div>

 <BR><BR>__________ Information from ESET NOD32 Antivirus, version of virus signature database 6617 (20111110) __________<BR><BR>The message was checked by ESET NOD32 Antivirus.<BR><BR><A HREF="http://www.eset.com">http://www.eset.com</A><BR> </body>

</html>