<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hello all
<div><br>
</div>
<div>Totally new beginner here and just trying to read nifti files. </div>
<div><br>
</div>
<div>Don't know if the issue has been raised before (sorry if it's been), but I have a series of 3d nifti files (>1000) to be read into the dataset and I ran into three problems:</div>
<div><br>
</div>
<div>(1) 'Too many open files' error that arises from nibabel.load function (cf http://mail.scipy.org/pipermail/nipy-devel/2011-February/005428.html)</div>
<div>(2) Wrong voxel dimensions ('voxel_eldim')</div>
<div>(3) Wrong time coordinates ('time_coords')</div>
<div><br>
</div>
<div>I checked the source code and found out the fmri_dataset relies on get_zooms(), which returns an 3-element array for 3D files and 4-element array for 4D files. </div>
<div><br>
</div>
<div>It took me a bit of time to find out the problem. To save more troubles by other beginners like me, I suggest that
<span style="font-size: 10pt;">fmri_dataset</span><span style="font-size: 10pt;"> (a) forbid loading series of 3D files (which can be converted to 4D easily in SPM anyway), and (b) allow the optional parameter of specifying TR length.</span></div>
<div><span style="font-size: 10pt;"><br>
</span></div>
<div><span style="font-size: 10pt;">Thanks!</span></div>
<div><span style="font-size: 10pt;">Hang-yee</span></div>
</div>
</body>
</html>