[pymvpa] NiftiDatatset bug?

Michael Hanke michael.hanke at gmail.com
Thu Jan 8 19:01:28 UTC 2009


Hi,

let me add some bits...

On Thu, Jan 08, 2009 at 01:33:05PM -0500, Yaroslav Halchenko wrote:
> would you mind resorting to git's snapshot? ;-)
> 
> the issue you've reported is fixed and changelog for upcoming release starts
> with:
> 
> * 0.4.1 (???, ?? ??? 200?)
> 
>   * :class:`~mvpa.datasets.nifti.NiftiDataset` capable to handle files
>     with less than 4 dimensions, which can, optionally, be provided as
>     a list of filenames of :class:`~nifti.NiftiImage` objects. That
>     makes it easy to load data from a sequence of files.
> 
> 
> On Thu, 08 Jan 2009, Scott Gorlin wrote:
> 
> > Think this is a bug...
> 
> > If I load a NiftiImage with 1 timepoint, the resulting data.shape is a 
> > tuple of 3 for X,Y,Z.  I'm guessing there's a squeeze() call somewhere 
> > in NiftiImage as the first dimension should be 1 (n,X,Y,Z).

IMHO, if you load a 3D image the first dimension should not be 1, since
it is a _3_D volume. Actually, NIfTI supports 7 dimensions and the
standard requires all unused dimensions to be set to length 1 (in the
header's `dim` vector). So following your logic the shape of the data
array should be (1,1,1,1,X,Y,Z). IMHO this is not desirable for the
corresponding array shape. However, I might be missing something and as
I am currently heading towards a new PyNIfTI release it might be useful
to discuss this.


Cheers,

Michael


-- 
GPG key:  1024D/3144BE0F Michael Hanke
http://apsy.gse.uni-magdeburg.de/hanke
ICQ: 48230050



More information about the Pkg-ExpPsy-PyMVPA mailing list