[pymvpa] How to export neighborhood relationships of NiftiDataset?

冯璐 fenglu at fingerpass.net.cn
Thu Nov 10 03:11:43 UTC 2011


... 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.

Loading from
         Task1.nii.gz,
I can get
         dataset.samples which is a M*N*P matrix.
Using 
         dataset.mapper.getInId(index),
I can get
         a coordinate [z, y, x], x belongs to (0, M), y belongs to (0, N), z belongs to (0, P).
I have checked the result above.

Using
        fslhd Task1.nii.gz,
I can get some information may be useful
        qform_name     Aligned Anat
		qform_code     2
		qto_xyz:1      -3.500000  0.000000  -0.000000  76.000000
		qto_xyz:2      0.000000  3.500000  -0.000000  -112.000000
		qto_xyz:3      0.000000  0.000000  4.000000  -50.000000
		qto_xyz:4      0.000000  0.000000  0.000000  1.000000
		qform_xorient  Right-to-Left
		qform_yorient  Posterior-to-Anterior
		qform_zorient  Inferior-to-Superior
		sform_name     Aligned Anat
		sform_code     2
		sto_xyz:1      -3.500000  0.000000  0.000000  76.000000
		sto_xyz:2      0.000000  3.500000  0.000000  -112.000000
		sto_xyz:3      0.000000  0.000000  4.000000  -50.000000
		sto_xyz:4      0.000000  0.000000  0.000000  1.000000
		sform_xorient  Right-to-Left
		sform_yorient  Posterior-to-Anterior
		sform_zorient  Inferior-to-Superior

Then, how can I change the coordinate into a MNI coordinate or a Talairach coordinate? 

Sorry for interruption and thanks in advance.

Best wishes!

     Lu FENG
fenglu at fingerpass.net.cn

-----Original Message-----
From: pkg-exppsy-pymvpa-bounces+fenglu=fingerpass.net.cn at lists.alioth.debian.org [mailto:pkg-exppsy-pymvpa-bounces+fenglu=fingerpass.net.cn at lists.alioth.debian.org] On Behalf Of Yaroslav Halchenko
Sent: 2011年11月8日 20:55
To: Development and support pf PyMVPA
Subject: Re: [pymvpa] How to export neighborhood relationships of NiftiDataset?

axes and direction depend on how they are stored in your specific
Nifti -- and those could vary since we do not deduce physical
orientation of the volume anyhow from qform.

On Tue, 08 Nov 2011, 冯璐 wrote:

> I think that is what I need.
> 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 ??


> Best wishes!

>      Lu FENG
> fenglu at fingerpass.net.cn

> -----Original Message-----
> From: pkg-exppsy-pymvpa-bounces+fenglu=fingerpass.net.cn at lists.alioth.debian.org [mailto:pkg-exppsy-pymvpa-bounces+fenglu=fingerpass.net.cn at lists.alioth.debian.org] On Behalf Of Yaroslav Halchenko
> Sent: 2011年11月8日 13:35
> To: Development and support pf PyMVPA
> Subject: Re: [pymvpa] How to export neighborhood relationships of NiftiDataset?

> so we are talking about 0.4.x series of pymvpa (in 0.6 AKA mvpa2 voxel
> indices are explicitly stored in feature attributes of a dataset):  so I
> guess you are looking for:

> In [10]: from mvpa.tests.tests_warehouse import datasets
> In [11]: datasets['3dsmall'].mapper.getInId(0)
> Out[11]: array([0, 0, 1])

> ?

> On Tue, 08 Nov 2011, 冯璐 wrote:

> >    Dear experts,



> >             I  know that  using NiftiDataset.map2Nifti()  or other  functions
> >    like mapForward()  or mapReverse(),  we  can deal  with  either 2D  or  3D
> >    dataset freely. But I wonder how to export the neighborhood  relationships
> >    of the volume.  Briefly, I��d like  to have a  transformation matrix or  a
> >    list of  coordinations  for each  voxel.  I need  this  if I  go  on  with
> >    processing by other tools instead of PyMVPA.

> >             Thanks in advanceJ



> >    Best wishes!



> >         Lu FENG

> >    fenglu at fingerpass.net.cn



> >    __________ Information from ESET NOD32 Antivirus, version of virus
> >    signature database 6532 (20111010) __________

> >    The message was checked by ESET NOD32 Antivirus.

> >    [1]http://www.eset.com

> > References

> >    Visible links
> >    1. http://www.eset.com/

> > _______________________________________________
> > Pkg-ExpPsy-PyMVPA mailing list
> > Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
> > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa
-- 
=------------------------------------------------------------------=
Keep in touch                                     www.onerussian.com
Yaroslav Halchenko                 www.ohloh.net/accounts/yarikoptic

_______________________________________________
Pkg-ExpPsy-PyMVPA mailing list
Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-exppsy-pymvpa
 

__________ Information from ESET NOD32 Antivirus, version of virus signature database 6616 (20111109) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com
 




More information about the Pkg-ExpPsy-PyMVPA mailing list