[pymvpa] Data import with pynifti

Yaroslav Halchenko debian at onerussian.com
Thu Mar 3 17:23:30 UTC 2011


Hi Roberto,

as we have discovered in our troubleshooting thread with Nynke van der
Laan, in PyMVPA  0.4.x and 0.5.x series, while relying on pynifti
interface to load data, we did not account for scaling/offset parameters
encoded in Nifti headers.  So, if those .hdr/.img correspond to Nifti
files, you should better check if they have the same scl_inter/scl_slope
values... if those correspond to Analyze files... it is even more
interesting since then if it comes from SPM, according to

http://nifti.nimh.nih.gov/nifti-1/documentation/Analyze_usage.pdf

those inter/slope could still have been encoded in some fields, and thus
loaded data might not be appropriate for the analysis in PyMVPA.  The
best resolution would be to join them into a single 4D Nifti
volume file (and double check if scaling/offsetting is done correctly by
the software you would use for that)

Tomorrow or on weekend we will make full announcement and fresh
bugfix release of 0.4.x series which should take care about scaling
issue.

Meanwhile -- if you have 'Analyze' files -- would you mind forwarding me
few samples to check on the status of their fields.

With best regards,
Yarik

On Thu, 03 Mar 2011, Roberto Guidotti wrote:

>    Thank you Michael it works perfectly....
>    Sorry but I'm a novice with Python and this technique, I'm glad to have
>    the support of you and the other authorities of MVPA techniques!!
>    Thank you
>    Roberto

>    2011/3/1 Michael Hanke <[1]michael.hanke at gmail.com>

>    On Mon, Feb 28, 2011 at 04:38:58PM +0100, Roberto Guidotti wrote:
>    > Dear all,

>    > I have to analyze some fmri data with pymvpa: my images are in
>    Analyze
>    > format: every volume is a .hdr .img pair and I have to load as a time
>    > series. How can I do?
>    > The solution is to convert my datasets with some software as MRIcro
>    or
>    > similar, but I want to know if there is a "library" solution to solve
>    that
>    > issue or if I could do this by building a script managing and merging
>    > several arrays.

>      You should be able to load them all one by one into a list of images
>      and
>      supply that list as an argument to the Dataset constructor. It
>      should
>      just work.
>      Michael
>      PS: Sorry for the delay
-- 
=------------------------------------------------------------------=
Keep in touch                                     www.onerussian.com
Yaroslav Halchenko                 www.ohloh.net/accounts/yarikoptic



More information about the Pkg-ExpPsy-PyMVPA mailing list